{"openapi":"3.1.0","info":{"title":"PaidPost API","version":"1.0.0","description":"Schedule and publish your own videos to your connected Instagram, TikTok, YouTube, Facebook, LinkedIn, X, Threads, Pinterest and Bluesky accounts. Needs the $29 a month access. Send your key as Authorization: Bearer sk_live_... Every error is {\"error\":{\"code\",\"message\"}}. 600 requests a minute per key."},"servers":[{"url":"https://paidpost.ai/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key from Settings > API (sk_live_...). Scopes: read, publish."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"A stable code such as invalid_request, unauthorized, key_revoked, insufficient_scope, payment_required, rate_limited, not_found, gap, repost, idempotency_key_reused."},"message":{"type":"string","description":"Plain words, safe to show."},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"account_id":{"type":["string","null"]}}}}}}}},"Account":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"account"},"platform":{"type":"string","enum":["instagram","facebook","tiktok","youtube","linkedin","x","threads","pinterest","bluesky","test"]},"handle":{"type":"string"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["connected","needs_reconnect"]},"status_note":{"type":["string","null"]},"timezone":{"type":"string","description":"IANA time zone of the slots"},"slots":{"type":"array","items":{"type":"string","description":"HH:MM"}},"next_slot_at":{"type":["string","null"],"format":"date-time","description":"The next free queue slot"},"scheduled_count":{"type":"integer"},"posts_last_24h":{"type":"integer"},"daily_limit":{"type":"integer"},"limit_scope":{"type":"string","enum":["account","app"]},"token_expires_at":{"type":["string","null"],"format":"date-time"},"backoff_until":{"type":["string","null"],"format":"date-time"}}},"Media":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"media"},"kind":{"type":"string","enum":["video","image"]},"filename":{"type":"string"},"content_type":{"type":"string"},"bytes":{"type":"integer"},"sha256":{"type":"string"},"source":{"type":"string","enum":["upload","variant"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"Post":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"post"},"account_id":{"type":"string"},"platform":{"type":"string"},"handle":{"type":"string"},"media_id":{"type":"string","description":"The first file"},"media":{"type":"array","description":"Every file in order. A single video is one entry.","items":{"type":"object","properties":{"id":{"type":"string"},"alt":{"type":["string","null"]}}}},"caption":{"type":"string","description":"Sent exactly as written."},"status":{"type":"string","description":"published is Buffer's sent; failed is Buffer's error.","enum":["scheduled","publishing","published","failed","cancelled"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"published_at":{"type":["string","null"],"format":"date-time"},"platform_post_id":{"type":["string","null"],"description":"The post's id on the platform"},"url":{"type":["string","null"],"description":"The live post"},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"waiting_reason":{"type":["string","null"],"description":"Why a due post is waiting (daily limit, a check, the platform asked us to slow down)."},"attempts":{"type":"integer"},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"allow_repost":{"type":"boolean"},"instagram":{"type":["object","null"],"properties":{"trial":{"type":"boolean"},"trial_graduation":{"type":["string","null"]},"cover_offset_ms":{"type":["integer","null"]}}},"tiktok":{"type":["object","null"],"properties":{"privacy":{"type":["string","null"]},"allow_comment":{"type":"boolean"},"allow_duet":{"type":"boolean"},"allow_stitch":{"type":"boolean"},"own_brand":{"type":"boolean"}}},"youtube":{"type":["object","null"],"properties":{"title":{"type":["string","null"]},"privacy":{"type":"string"}}},"cover":{"type":["object","null"],"properties":{"at_ms":{"type":["integer","null"]},"image_id":{"type":["string","null"]}}},"first_comment":{"type":["object","null"],"properties":{"text":{"type":"string"},"status":{"type":"string","enum":["pending","posting","posted","failed"]},"comment_id":{"type":["string","null"]},"error":{"type":["string","null"]}}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"PostCreate":{"type":"object","required":["account_ids"],"additionalProperties":false,"description":"One post is made per account. Send exactly one of media_id, video_url or media, and at most one of schedule_at, queue or now (none = queue). Each account's platform is checked against the files: Instagram up to 10 (JPEG images, videos mixed), Facebook up to 10 photos or one video, TikTok 2 to 35 images (10 here, JPEG or WebP) or one video, YouTube one video only, LinkedIn up to 10 images or one video, X up to 4 images or one video, Threads up to 10 mixed, Pinterest one image, 2 to 5 images or one video, Bluesky up to 4 images of 1 MB or one video. A refusal is a 409 with code media and one problem per platform.","properties":{"account_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50},"media_id":{"type":"string","description":"From POST /media"},"media":{"type":"array","minItems":1,"maxItems":10,"description":"Photos and carousels: files from POST /media in order. alt is sent where the platform takes it (Bluesky, X, LinkedIn, Pinterest).","items":{"type":"object","required":["id"],"additionalProperties":false,"properties":{"id":{"type":"string"},"alt":{"type":["string","null"],"maxLength":1000}}}},"video_url":{"type":"string","description":"A public https link to an MP4, MOV or WebM; downloaded once"},"filename":{"type":"string"},"caption":{"type":"string","description":"Taken exactly as sent","default":""},"captions":{"type":"object","description":"Optional caption per platform, keyed by platform (instagram, facebook, tiktok, youtube, linkedin, x, threads, pinterest, bluesky). An account whose platform has one posts it; the others post caption. Each is checked against its platform's limit (X 280, Bluesky 300).","propertyNames":{"enum":["instagram","facebook","tiktok","youtube","linkedin","x","threads","pinterest","bluesky","test"]},"additionalProperties":{"type":"string","maxLength":5000}},"first_comment":{"type":"string","description":"Instagram only. Posted on the reel once it is live."},"schedule_at":{"type":"string","description":"ISO 8601, e.g. 2026-12-05T18:00:00Z","format":"date-time"},"queue":{"type":"boolean","description":"The account's next free slot"},"now":{"type":"boolean","description":"As soon as the publisher runs (within 5 minutes)"},"instagram":{"type":"object","additionalProperties":false,"properties":{"trial":{"type":"boolean","description":"Post as a trial reel (shown to non-followers first)."},"trial_graduation":{"type":"string","description":"How a trial reel graduates to followers.","enum":["MANUAL","SS_PERFORMANCE"]},"cover_offset_ms":{"type":"integer","description":"The frame used as the cover, in milliseconds from the start.","minimum":0}}},"tiktok":{"type":"object","additionalProperties":false,"properties":{"privacy":{"type":"string","description":"Who can see the post. Required for TikTok: TikTok allows no default.","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"allow_comment":{"type":"boolean"},"allow_duet":{"type":"boolean"},"allow_stitch":{"type":"boolean"},"own_brand":{"type":"boolean","description":"Promotional content label: the post promotes the account's own business."}}},"youtube":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"Required for YouTube, 100 characters at most."},"privacy":{"type":"string","enum":["public","unlisted","private"]}}},"pinterest":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"Pin title, 100 characters at most."},"board_id":{"type":"string","description":"The board to pin to. The account's first board when missing."},"link":{"type":"string","description":"Where the Pin opens: a full https:// address."}}},"cover":{"type":"object","additionalProperties":false,"description":"Cover for platforms that take one: a frame (Instagram, TikTok, Pinterest) or an image (Instagram JPEG, YouTube, Facebook). Others use their own frame.","properties":{"at_ms":{"type":["integer","null"],"description":"The frame, in ms from the start. null removes it."},"image_url":{"type":["string","null"],"description":"A public https JPEG or PNG, up to 2 MB, downloaded once. null removes it."}}},"allow_repost":{"type":"boolean","description":"Schedule the same file on two accounts within 24 hours anyway"}}},"PostPatch":{"type":"object","additionalProperties":false,"description":"Only a post that has not started going out can change.","properties":{"caption":{"type":"string"},"schedule_at":{"type":"string","format":"date-time"},"now":{"type":"boolean"},"first_comment":{"type":["string","null"],"description":"null removes it"},"instagram":{"type":"object","additionalProperties":false,"properties":{"trial":{"type":"boolean","description":"Post as a trial reel (shown to non-followers first)."},"trial_graduation":{"type":"string","description":"How a trial reel graduates to followers.","enum":["MANUAL","SS_PERFORMANCE"]},"cover_offset_ms":{"type":"integer","description":"The frame used as the cover, in milliseconds from the start.","minimum":0}}},"tiktok":{"type":"object","additionalProperties":false,"properties":{"privacy":{"type":"string","description":"Who can see the post. Required for TikTok: TikTok allows no default.","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"allow_comment":{"type":"boolean"},"allow_duet":{"type":"boolean"},"allow_stitch":{"type":"boolean"},"own_brand":{"type":"boolean","description":"Promotional content label: the post promotes the account's own business."}}},"youtube":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"Required for YouTube, 100 characters at most."},"privacy":{"type":"string","enum":["public","unlisted","private"]}}},"pinterest":{"type":"object","additionalProperties":false,"properties":{"title":{"type":"string","description":"Pin title, 100 characters at most."},"board_id":{"type":"string","description":"The board to pin to. The account's first board when missing."},"link":{"type":"string","description":"Where the Pin opens: a full https:// address."}}},"cover":{"type":"object","additionalProperties":false,"description":"Cover for platforms that take one: a frame (Instagram, TikTok, Pinterest) or an image (Instagram JPEG, YouTube, Facebook). Others use their own frame.","properties":{"at_ms":{"type":["integer","null"],"description":"The frame, in ms from the start. null removes it."},"image_url":{"type":["string","null"],"description":"A public https JPEG or PNG, up to 2 MB, downloaded once. null removes it."}}},"allow_repost":{"type":"boolean"}}},"Metrics":{"type":"object","properties":{"object":{"const":"post_metrics"},"post_id":{"type":"string"},"platform":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":["string","null"]},"source":{"type":["string","null"]},"read_at":{"type":["string","null"],"format":"date-time"},"views":{"type":["integer","null"]},"likes":{"type":["integer","null"]},"comments":{"type":["integer","null"]},"shares":{"type":["integer","null"]},"saves":{"type":["integer","null"]},"reach":{"type":["integer","null"]},"watch_time_ms":{"type":["integer","null"]},"avg_watch_ms":{"type":["integer","null"]},"extra":{"type":"object","additionalProperties":{"type":"number"}},"history":{"type":"array","description":"Our own readings 1 hour, 6 hours, 1 day, 3 days and 7 days after posting, oldest first.","items":{"type":"object","properties":{"read_at":{"type":["string","null"],"format":"date-time"},"views":{"type":["integer","null"]},"likes":{"type":["integer","null"]},"comments":{"type":["integer","null"]},"shares":{"type":["integer","null"]},"saves":{"type":["integer","null"]},"reach":{"type":["integer","null"]}}}}}},"Queue":{"type":"object","properties":{"object":{"const":"queue"},"account_id":{"type":"string"},"handle":{"type":"string"},"platform":{"type":"string"},"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"string"}},"next_free":{"type":"array","items":{"type":"string","format":"date-time"}}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook"},"url":{"type":"string"},"description":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["post.sent","post.failed","account.disconnected"]}},"active":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":"string","description":"Only when made or rotated. Starts with whsec_."}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook_delivery"},"webhook_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer"},"last_status_code":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"last_attempt_at":{"type":["string","null"],"format":"date-time"},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"Event":{"type":"object","description":"Sent as POST with PaidPost-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\" with the webhook secret>. Retried 8 times over about 45 hours until a 2xx answer.","properties":{"id":{"type":"string"},"object":{"const":"event"},"type":{"type":"string","enum":["post.sent","post.failed","account.disconnected","webhook.test"]},"created_at":{"type":["string","null"],"format":"date-time"},"data":{"oneOf":[{"$ref":"#/components/schemas/Post"},{"$ref":"#/components/schemas/Account"},{"type":"object"}]}}}}},"security":[{"bearer":[]}],"paths":{"/accounts":{"get":{"summary":"List connected accounts","security":[{"bearer":["read"]}],"x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/accounts/{id}":{"get":{"summary":"Get an account","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change an account's posting slots or time zone","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"string","description":"HH:MM"}},"timezone":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Disconnect an account: ask the platform to end our access where it can, delete the tokens, cancel its scheduled posts","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"account_disconnect"},"cancelled_posts":{"type":"integer"},"revoke":{"type":"object","properties":{"outcome":{"type":"string","enum":["done","failed","skipped"]},"note":{"type":["string","null"]}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/queue/slots":{"get":{"summary":"Each account's slots and next free times","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"account_id","in":"query","schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Queue"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media":{"post":{"summary":"Add a video or an image","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key to retry safely. The first answer is replayed for 24 hours; a different body under the same key is refused (422)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Public https link to the video or image"},"filename":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"A video over 200 MB or an image over 20 MB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Not an MP4, MOV or WebM video, or a JPEG, PNG or WebP image (checked by its first bytes)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The link could not be downloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media/{id}":{"get":{"summary":"Get a video or an image","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts":{"get":{"summary":"List posts","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"status","in":"query","schema":{"type":"string","description":"Comma separated: scheduled, publishing, published (or sent), failed, cancelled. Default: all but cancelled."}},{"name":"account_id","in":"query","schema":{"type":"string","description":"Comma separated account ids"}},{"name":"from","in":"query","schema":{"type":"string","description":"Scheduled at or after (ISO 8601)","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","description":"Scheduled at or before (ISO 8601)","format":"date-time"}},{"name":"order","in":"query","schema":{"type":"string","enum":["desc","asc"],"default":"desc"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string","description":"next_cursor from the previous page"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Schedule a video, an image or a carousel","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key to retry safely. The first answer is replayed for 24 hours; a different body under the same key is refused (422)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"201":{"description":"Created, one post per account","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"An account or the media is not yours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A guard rail said no: two posts within 30 minutes (gap), the same file on two accounts within 24 hours (repost), or files a platform does not take (media)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"video_url could not be downloaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}":{"get":{"summary":"Get a post","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Reschedule or edit a post before it goes out","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostPatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already going out, or a guard rail said no","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Cancel a post that has not gone out","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already published or going out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/retry":{"post":{"summary":"Put a failed post back in the queue","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key to retry safely. The first answer is replayed for 24 hours; a different body under the same key is refused (422)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not failed, or the account needs reconnecting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/posts/{id}/metrics":{"get":{"summary":"What the platform reports for a published post","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"refresh","in":"query","schema":{"type":"boolean","description":"Read again if the last read is over a minute old (default: kept 15 minutes)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"summary":"List webhooks","security":[{"bearer":["read"]}],"x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Register a webhook","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key to retry safely. The first answer is replayed for 24 hours; a different body under the same key is refused (422)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"https only"},"events":{"type":"array","items":{"type":"string","enum":["post.sent","post.failed","account.disconnected"]},"description":"Empty or left out: all events"},"description":{"type":"string"}}}}}},"responses":{"201":{"description":"Created; the secret is shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"get":{"summary":"Get a webhook","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a webhook","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"webhook"},"deleted":{"const":true}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/rotate-secret":{"post":{"summary":"Make a new signing secret","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key to retry safely. The first answer is replayed for 24 hours; a different body under the same key is refused (422)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"summary":"Send one signed test event now","security":[{"bearer":["publish"]}],"x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same key to retry safely. The first answer is replayed for 24 hours; a different body under the same key is refused (422)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"summary":"The delivery log, newest first","security":[{"bearer":["read"]}],"x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string","description":"next_cursor from the previous page"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page."}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The brand has no access subscription ($29 a month)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"post.sent":{"post":{"summary":"post.sent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery as done"}}}},"post.failed":{"post":{"summary":"post.failed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery as done"}}}},"account.disconnected":{"post":{"summary":"account.disconnected","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery as done"}}}}}}