Programmatic access to your personal AI agent, fan messages, analytics, and content posting.
https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1
All requests require a Bearer token. Generate keys on the API Keys page. Requires the Pro Elite plan (or Enterprise).
Authorization: Bearer mp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Rate limit: 60 requests per minute per key. 429 returned when exceeded.
Monthly AI quota: /chat and /draft-reply are metered at 1,500 calls per month per user (250 calls per month during the free trial). Every response to these endpoints includes:
X-Quota-Limit โ monthly cap (e.g. 1500)X-Quota-Remaining โ calls remaining this monthWhen exhausted the endpoint returns HTTP 429 with body:
{ "error": "Monthly AI quota reached", "limit": 1500, "remaining": 0 }
/chatSend a message to your AI agent (uses your saved personality).
Optional mode parameter: "persona" (default). Any other value returns a 400 error.
curl -X POST "https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/chat" -H "Authorization: Bearer mp_live_..." -H "Content-Type: application/json" -d '{
"message": "Hey, what should I post today?",
"mode": "persona"
}'
# Response
{ "reply": "..." }
/draft-replyDraft a voice-matched reply to a specific fan message. Provide either a message_id from your inbox, or the fan's details directly.
curl -X POST "https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/draft-reply" -H "Authorization: Bearer mp_live_..." -H "Content-Type: application/json" -d '{
"fan_message": "Loved your last drop ๐ฅ",
"platform": "instagram",
"fan_username": "@alice"
}'
/messagesList ingested fan messages across connected platforms.
Query params: limit (max 200), platform, unread=true.
curl "https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/messages?limit=20&unread=true" -H "Authorization: Bearer mp_live_..."
/messages/{id}/replySend a reply to a fan message via its origin platform.
curl -X POST "https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/messages/MSG_ID/reply" -H "Authorization: Bearer mp_live_..." -H "Content-Type: application/json" -d '{ "reply": "Thanks for the support!" }'
/analyticsPer-platform message counts, replies, and avg response times.
Query param: days (default 30, max 365).
curl "https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/analytics?days=7" -H "Authorization: Bearer mp_live_..."
/contentQueue a post for a connected platform. Delivered within ~60s by the post worker.
Delivery support: twitter (text up to 280 chars), facebook (text + optional image), instagram (image required, with caption). youtube is accepted but cannot be auto-delivered โ its public API does not support post creation, so it will be marked failed with an explanation.
curl -X POST "https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/content" -H "Authorization: Bearer mp_live_..." -H "Content-Type: application/json" -d '{
"platform": "twitter",
"text": "New drop today ๐ฅ",
"media_url": "https://..."
}'
const res = await fetch("https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1/chat", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.MP_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ message: "Hello agent" }),
});
const { reply } = await res.json();
console.log(reply);
All errors return JSON: { "error": "..." }
401 โ missing/invalid/revoked key403 โ Pro Elite (or Enterprise) plan required404 โ unknown route or message412 โ no active persona configured for this account429 โ rate limit or monthly AI quota exceeded (see Quotas)402 โ AI credits exhausted500/502 โ server or upstream failureLast updated: September 2026