{"openapi":"3.0.3","info":{"title":"Tempocast API","version":"1.0.0","description":"Schedule posts, upload media, follow results and answer comments from your own code. Make a key in Settings > API.\n\nSend it as `Authorization: Bearer tc_live_…`. A key acts as the person who made it, cut down to its scopes: `read` (Brands, accounts, posts, media, comments, analytics and brand kits); `write` (Drafts, uploads, media links, notes, the board and brand kits. Posts wait for approval); `publish` (Schedule and post, approve posts and retry failed ones); `comments` (Reply to, hide and mark done comments in the inbox); `webhooks` (Add, change and remove webhook endpoints).\n\nLimits: 120 requests a minute per key and 600 per workspace. Every response has RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.\n\nLists return `{ data, nextCursor }`; pass `cursor` to get the next page. Times are ISO 8601.","contact":{"email":"hello@tempocast.app","url":"https://tempocast.app/docs/api"}},"servers":[{"url":"https://api.tempocast.app/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Account"},{"name":"Brands"},{"name":"Platforms"},{"name":"Campaigns"},{"name":"Posts"},{"name":"Media"},{"name":"Comments"},{"name":"Analytics"},{"name":"Board"},{"name":"Plans"},{"name":"Webhooks"}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Who this key is","description":"The workspace, the key's scopes and brands, who it acts as, and its rate limits. Works with any scope.\n\nScope: `read`.","x-scope":"read","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/brands":{"get":{"operationId":"getBrands","tags":["Brands"],"summary":"List brands","description":"The brands this key can see, by name.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/brands/{id}/accounts":{"get":{"operationId":"getBrandsByIdAccounts","tags":["Brands"],"summary":"List a brand's accounts","description":"Connected YouTube channels, Instagram accounts, Facebook Pages and TikTok accounts. Use an account's id as `socialAccountId` when creating a post.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The brand's id"},"description":"The brand's id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/brands/{id}/kit":{"get":{"operationId":"getBrandsByIdKit","tags":["Brands"],"summary":"Get a brand kit","description":"Voice, example captions, language, words to avoid, audience, hashtag sets, caption templates and links, with each platform's best recent posts.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The brand's id"},"description":"The brand's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKit"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchBrandsByIdKit","tags":["Brands"],"summary":"Update a brand kit","description":"Send only the sections to change. Each section sent replaces that section whole; send `\"\"` or `[]` to clear one. Owners and admins only.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The brand's id"},"description":"The brand's id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"description":"How the brand writes, in a few sentences","type":"string","maxLength":1200},"examples":{"description":"Up to 5 captions that sound right","maxItems":5,"type":"array","items":{"type":"string","maxLength":500}},"language":{"description":"The language the brand writes in, as a BCP 47 tag such as \"fr-FR\", \"fr-CA\", \"es-419\", \"de\" or \"en-GB\". Tempocast writes in about 40 languages; an unknown one is refused.","type":"string","maxLength":20},"formality":{"description":"How to address readers, for languages that have both: \"informal\" (tu, du, tú) or \"formal\" (vous, Sie, usted). Leave it out to follow the example captions.","type":"string","enum":["informal","formal"]},"alsoIn":{"description":"Up to 2 other languages the brand also posts in, as BCP 47 tags; offered first when translating","maxItems":2,"type":"array","items":{"type":"string","minLength":1,"maxLength":35}},"dialect":{"description":"For Arabic: the dialect to write in","type":"string","enum":["egyptian","gulf","levantine","maghrebi","msa"]},"avoid":{"description":"Words and phrases to avoid (the composer warns, never blocks)","maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"audience":{"description":"Who the brand talks to","type":"string","maxLength":600},"hashtagSets":{"description":"Named sets of hashtags, up to 12","maxItems":12,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"tags":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string"}}},"required":["name","tags"]}},"templates":{"description":"Named caption templates; {slot} marks a placeholder","maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"text":{"type":"string","minLength":1,"maxLength":2200}},"required":["name","text"]}},"links":{"description":"Named links; utm adds UTM tags with the platform filled in","maxItems":12,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":40},"url":{"type":"string","maxLength":500,"format":"uri"},"utm":{"default":true,"type":"boolean"}},"required":["label","url"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitChange"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform-options":{"get":{"operationId":"getPlatformOptions","tags":["Platforms"],"summary":"Describe platform options","description":"Per platform: post formats, caption limits, media rules and the `options` each target accepts, as JSON Schema.\n\nScope: `read`.","x-scope":"read","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformOptions"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}/youtube-playlists":{"get":{"operationId":"getAccountsByIdYoutubePlaylists","tags":["Platforms"],"summary":"List a YouTube channel's playlists","description":"To pass as `options.playlistIds` on a YouTube target.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The YouTube account's id"},"description":"The YouTube account's id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":{}}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}/tiktok-creator-info":{"get":{"operationId":"getAccountsByIdTiktokCreatorInfo","tags":["Platforms"],"summary":"Get TikTok creator info","description":"TikTok requires showing the creator's nickname and only the privacy levels their account allows before posting.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The TikTok account's id"},"description":"The TikTok account's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TikTokCreatorInfo"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns":{"get":{"operationId":"getCampaigns","tags":["Campaigns"],"summary":"List campaigns","description":"The campaigns this key can see, by name: every-brand ones and those of its brands. With `brand`, only the campaigns that brand's posts can take.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":false,"schema":{"description":"Only this brand","type":"string"},"description":"Only this brand"},{"name":"includeArchived","in":"query","required":false,"schema":{"description":"Include archived campaigns","type":"string","enum":["true","false"]},"description":"Include archived campaigns"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postCampaigns","tags":["Campaigns"],"summary":"Create a campaign","description":"For one brand, or for every brand when `brandId` is left out (keys that see every brand, made by an owner or admin). Starts hidden from client reports. Names are unique per brand, ignoring case.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"brandId":{"description":"The brand it's for; null or left out for every brand","nullable":true,"type":"string"},"color":{"type":"string","enum":["teal","rust","olive","plum","indigo","pine","berry","ochre"]}},"required":["name"]},"example":{"name":"Black Friday","brandId":"b_123","color":"rust"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts":{"get":{"operationId":"getPosts","tags":["Posts"],"summary":"List posts","description":"Scheduled and published posts between two times, earliest first. Defaults to 30 days back and 90 days ahead; at most a year at a time. Drafts are under /v1/posts/drafts.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":false,"schema":{"description":"Only this brand","type":"string"},"description":"Only this brand"},{"name":"from","in":"query","required":false,"schema":{"description":"Start, inclusive (ISO 8601 with offset)","type":"string","format":"date-time"},"description":"Start, inclusive (ISO 8601 with offset)"},{"name":"to","in":"query","required":false,"schema":{"description":"End, exclusive (ISO 8601 with offset)","type":"string","format":"date-time"},"description":"End, exclusive (ISO 8601 with offset)"},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending_approval","scheduled","publishing","published","partially_published","failed","awaiting_user","waiting_limit"]}},{"name":"campaign","in":"query","required":false,"schema":{"description":"Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns)","type":"string"},"description":"Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PostSummary"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPosts","tags":["Posts"],"summary":"Create a post","description":"schedule.mode: \"draft\", \"now\", \"queue\" (the brand's next free slot) or \"at\" with an ISO 8601 time. Each target needs `socialAccountId`, `format` and `options` (see /v1/platform-options). A post that would go out needs the publish scope; without it, the post waits for approval.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","description":"The brand the post belongs to"},"caption":{"default":"","description":"Each platform's own limit applies too","type":"string","maxLength":63206},"mediaIds":{"default":[],"description":"Uploaded media, in order","maxItems":35,"type":"array","items":{"type":"string"}},"targets":{"minItems":1,"type":"array","items":{"type":"object","properties":{"socialAccountId":{"type":"string","description":"An account of the brand"},"format":{"type":"string","enum":["video","short","reel","feed","carousel","story"],"description":"Which formats each platform takes: see platform options"},"options":{"default":{},"description":"Per platform, such as a YouTube title or TikTok privacy level","type":"object","additionalProperties":{}}},"required":["socialAccountId","format"]},"description":"Where it goes: one entry per account"},"schedule":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["draft"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["now"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["queue"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["at"]},"at":{"description":"When mode is at: the time, ISO 8601 with offset","type":"string","format":"date-time"}},"required":["mode","at"]}],"description":"draft saves it, now posts at once, queue takes the brand's next free slot, at posts at a time"},"campaignIds":{"description":"Campaign ids (see list_campaigns). Left out on an edit: the post keeps its campaigns. Empty list: no campaigns.","maxItems":10,"type":"array","items":{"type":"string"}},"confirmRepeat":{"description":"Only after the person said yes: post again to Instagram or TikTok accounts that already published one of these files. They may show a repeated post to fewer people.","type":"array","items":{"type":"string","enum":["instagram","tiktok"]}},"paidPartnership":{"description":"true for a paid partnership, sponsorship or gifted product: turns on Instagram's Paid partnership label, YouTube's \"Includes paid promotion\" and, once TikTok has approved Tempocast, TikTok's Branded content on a direct post. Facebook has no label apps can set.","type":"boolean"}},"required":["brandId","targets","schedule"]},"example":{"brandId":"b_123","caption":"Autumn blend is back.","mediaIds":["m_456"],"targets":[{"socialAccountId":"a_789","format":"reel","options":{}}],"schedule":{"mode":"at","at":"2026-12-05T09:00:00+01:00"}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/drafts":{"get":{"operationId":"getPostsDrafts","tags":["Posts"],"summary":"List drafts and posts waiting for approval","description":"Scope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":false,"schema":{"description":"Only this brand","type":"string"},"description":"Only this brand"},{"name":"campaign","in":"query","required":false,"schema":{"description":"Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns)","type":"string"},"description":"Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PostSummary"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}":{"get":{"operationId":"getPostsById","tags":["Posts"],"summary":"Get a post","description":"With each account's status, error and link, and the latest numbers once published.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchPostsById","tags":["Posts"],"summary":"Update a post","description":"Send only the fields to change; `targets` and `mediaIds` are replaced whole. Only for posts that haven't started publishing.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"caption":{"description":"Each platform's own limit applies too","type":"string","maxLength":63206},"mediaIds":{"description":"Uploaded media, in order. Replaces the list","maxItems":35,"type":"array","items":{"type":"string"}},"targets":{"description":"Where it goes: one entry per account. Replaces the list","minItems":1,"type":"array","items":{"type":"object","properties":{"socialAccountId":{"type":"string"},"format":{"type":"string","enum":["video","short","reel","feed","carousel","story"]},"options":{"type":"object","additionalProperties":{}}},"required":["socialAccountId","format"]}},"schedule":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["draft"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["now"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["queue"]}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["at"]},"at":{"description":"When mode is at: the time, ISO 8601 with offset","type":"string","format":"date-time"}},"required":["mode","at"]}],"description":"draft saves it, now posts at once, queue takes the brand's next free slot, at posts at a time"},"campaignIds":{"description":"Campaign ids (see /v1/campaigns). Replaces the list; an empty list removes every campaign","maxItems":10,"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePostsById","tags":["Posts"],"summary":"Delete a post","description":"Published posts stay on the platforms.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/approve":{"post":{"operationId":"postPostsByIdApprove","tags":["Posts"],"summary":"Approve a post","description":"A post waiting for approval goes out at its time. Owners and admins only. While its brandCheck has needs_a_look warnings nobody checked, it answers 409 with them: show them to the person, then approve again with acknowledge set to the keys they chose to approve anyway.\n\nScope: `publish`.","x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"acknowledge":{"description":"Keys of brandCheck warnings the person saw and approved anyway","maxItems":100,"type":"array","items":{"type":"string","maxLength":400}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/request-changes":{"post":{"operationId":"postPostsByIdRequestChanges","tags":["Posts"],"summary":"Ask for changes","description":"Send a post waiting for approval back to its author as a draft, with a note.\n\nScope: `publish`.","x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":1000}},"required":["note"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/reschedule":{"post":{"operationId":"postPostsByIdReschedule","tags":["Posts"],"summary":"Reschedule a post","description":"Without the publish scope, a rescheduled post waits for approval again.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{"description":"ISO 8601 time with offset","type":"string","format":"date-time"}},"required":["at"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/unschedule":{"post":{"operationId":"postPostsByIdUnschedule","tags":["Posts"],"summary":"Unschedule a post","description":"Turns a scheduled or waiting post back into a draft.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/retry":{"post":{"operationId":"postPostsByIdRetry","tags":["Posts"],"summary":"Retry a failed post","description":"Publishes the failed accounts of a failed or partly published post again, now.\n\nScope: `publish`.","x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/share":{"post":{"operationId":"postPostsByIdShare","tags":["Posts"],"summary":"Share a post with a client","description":"A private link a client opens without an account to approve the post or ask for changes. Emailed when `clientEmail` is given.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientName":{"type":"string","minLength":1,"maxLength":80},"clientEmail":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"expiresInDays":{"type":"integer","minimum":1,"maximum":30},"onTimeout":{"description":"hold (default): it doesn't go out until approved","type":"string","enum":["hold","post"]}},"required":["clientName"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientLink"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/notes":{"get":{"operationId":"getPostsByIdNotes","tags":["Posts"],"summary":"List a post's team notes","description":"Team notes never reach the platforms or a client. Needs the write scope, like the team.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NoteThread"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postPostsByIdNotes","tags":["Posts"],"summary":"Add a team note","description":"Start a thread, or reply in one with `threadId`. Write @ and a teammate's name to mention them.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The post's id"},"description":"The post's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"threadId":{"type":"string"},"topic":{"type":"string","enum":["general","caption","media","time","accounts"]}},"required":["text"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"mentioned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","threadId","mentioned"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media":{"get":{"operationId":"getMedia","tags":["Media"],"summary":"List media","description":"A brand's uploaded files, newest first. Files are removed from storage 10 days after every post using them has published, unless a post is kept as evergreen.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The brand's id"},"description":"The brand's id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media/uploads":{"post":{"operationId":"postMediaUploads","tags":["Media"],"summary":"Start an upload","description":"Returns the media item and where to send the file. single: PUT the whole file to `upload.url` with `upload.headers`. multipart (over 100 MB): PUT each `partSize` slice to its part's URL, keep each response's ETag, then complete with them. The URLs last 2 hours.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string"},"filename":{"type":"string","minLength":1,"maxLength":255},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":10737418240},"width":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"height":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"durationMs":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"tags":{"maxItems":20,"type":"array","items":{"type":"string"}}},"required":["brandId","filename","mimeType","sizeBytes"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media/uploads/{id}/complete":{"post":{"operationId":"postMediaUploadsByIdComplete","tags":["Media"],"summary":"Complete an upload","description":"After the file is sent. For multipart uploads, send `uploadId` and every part's ETag. Checks the whole file arrived.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The media item's id"},"description":"The media item's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"etag":{"type":"string"}},"required":["partNumber","etag"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media/import":{"post":{"operationId":"postMediaImport","tags":["Media"],"summary":"Import media from a link","description":"Copies an image or video from a public https link (Google Drive and Dropbox share links work) into a brand's library. Waits until it's copied.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"filename":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["brandId","url"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments":{"get":{"operationId":"getComments","tags":["Comments"],"summary":"List comment conversations","description":"Instagram, Facebook, YouTube and Threads comments on the brands' posts, newest activity first. TikTok isn't included.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":false,"schema":{"description":"Only this brand","type":"string"},"description":"Only this brand"},{"name":"platform","in":"query","required":false,"schema":{"type":"string","enum":["instagram","facebook","youtube","threads"]}},{"name":"status","in":"query","required":false,"schema":{"default":"open","type":"string","enum":["open","done"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/reply":{"post":{"operationId":"postCommentsByIdReply","tags":["Comments"],"summary":"Reply to a conversation","description":"Replies publicly as the brand, under the conversation's first comment. On Instagram and YouTube, start with the person's @handle.\n\nScope: `comments`.","x-scope":"comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The conversation's id"},"description":"The conversation's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":10000},"markDone":{"default":true,"type":"boolean"}},"required":["text"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reply"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/hide":{"post":{"operationId":"postCommentsByIdHide","tags":["Comments"],"summary":"Hide or show a comment","description":"Instagram: only the writer still sees it. Facebook: the writer and their friends. YouTube: held for review.\n\nScope: `comments`.","x-scope":"comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The comment's id"},"description":"The comment's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hidden":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"hidden":{"type":"boolean"}},"required":["id","hidden"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/comments/{id}/done":{"post":{"operationId":"postCommentsByIdDone","tags":["Comments"],"summary":"Mark a conversation done","description":"Or open again with `done: false`. For everyone in the workspace.\n\nScope: `comments`.","x-scope":"comments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The conversation's id"},"description":"The conversation's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"done":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["open","done"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/performance":{"get":{"operationId":"getAnalyticsPerformance","tags":["Analytics"],"summary":"Get performance","description":"Views, engagement rate, posts and followers gained over a rolling period, each with the period before, per platform and per brand, and the top posts. When posts are in campaigns, `campaigns` has each campaign's totals and first-7-day numbers against the period before. With `campaign`, the numbers are for those campaigns' posts only, and followers are left out. The same numbers as the Analytics page.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":false,"schema":{"description":"Only this brand","type":"string"},"description":"Only this brand"},{"name":"period","in":"query","required":false,"schema":{"default":"7d","type":"string","enum":["7d","28d","90d"]}},{"name":"platform","in":"query","required":false,"schema":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]}},{"name":"campaign","in":"query","required":false,"schema":{"description":"Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns)","type":"string"},"description":"Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Performance"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/analytics/insights":{"get":{"operationId":"getAnalyticsInsights","tags":["Analytics"],"summary":"Get insights","description":"What has worked on each account over 90 days, and what to post next. The same patterns as \"What's working\" on the Analytics page.\n\nScope: `read`.","x-scope":"read","parameters":[{"name":"brand","in":"query","required":false,"schema":{"description":"Only this brand","type":"string"},"description":"Only this brand"},{"name":"platform","in":"query","required":false,"schema":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Insights"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/board":{"get":{"operationId":"getBoard","tags":["Board"],"summary":"List a brand's content board","description":"Ideas before they're posts, in the columns idea, production, ready, scheduled and published. The board is for the team, so it needs the write scope.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"brand","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The brand's id"},"description":"The brand's id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Card"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/board/cards":{"post":{"operationId":"postBoardCards","tags":["Board"],"summary":"Add a card","description":"Goes to the top of its column (idea unless set).\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"string","maxLength":5000},"ownerId":{"description":"A teammate's user id","type":"string"},"dueOn":{"description":"YYYY-MM-DD","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"platforms":{"type":"array","items":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]}},"column":{"type":"string","enum":["idea","production","ready"]}},"required":["brandId","title"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"column":{"type":"string"}},"required":["id","column"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/board/cards/{id}/move":{"post":{"operationId":"postBoardCardsByIdMove","tags":["Board"],"summary":"Move a card","description":"To the bottom of idea, production or ready. Scheduled and published follow the card's post.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The card's id"},"description":"The card's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"column":{"type":"string","enum":["idea","production","ready"]}},"required":["column"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"column":{"type":"string"}},"required":["id","column"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/plans/current":{"get":{"operationId":"getPlansCurrent","tags":["Plans"],"summary":"Get the brand's week plan","description":"Plan my week: the drafted posts for the coming week, with accounts, times, captions and what each item still needs. Team only, so it needs the write scope. Paid plans.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"brand","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The brand's id"},"description":"The brand's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeekPlan"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/plans":{"post":{"operationId":"postPlans","tags":["Plans"],"summary":"Draft this week's plan","description":"Starts drafting now; it takes a minute or two, then read it with GET /v1/plans/current. Spends the brand's plan AI actions. At most 3 runs per brand per week.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","minLength":1}},"required":["brandId"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string"},"status":{"type":"string"}},"required":["planId","status"],"additionalProperties":{}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/plans/items/{id}":{"patch":{"operationId":"patchPlansItemsById","tags":["Plans"],"summary":"Change a planned item","description":"Captions per account, the YouTube title, the time, a platform choice (TikTok privacy, made for kids) or remove. Only before the item is approved.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The plan item's id"},"description":"The plan item's id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"captions":{"type":"array","items":{"type":"object","properties":{"socialAccountId":{"type":"string"},"caption":{"type":"string","maxLength":5000}},"required":["socialAccountId","caption"]}},"youtubeTitle":{"type":"string","minLength":1,"maxLength":100},"at":{"description":"New time, ISO 8601 with offset","type":"string","format":"date-time"},"privacyLevel":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"tiktokInboxOk":{"type":"boolean"},"madeForKids":{"type":"boolean"},"captionChecked":{"type":"boolean"},"remove":{"type":"boolean"},"restore":{"description":"Put back a removed item","type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"itemId":{"type":"string"},"kind":{"type":"string"},"state":{"type":"string"},"at":{"type":"string"}},"required":["itemId","kind","state","at"],"additionalProperties":{}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/plans/approve":{"post":{"operationId":"postPlansApprove","tags":["Plans"],"summary":"Approve the week plan","description":"Schedules the ready posts and puts ideas on the board. Without the publish scope, posts wait for a person to approve them. Items that would repeat a file on Instagram or TikTok are skipped unless listed in repeatOk.\n\nScope: `write`.","x-scope":"write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"type":"string","description":"Brand id"},"itemIds":{"maxItems":100,"type":"array","items":{"type":"string"}},"repeatOk":{"description":"Item ids the person said may post again","maxItems":100,"type":"array","items":{"type":"string"}},"clientLink":{"type":"boolean"}},"required":["brandId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeekPlanApproval"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"getWebhooks","tags":["Webhooks"],"summary":"List webhooks","description":"Scope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"postWebhooks","tags":["Webhooks"],"summary":"Add a webhook","description":"The URL must be https on a public host name; redirects aren't followed. `secret` signs every delivery and is returned only here, so store it now. Not idempotent: a retry adds a second endpoint (a workspace can have 10).\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"description":"https only, a public host name, the standard port"},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["post.published","post.failed","comment.received","account.disconnected"]},"description":"Which events to send"},"brandId":{"description":"Only this brand's events. Keys limited to some brands must set it","nullable":true,"type":"string"},"description":{"description":"A note for your team, shown in Settings","nullable":true,"type":"string","maxLength":120},"format":{"description":"\"auto\" (default): a Slack, Microsoft Teams, Discord or Google Chat webhook URL gets a readable message. \"json\": always the event, for your own Power Automate or Logic Apps flow","type":"string","enum":["auto","json"]}},"required":["url","events"]},"example":{"url":"https://hooks.example.com/tempocast","events":["post.published","post.failed"],"description":"Posting log"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"whsec_…, shown once"}},"required":["webhook","secret"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"get":{"operationId":"getWebhooksById","tags":["Webhooks"],"summary":"Get a webhook","description":"Scope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The webhook's id"},"description":"The webhook's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"patchWebhooksById","tags":["Webhooks"],"summary":"Change a webhook","description":"Send only the fields to change. `active: true` turns back on an endpoint that was turned off; events from while it was off aren't sent.\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The webhook's id"},"description":"The webhook's id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key when retrying: you get the first result back instead of doing it twice. Kept for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["post.published","post.failed","comment.received","account.disconnected"]}},"brandId":{"description":"null for every brand","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string","maxLength":120},"format":{"description":"\"auto\" (default): a Slack, Microsoft Teams, Discord or Google Chat webhook URL gets a readable message. \"json\": always the event, for your own Power Automate or Logic Apps flow","type":"string","enum":["auto","json"]},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"This Idempotency-Key was used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhooksById","tags":["Webhooks"],"summary":"Remove a webhook","description":"Deliveries still waiting are dropped.\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The webhook's id"},"description":"The webhook's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/rotate-secret":{"post":{"operationId":"postWebhooksByIdRotateSecret","tags":["Webhooks"],"summary":"Rotate the signing secret","description":"Returns a new secret, shown once. For 24 hours each delivery carries two `v1` signatures, one with each secret, so you can switch without missing events.\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The webhook's id"},"description":"The webhook's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string"}},"required":["webhook","secret"],"additionalProperties":false}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"operationId":"postWebhooksByIdTest","tags":["Webhooks"],"summary":"Send a test event","description":"Sends a signed `webhook.test` event now and returns what the endpoint answered. Tests are tried once and don't count towards turning an endpoint off.\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The webhook's id"},"description":"The webhook's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"operationId":"getWebhooksByIdDeliveries","tags":["Webhooks"],"summary":"List deliveries","description":"The last 100, newest first. Deliveries are kept for 30 days.\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The webhook's id"},"description":"The webhook's id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"nextCursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-deliveries/{id}/resend":{"post":{"operationId":"postWebhookDeliveriesByIdResend","tags":["Webhooks"],"summary":"Send a delivery again","description":"Sends the same event (same `id`) now, once, and returns what the endpoint answered.\n\nScope: `webhooks`.","x-scope":"webhooks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The delivery's id"},"description":"The delivery's id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"}}}},"400":{"description":"The request isn't valid. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, an unknown key, or a revoked or expired one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope, its maker can't do this, or its maker is no longer an owner or admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such route, or the item doesn't exist or isn't visible to this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The item isn't in a state that allows this, or a request with this Idempotency-Key is still running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key from Settings > API, starting tc_live_"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","enum":["invalid","unauthorized","forbidden","not_found","method_not_allowed","conflict","too_large","unprocessable","rate_limited","internal","not_configured"]},"message":{"type":"string","description":"Written for a person: safe to show as is."},"details":{"type":"array","items":{"type":"string"}},"requestId":{"type":"string"}}}}},"Me":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"key":{"type":"object","properties":{"id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","publish","comments","webhooks"]}},"brandIds":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","scopes","brandIds"],"additionalProperties":false},"actingAs":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string"}},"required":["userId","role"],"additionalProperties":false},"limits":{"type":"object","properties":{"requestsPerMinutePerKey":{"type":"number"},"requestsPerMinutePerWorkspace":{"type":"number"}},"required":["requestsPerMinutePerKey","requestsPerMinutePerWorkspace"],"additionalProperties":false}},"required":["workspace","key","actingAs","limits"],"additionalProperties":false},"Brand":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string","description":"IANA time zone the brand's times are shown in"},"color":{"type":"string"},"requireApproval":{"type":"boolean","description":"Posts by editors, or by keys without the publish scope, wait for approval"},"accountCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","timezone","color","requireApproval","accountCount","createdAt"],"additionalProperties":false},"Account":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":"string"},"platform":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]},"name":{"type":"string"},"handle":{"nullable":true,"type":"string"},"avatarUrl":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["active","needs_reconnect","disconnected"],"description":"needs_reconnect: reconnect it in the app before posting"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","brandId","platform","name","handle","avatarUrl","status","createdAt"],"additionalProperties":false},"BrandKit":{"type":"object","properties":{"brand":{"type":"string"},"timezone":{"type":"string"},"kit":{"type":"object","additionalProperties":{}},"empty":{"type":"boolean"},"topPosts":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["brand","timezone","kit","empty","topPosts"],"additionalProperties":{}},"BrandKitChange":{"type":"object","properties":{"brand":{"type":"string"},"changed":{"type":"array","items":{"type":"string"}},"kit":{"type":"object","additionalProperties":{}}},"required":["brand","changed","kit"],"additionalProperties":{}},"PlatformOptions":{"type":"object","additionalProperties":{"type":"object","properties":{"label":{"type":"string"},"captionLimit":{"type":"number"},"formats":{"type":"object","additionalProperties":{}},"options":{}},"required":["label","captionLimit","formats","options"],"additionalProperties":{}}},"TikTokCreatorInfo":{"type":"object","additionalProperties":{}},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","description":"One of Tempocast's campaign colours, by name"},"brandId":{"nullable":true,"description":"The brand it's for, or null for every brand","type":"string"},"archived":{"type":"boolean","description":"Archived campaigns keep their posts and numbers but can't be added to posts"},"posts":{"description":"Posts in this campaign","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"published":{"description":"Published copies in this campaign","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastUsedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","name","color","brandId","archived"],"additionalProperties":false},"PostSummary":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partially_published","failed","awaiting_user","waiting_limit"]},"caption":{"type":"string"},"scheduledAt":{"nullable":true,"type":"string","format":"date-time"},"targets":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]},"format":{"type":"string","enum":["video","short","reel","feed","carousel","story"]},"status":{"type":"string","enum":["pending","queued","publishing","processing","published","failed","cancelled","awaiting_user","not_posted","waiting_limit","needs_check"]},"permalink":{"nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"}},"required":["platform","format"],"additionalProperties":false}},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRef"}},"changesRequested":{"nullable":true,"type":"object","properties":{"note":{"type":"string"},"by":{"type":"string"}},"required":["note","by"],"additionalProperties":false}},"required":["id","brandId","status","caption","scheduledAt","targets","campaigns","changesRequested"],"additionalProperties":false},"CampaignRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"Post":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":"string"},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partially_published","failed","awaiting_user","waiting_limit"]},"caption":{"type":"string"},"scheduledAt":{"nullable":true,"type":"string","format":"date-time"},"media":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio"]},"filename":{"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["id","kind","filename","url"],"additionalProperties":false}},"targets":{"type":"array","items":{"$ref":"#/components/schemas/Target"}},"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRef"},"description":"The post's campaigns"},"changesRequested":{"nullable":true,"description":"A draft an approver sent back, with what to change","type":"object","properties":{"note":{"type":"string"},"by":{"type":"string"}},"required":["note","by"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}},"brandCheck":{"$ref":"#/components/schemas/BrandCheck"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","brandId","status","caption","scheduledAt","media","targets","campaigns","changesRequested","brandCheck","createdAt","updatedAt"],"additionalProperties":false},"Target":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"platform":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]},"format":{"type":"string","enum":["video","short","reel","feed","carousel","story"]},"options":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["pending","queued","publishing","processing","published","failed","cancelled","awaiting_user","not_posted","waiting_limit","needs_check"]},"permalink":{"nullable":true,"type":"string"},"error":{"nullable":true,"type":"string"},"publishedAt":{"nullable":true,"type":"string","format":"date-time"},"results":{"description":"Published targets: the latest numbers the platform reported","type":"object","properties":{"views":{"nullable":true,"type":"number"},"likes":{"nullable":true,"type":"number"},"comments":{"nullable":true,"type":"number"},"shares":{"nullable":true,"type":"number"},"saves":{"nullable":true,"type":"number"},"updatedAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["views","likes","comments","shares","saves","updatedAt"],"additionalProperties":false}},"required":["id","accountId","platform","format","options","status","permalink","error","publishedAt"],"additionalProperties":false},"BrandCheck":{"type":"object","properties":{"summary":{"type":"string","description":"\"All clear\", \"2 to look at\" or \"1 suggestion\""},"open":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"needs_a_look warnings nobody checked"},"suggestions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"savedAt":{"description":"Publishing started: the check as it stood then, never recomputed","type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Pass it in acknowledge when approving"},"kind":{"type":"string","enum":["avoid","paid_label","ai_label","kids_mismatch","kids_paid","alt_text"]},"level":{"type":"string","enum":["needs_a_look","suggestion","note"]},"message":{"type":"string"},"fix":{"type":"string"},"checked":{"nullable":true,"type":"object","properties":{"by":{"type":"string"},"at":{"type":"string"},"via":{"type":"string","enum":["app","claude","approve"]},"reason":{"type":"string"}},"required":["by","at","via"],"additionalProperties":false}},"required":["key","kind","level","message","checked"],"additionalProperties":false}}},"required":["summary","open","suggestions","items"],"additionalProperties":false,"description":"Brand check (rules only, never blocks a post): words to avoid, missing disclosure labels, made for kids, alt text"},"ClientLink":{"type":"object","properties":{"url":{"type":"string"},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"type":"string","format":"date-time"},"emailed":{"type":"boolean"}},"required":["url","posts","expiresAt","emailed"],"additionalProperties":false},"NoteThread":{"type":"object","properties":{"id":{"type":"string"},"topic":{"type":"string"},"resolvedAt":{"nullable":true,"type":"string","format":"date-time"},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"by":{"type":"string"},"text":{"type":"string"},"at":{"type":"string","format":"date-time"}},"required":["id","by","text","at"],"additionalProperties":false}}},"required":["id","topic","resolvedAt","notes"],"additionalProperties":false},"Media":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio"],"description":"audio: a voiceover made with ElevenLabs. It can't be posted on its own"},"filename":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"durationMs":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"}},"uploaded":{"type":"boolean","description":"False until the upload is completed"},"aiGenerated":{"type":"boolean","description":"Made with HeyGen or ElevenLabs from Tempocast"},"draft":{"type":"boolean","description":"A generated file nobody has marked as reviewed yet. Watch or listen to it before posting"},"url":{"nullable":true,"description":"Public URL. Null once the file is removed from storage (10 days after publishing, unless kept as evergreen)","type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","brandId","kind","filename","mimeType","sizeBytes","width","height","durationMs","tags","uploaded","aiGenerated","draft","url","createdAt"],"additionalProperties":false},"Upload":{"type":"object","properties":{"media":{"$ref":"#/components/schemas/Media"},"upload":{"$ref":"#/components/schemas/UploadPlan"}},"required":["media","upload"],"additionalProperties":false},"UploadPlan":{"type":"object","properties":{"mode":{"type":"string","enum":["single","multipart","proxy"],"description":"single: one PUT. multipart: one PUT per part, then complete with each part's ETag"},"method":{"type":"string","enum":["PUT"]},"url":{"description":"single and proxy: where to PUT the whole file","type":"string"},"headers":{"description":"Headers to send with the PUT","type":"object","additionalProperties":{"type":"string"}},"uploadId":{"description":"multipart: pass back to complete","type":"string"},"partSize":{"description":"multipart: bytes per part (the last part is shorter)","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"parts":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["partNumber","url"],"additionalProperties":false}},"expiresAt":{"type":"string","format":"date-time","description":"The URLs stop working after this"}},"required":["mode","method","expiresAt"],"additionalProperties":false},"Conversation":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":"string"},"platform":{"type":"string","enum":["instagram","facebook","youtube","threads"]},"accountHandle":{"type":"string"},"post":{"type":"object","properties":{"title":{"type":"string"},"link":{"nullable":true,"type":"string"}},"required":["title","link"],"additionalProperties":false},"status":{"type":"string","enum":["open","done"]},"canReply":{"type":"boolean","description":"False until the account is reconnected in the app"},"comment":{"$ref":"#/components/schemas/Comment"},"replies":{"type":"array","items":{"$ref":"#/components/schemas/Comment"}},"lastActivityAt":{"type":"string","format":"date-time"}},"required":["id","brandId","platform","accountHandle","post","status","canReply","comment","replies","lastActivityAt"],"additionalProperties":false},"Comment":{"type":"object","properties":{"id":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"},"handle":{"nullable":true,"type":"string"},"isBrand":{"type":"boolean"}},"required":["name","handle","isBrand"],"additionalProperties":false},"text":{"nullable":true,"description":"Null when the comment was deleted on the platform","type":"string"},"at":{"type":"string","format":"date-time"},"hidden":{"type":"boolean"},"replyState":{"nullable":true,"description":"Replies sent from Tempocast","type":"string","enum":["sending","sent","failed"]},"error":{"nullable":true,"type":"string"}},"required":["id","author","text","at","hidden","replyState","error"],"additionalProperties":false},"Reply":{"type":"object","properties":{"commentId":{"nullable":true,"type":"string"},"state":{"type":"string","enum":["sending","sent","failed"]},"error":{"nullable":true,"type":"string"}},"required":["commentId","state","error"],"additionalProperties":false},"Performance":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"number"},"timezone":{"type":"string"}},"required":["from","to","days","timezone"],"additionalProperties":false},"updatedAt":{}},"required":["period","updatedAt"],"additionalProperties":{}},"Insights":{"type":"object","properties":{"insights":{"type":"array","items":{"type":"object","additionalProperties":{}}},"suggestions":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["insights","suggestions"],"additionalProperties":{}},"Card":{"type":"object","properties":{"id":{"type":"string"},"brandId":{"type":"string"},"title":{"type":"string"},"brief":{"type":"string"},"column":{"type":"string","enum":["idea","production","ready","scheduled","published"]},"owner":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"dueOn":{"nullable":true,"description":"YYYY-MM-DD in the brand's time zone","type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["youtube","instagram","facebook","tiktok","threads","linkedin","bluesky"]}},"mediaIds":{"type":"array","items":{"type":"string"}},"post":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"scheduledAt":{"nullable":true,"type":"string","format":"date-time"}},"required":["id","status","scheduledAt"],"additionalProperties":false},"openNotes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","brandId","title","brief","column","owner","dueOn","platforms","mediaIds","post","openNotes"],"additionalProperties":false},"WeekPlan":{"type":"object","properties":{"settings":{"type":"object","additionalProperties":{}},"plan":{"nullable":true,"type":"object","additionalProperties":{}},"items":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["settings","plan","items"],"additionalProperties":{}},"WeekPlanApproval":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string"},"result":{"type":"string"}},"required":["itemId","result"],"additionalProperties":{}}}},"required":["results"],"additionalProperties":{}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"description":{"nullable":true,"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["post.published","post.failed","comment.received","account.disconnected"]}},"brandId":{"nullable":true,"description":"Only this brand's events, or null for every brand","type":"string"},"format":{"type":"string","enum":["auto","json"],"description":"\"auto\": chat apps' webhook URLs get a readable message; \"json\": always the event"},"chatApp":{"nullable":true,"description":"The chat app a message is sent to, or null when the event JSON is sent","type":"string","enum":["slack","teams","discord","google_chat"]},"active":{"type":"boolean","description":"False once turned off, by hand or after 3 days of failed deliveries"},"disabledReason":{"nullable":true,"type":"string"},"failingSince":{"nullable":true,"description":"When deliveries started failing, if they still are","type":"string","format":"date-time"},"rotating":{"type":"boolean","description":"True for 24 hours after a secret rotation, while the old secret also signs"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","url","description","events","brandId","format","chatApp","active","disabledReason","failingSince","rotating","createdAt"],"additionalProperties":false},"WebhookTestResult":{"type":"object","properties":{"deliveryId":{"type":"string"},"ok":{"type":"boolean","description":"True when the endpoint answered 2xx within 10 seconds"},"status":{"nullable":true,"description":"The endpoint's HTTP status","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"nullable":true,"type":"string"},"ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long it took to answer"}},"required":["deliveryId","ok","status","error","ms"],"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string","description":"The same for every endpoint and every resend of one event: deduplicate on it"},"type":{"type":"string","enum":["post.published","post.failed","comment.received","account.disconnected","webhook.test"]},"status":{"type":"string","enum":["pending","sent","failed"],"description":"pending: waiting for its next try; sent: answered 2xx; failed: gave up"},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"responseStatus":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"nullable":true,"type":"string"},"nextAttemptAt":{"nullable":true,"type":"string","format":"date-time"},"deliveredAt":{"nullable":true,"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","eventId","type","status","attempts","responseStatus","error","nextAttemptAt","deliveredAt","createdAt"],"additionalProperties":false}}}}