mepersona.ai API v1

Programmatic access to your personal AI agent, fan messages, analytics, and content posting.

Base URL

https://afvuqlmsuzdwnykvnptl.supabase.co/functions/v1/api-v1

Authentication

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

Quotas & rate limits

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:

When exhausted the endpoint returns HTTP 429 with body:

{ "error": "Monthly AI quota reached", "limit": 1500, "remaining": 0 }

Endpoints

POST /chat

Send 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": "..." }

POST /draft-reply

Draft 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"
  }'

GET /messages

List 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_..."

POST /messages/{id}/reply

Send 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!" }'

GET /analytics

Per-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_..."

POST /content

Queue 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://..."
  }'

JavaScript example

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);

Errors

All errors return JSON: { "error": "..." }

Last updated: September 2026