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

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
| Method | Path | Description |
|---|---|---|
| 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)
| Method | Path | Description |
|---|---|---|
| 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
| Method | Path | Description |
|---|---|---|
| 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
| Method | Path | Description |
|---|---|---|
| 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
| Method | Path | Description |
|---|---|---|
| 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 |
| Method | Path | Description |
|---|---|---|
| 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
| Method | Path | Description |
|---|---|---|
| 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
| Method | Path | Description |
|---|---|---|
| POST | /mcp/ | Model Context Protocol endpoint (JSON-RPC) — see /developers/mcp |
Webhook events
thread.generatedA thread was generated (app or API)post.scheduledA post was scheduled or queuedpost.rescheduledA scheduled post was movedpost.publishedEvery part of the post went livepost.partially_publishedSome parts went live, some failedpost.failedNothing went livepost.cancelledA scheduled post was cancelled
Errors
| Status | Code | Meaning |
|---|---|---|
400 | invalid_request | Validation failed — details lists the fields |
401 | authentication_required / invalid_api_key | Missing, malformed, revoked or expired key |
402 | subscription_required | The account has no active subscription |
403 | forbidden_scope | The key lacks the scope for this endpoint |
404 | not_found / feature_disabled | Unknown id, or the platform is not enabled for the account |
409 | account_not_connected / duplicate_content / conflict | Connect the social account first; identical content within 72h; state does not allow the action |
429 | rate_limited / quota_exhausted | Throttled (see Retry-After) or out of X posting quota |
502 | generation_failed | The AI provider could not generate — retry |
Rate limits
| Scope | Limit |
|---|---|
| Per key | 60 requests/minute, 5,000/day |
| AI generation | 30/hour and 200/day per account (all keys combined) |
| Publishing | 30/hour per account, plus your plan's X posting quota |
| Headers | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; Retry-After on 429 |
See the overview and quickstart and the webhooks section.