{"openapi":"3.1.0","info":{"title":"Breakreach API","version":"1.0.0","description":"Publish and schedule social media posts across Instagram, TikTok, X (Twitter), Reddit, LinkedIn, YouTube, Facebook, Threads, Bluesky, Pinterest, Telegram and Discord with one request shape.\n\nAuthenticate with an API key (create one in the Breakreach dashboard under Settings → API) sent as a Bearer token. AI agents can use the same capabilities through the hosted MCP server at https://api.breakreach.com/mcp (OAuth 2.1)."},"servers":[{"url":"https://api.breakreach.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from the Breakreach dashboard (br_...) or an OAuth access token (bro_...)"}},"schemas":{"Post":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","publishing","published","failed"]},"scheduledAt":{"type":"string","format":"date-time"},"accountIds":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"string","format":"uri"}},"metrics":{"type":["object","null"],"properties":{"views":{"type":"number"},"likes":{"type":"number"},"comments":{"type":"number"},"shares":{"type":"number"}}},"error":{"type":["string","null"],"description":"Human-readable failure reason when status is failed"}}},"Account":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","x","reddit","linkedin","youtube","facebook","threads","bluesky","pinterest","telegram","discord"]},"displayName":{"type":"string"}}},"Workspace":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/v1/workspaces":{"get":{"summary":"List workspaces","operationId":"listWorkspaces","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}}}}}}}}},"/v1/accounts":{"get":{"summary":"List connected social accounts","description":"Returns the connected accounts of the workspace. Use the returned ids as accountIds when creating posts.","operationId":"listAccounts","parameters":[{"name":"workspace","in":"query","schema":{"type":"string"},"description":"Workspace slug (defaults to your first workspace)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}}}}}}},"/v1/posts":{"get":{"summary":"List posts","operationId":"listPosts","parameters":[{"name":"workspace","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","scheduled","published","failed","all"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}}}},"post":{"summary":"Create a post (schedule or publish now)","description":"Creates a post targeting one or several connected accounts. Provide scheduledAt (interpreted in the workspace timezone), or set useNextSlot to schedule at the next free slot of the workspace posting schedule, or publishNow to publish immediately. Media must be public URLs — use POST /v1/media first for reliable hosting. Media is required for Instagram, TikTok, YouTube and Pinterest.","operationId":"createPost","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content","accountIds"],"properties":{"content":{"type":"string","description":"The post text. For Reddit, the first line becomes the title."},"accountIds":{"type":"array","items":{"type":"string"},"description":"Target account ids from GET /v1/accounts"},"scheduledAt":{"type":"string","description":"ISO datetime in the workspace timezone, e.g. 2026-09-20T11:00:00"},"publishNow":{"type":"boolean"},"useNextSlot":{"type":"boolean"},"media":{"type":"array","items":{"type":"string","format":"uri"}},"workspace":{"type":"string","description":"Workspace slug (optional)"},"pinterestBoardId":{"type":"string","description":"Required when targeting Pinterest — see GET /v1/pinterest-boards"},"redditSubreddit":{"type":"string","description":"Subreddit without r/ — defaults to the user profile"},"redditFlairText":{"type":"string","description":"Post flair name when the subreddit requires one"},"tiktokSettings":{"type":"object","properties":{"privacyLevel":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"disableComment":{"type":"boolean"},"disableDuet":{"type":"boolean"},"disableStitch":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"post":{"$ref":"#/components/schemas/Post"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}":{"delete":{"summary":"Delete a post (cancels scheduling)","operationId":"deletePost","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media":{"post":{"summary":"Re-host a media URL on Breakreach storage","description":"Downloads an image or video from a public URL and hosts it permanently, so it stays available for scheduled posts. Returns the hosted URL to use in POST /v1/posts.","operationId":"uploadMedia","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}}}}},"/v1/next-slot":{"get":{"summary":"Next free posting slot","description":"Returns the earliest future time slot from the workspace posting schedule that has no post scheduled yet.","operationId":"getNextSlot","parameters":[{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"No posting schedule configured"}}}},"/v1/pinterest-boards":{"get":{"summary":"List Pinterest boards","operationId":"listPinterestBoards","parameters":[{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"No Pinterest account connected"}}}},"/v1/analytics":{"get":{"summary":"Workspace analytics","description":"Aggregated views, likes, comments and shares across the last 100 published posts, plus the top 10 posts by views.","operationId":"getAnalytics","parameters":[{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/v1/accounts/stats":{"get":{"summary":"Account-level stats","description":"Follower counts and account-level totals for every connected account, where the platform exposes them. Cached up to 1 hour.","operationId":"getAccountStats","parameters":[{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/v1/posts/{id}/metrics":{"get":{"summary":"Per-post metrics","description":"Views, likes, comments and shares for one post, plus the platform post ids it published to.","operationId":"getPostMetrics","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/v1/posts/{id}/comments":{"get":{"summary":"Read comments on a published post","description":"Live comments/replies from the platforms. Supported: Instagram, Facebook, Threads, X. Each comment carries the accountId and platform needed to reply.","operationId":"getPostComments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspace","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"}}}},"/v1/comments/reply":{"post":{"summary":"Reply to a comment","description":"Replies to a comment on a published post. Supported: Instagram, Facebook, Threads, X.","operationId":"replyToComment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["accountId","platform","commentId","message"],"properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","facebook","threads","x"]},"commentId":{"type":"string"},"message":{"type":"string"},"workspace":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"502":{"description":"Platform rejected the reply"}}}}}}