POST
/v1/postsCreate post
Create a draft, schedule for later, or publish immediately to one or more connected accounts.
Request
bashยทcURL
curl -X POST "https://YOUR_PROJECT.supabase.co/functions/v1/public-api/v1/posts" \
-H "Authorization: Bearer px_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "caption": "Hello from the API ๐ #postaxis", "media": ["user-uuid/api/slide-1.png"], "social_accounts": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], "scheduled_at": "2026-06-22T14:00:00Z", "is_draft": false }'Body
| Name | Type | Description |
|---|---|---|
| caption | string | Post text. Alias: `body`. |
| media | string[] | Storage paths from the upload step (`media_id` values). Order is preserved for carousels. |
| social_accountsrequired | string[] | Account UUIDs from `GET /v1/social-accounts`. |
| scheduled_at | string | null | ISO 8601 UTC datetime, e.g. `2026-06-22T14:00:00Z`. Omit for immediate publish. |
| is_draft | boolean | `true` saves a draft and does not publish. |
jsonยทExample body
{
"caption": "Hello from the API ๐ #postaxis",
"media": ["user-uuid/api/slide-1.png"],
"social_accounts": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
"scheduled_at": "2026-06-22T14:00:00Z",
"is_draft": false
}Response
jsonยท200 OK
{
"id": "post-uuid",
"status": "scheduled",
"caption": "Hello from the API ๐ #postaxis",
"media": ["https://โฆ/storage/v1/object/public/images/โฆ"],
"social_accounts": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
"scheduled_at": "2026-06-22T14:00:00Z",
"is_draft": false
}