Foxli
Log inStart free
API reference / posts

Create post

POST/v1/postsPermission posts:write

Creates a social media post across one or more connected channels. Supports drafting, queuing, custom scheduling, or publishing immediately.

Headers
AuthorizationstringREQUIRED

Bearer followed by your API key.

Foxli-Workspacestring

Target workspace ID. Required if account owns or admins more than one workspace.

Idempotency-Keystring

Unique token for request idempotency (valid for 24 hours).

Query parameters
workspace_idstring

Alternative way to pass workspace ID.

Body parameters
modestringREQUIRED

draft = 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.

draftqueueschedulenow
channel_idsstring[]REQUIRED
contentstringREQUIRED
scheduled_atstring
media_urlsstring[]
media_idsstring[]

Media IDs from POST /v1/media

first_commentstring
tagsstring[]
channel_overridesobject
Errors
400workspace_requiredInvalid request parameters or missing workspace context.
401invalid_api_keyMissing, invalid, or revoked API key.
403insufficient_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
}

Build on Foxli.

Publish posts, sync social channels, stream analytics, and get instant webhooks.

No card for month one ยท Cancel anytime