Developer API

API reference

Generated from the live OpenAPI schema. Download the raw schema or read the overview and quickstart.

Diagram: a terminal sends a request to the ThreadMaster API, which publishes to three phone screens and returns a webhook.

Base URL and authentication

The base URL is https://threadmaster.ai/api/public/v1. Every request needs Authorization: Bearer tm_live_…. Keys are created in Settings → Developer API. The schema is available at /api/public/v1/schema/?format=json.

curl https://threadmaster.ai/api/public/v1/me/ \
  -H "Authorization: Bearer tm_live_…"

Endpoints

Account

MethodPathDescription
GET/me/The user, key and subscription behind the request
GET/accounts/Connected X, Threads and Facebook Page accounts
GET/quota/X posting quota standing

Threads (drafts)

MethodPathDescription
POST/threads/generate/Generate a thread with AI
POST/threads/Create a thread you wrote yourself
GET/threads/List threads — ?since, ?status, ?favorite, ?cursor, ?limit
GET/threads/{id}/One thread with its publish history
PATCH/threads/{id}/Edit content, topic or favourite
DELETE/threads/{id}/Delete (409 once it has publish history)
GET/threads/{id}/x/preview/How it would split into X posts

X

MethodPathDescription
POST/x/posts/Publish now, at scheduled_for, or queue: true
GET/x/posts/List X posts
GET/x/posts/{id}/One X post with per-tweet results
POST/x/posts/{id}/cancel/Cancel a scheduled post
POST/x/posts/{id}/reschedule/Move a scheduled post
POST/x/posts/{id}/retry/Retry a failed or partial post
GET/x/posts/{id}/metrics/Likes, impressions, replies… over time

Meta Threads

MethodPathDescription
POST/threads-app/posts/Publish a thread to Threads
GET/threads-app/posts/List Threads posts
GET/threads-app/posts/{id}/One Threads post
POST/threads-app/posts/{id}/retry/Retry
GET/threads-app/posts/{id}/metrics/Views, likes, replies… over time

Facebook Pages

MethodPathDescription
GET/facebook/pages/Pages you can publish to
POST/facebook/posts/Publish to a Page (mode single or comments)
GET/facebook/posts/List Facebook posts
GET/facebook/posts/{id}/One Facebook post
POST/facebook/posts/{id}/retry/Retry
GET/facebook/posts/{id}/metrics/Reactions, comments, shares over time

LinkedIn

MethodPathDescription
POST/linkedin/posts/Publish to a member profile (mode single or comments)
GET/linkedin/posts/List LinkedIn posts
GET/linkedin/posts/{id}/One LinkedIn post
POST/linkedin/posts/{id}/retry/Retry

Webhooks

MethodPathDescription
GET/webhooks/Your endpoints
POST/webhooks/Subscribe a URL to events (secret returned once)
PATCH/webhooks/{id}/Change URL, events, pause or re-enable
DELETE/webhooks/{id}/Unsubscribe
POST/webhooks/{id}/test/Send a test event
POST/webhooks/{id}/rotate-secret/Rotate the signing secret (24h overlap)
GET/webhooks/{id}/deliveries/Delivery log with responses and retries
GET/events/Recent event payloads (sample data for integrations)

MCP

MethodPathDescription
POST/mcp/Model Context Protocol endpoint (JSON-RPC) — see /developers/mcp

Webhook events

  • thread.generated A thread was generated (app or API)
  • post.scheduled A post was scheduled or queued
  • post.rescheduled A scheduled post was moved
  • post.published Every part of the post went live
  • post.partially_published Some parts went live, some failed
  • post.failed Nothing went live
  • post.cancelled A scheduled post was cancelled

Errors

StatusCodeMeaning
400invalid_requestValidation failed — details lists the fields
401authentication_required / invalid_api_keyMissing, malformed, revoked or expired key
402subscription_requiredThe account has no active subscription
403forbidden_scopeThe key lacks the scope for this endpoint
404not_found / feature_disabledUnknown id, or the platform is not enabled for the account
409account_not_connected / duplicate_content / conflictConnect the social account first; identical content within 72h; state does not allow the action
429rate_limited / quota_exhaustedThrottled (see Retry-After) or out of X posting quota
502generation_failedThe AI provider could not generate — retry

Rate limits

ScopeLimit
Per key60 requests/minute, 5,000/day
AI generation30/hour and 200/day per account (all keys combined)
Publishing30/hour per account, plus your plan's X posting quota
HeadersX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; Retry-After on 429

See the overview and quickstart and the webhooks section.