API reference / posts
Create post
POST
/v1/postsPermission posts:writeCreates a social media post across one or more connected channels. Supports drafting, queuing, custom scheduling, or publishing immediately.
Headers
AuthorizationstringREQUIREDBearer followed by your API key.
Foxli-WorkspacestringTarget workspace ID. Required if account owns or admins more than one workspace.
Idempotency-KeystringUnique token for request idempotency (valid for 24 hours).
Query parameters
workspace_idstringAlternative way to pass workspace ID.
Body parameters
modestringREQUIREDdraft = save only; queue = next free slot in the workspace posting schedule (400 no_queue_slot if none); schedule = publish at scheduled_at (2 min to 1 year ahead); now = publish within about 2 minutes. For queue/schedule/now the response status is "scheduled"/"queued"; the final result arrives via GET /v1/posts/{id} or the post.published / post.failed webhooks.
draftqueueschedulenowchannel_idsstring[]REQUIREDcontentstringREQUIREDscheduled_atstringmedia_urlsstring[]media_idsstring[]Media IDs from POST /v1/media
first_commentstringtagsstring[]channel_overridesobjectErrors
400
workspace_requiredInvalid request parameters or missing workspace context.401
invalid_api_keyMissing, invalid, or revoked API key.403
insufficient_scopeInsufficient scope, insufficient plan tier, or unauthorized workspace.curl -X POST https://api.foxli.app/v1/posts \ -H "Authorization: Bearer $FOXLI_API_KEY" \ -H "Foxli-Workspace: ws_brand_primary" \ -H "Idempotency-Key: idemp_9f82a1" \ -H "Content-Type: application/json" \ -d '{ "mode": "schedule", "channel_ids": [ "ch_x_12345", "ch_li_67890" ], "content": "Excited to unveil our automated workflow today! ๐ #productivity", "scheduled_at": "2026-11-10T14:30:00Z", "media_urls": [ "https://storage.googleapis.com/foxli-media/launch_banner.png" ], "first_comment": "Read our full documentation at https://foxli.app", "tags": [ "launch", "announcement" ] }'
Response201 OK
{
"success": true
}