API Reference (v1)

Bearer-authenticated JSON API. Requires the API add-on on an active subscription.

Authentication

Authorization: Bearer pt_live_your_key_here
Base URL: {your-host}/api/v1

401 = invalid key · 403 = add-on/subscription inactive · 400 = validation · 429 = rate limit (60 req/min). Lists paginate with limit (default 50) + offset and return count.

GET/v1/social-accounts

Connected accounts — ids are required for post creation.

{ "data": [ { "id": 1, "platform": "twitter", "username": "yourhandle" } ], "count": 1 }

POST/v1/media/create-upload-url

Three-step upload: request a signed URL, PUT the raw bytes to it, then POST the completion URL.

{ "mime_type": "video/mp4", "size_bytes": 1048576, "name": "video.mp4" }
201 → { "media_id": "mid_abc123", "upload_url": "https://…signed…", "complete_url": "https://…" }
Then: PUT {upload_url}   (Content-Type: video/mp4, raw bytes)
Then: POST {complete_url}

GET/v1/media?limit=50&offset=0

List uploaded media.

DELETE/v1/media/{media_id}

Delete a media item.

POST/v1/posts

Create a post. use_queue and scheduled_at are mutually exclusive; omit both for an instant post. media_urls are downloaded server-side. Timezone priority: explicit > profile > UTC.

{
  "caption": "your caption here #hashtags",
  "media": ["mid_abc123"],
  "media_urls": ["https://public/file.mp4"],
  "social_accounts": [1, 2, 3],
  "scheduled_at": "2026-08-01T14:00:00Z",
  "is_draft": false,
  "use_queue": true,
  "platform_configurations": {
    "tiktok":    { "draft": true, "video_cover_timestamp_ms": 3000, "is_aigc": true },
    "instagram": { "is_trial_reel": true, "trial_graduation": "SS_PERFORMANCE" },
    "youtube":   { "title": "My Short Title" },
    "twitter":   { "caption": "platform-specific caption" },
    "pinterest": { "title": "Pin Title", "link": "https://…", "board_ids": ["b1"] }
  },
  "account_configurations": [ { "account_id": 1, "caption": "override" } ]
}
201 → { "id": "uuid", "status": "scheduled", … }

GET/v1/posts?status=scheduled|published|failed|draft&platform=instagram

List posts with filters.

GET/v1/posts/{post_id}

Full post details.

PATCH/v1/posts/{post_id}

Update caption, scheduled_at, social_accounts, media or configs — scheduled/draft posts only.

DELETE/v1/posts/{post_id}

Delete a scheduled/draft post. Published posts cannot be deleted.

GET/v1/post-results?post_id={id}

Per-platform publish outcomes with share URLs or error detail.

GET/v1/analytics?platform=tiktok&timeframe=7d|30d|90d|all

Analytics records (TikTok/YouTube/Instagram) with views, likes, comments, shares and match_confidence.

POST/v1/analytics/sync?platform=tiktok

Trigger a background metrics sync. Omit platform to sync all three.

202 → { "triggered": [ { "platform": "tiktok", "runId": "run_…" } ] }

Webhook

Configure one URL per workspace (Dashboard → API Keys). On every post completion we POST the results, signed with your workspace secret.

POST {your_url}
X-Signature: hex(hmac_sha256(secret, raw_body))

{ "event": "post.completed", "post_id": "uuid",
  "results": [ { "platform": "tiktok", "success": true, "share_url": "…" },
               { "platform": "youtube", "success": false, "error": "…" } ] }

MCP server

Streamable-HTTP MCP endpoint at /api/mcp/mcp exposing 11 tools that mirror this API — create_post accepts media_urls so agents skip the upload step. Authenticate with the same Bearer key.

API Reference · Post Train