{"openapi":"3.1.0","info":{"title":"Postacio API","version":"1.0.0","description":"Create, schedule and publish social posts in Postacio from your own software. Authenticate with an API key from Settings → API & AI agents, sent as `Authorization: Bearer pk_live_…`. Every group route answers 404 for a group the key was not given. Errors are `{ error: { code, message, param?, detail?, retry_after? } }`."},"servers":[{"url":"/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account","description":"Who a request acts as, and this document."},{"name":"Groups","description":"A group is one brand's connected accounts. A key sees only the groups it was given."},{"name":"Drafts","description":"One post or thread for one or more accounts. Plan it, schedule it, publish it and send it for approval here."},{"name":"Comments","description":"The review comments on a draft, the same ones its comment panel shows."},{"name":"Media","description":"Upload a file or import one from a link, then put it in a draft's media."},{"name":"Tags","description":"The labels posts are filed under."},{"name":"Queue","description":"A group's recurring posting slots: the times next-free-slot fills."},{"name":"Goals","description":"How often each account should post, the caps it should stay under, and how far it is this week or month."},{"name":"Analytics","description":"How published posts did, per account and for a group."},{"name":"Webhooks","description":"Subscriptions that POST draft events to your URL, and what each delivery carries."}],"paths":{"/me":{"get":{"operationId":"getMe","summary":"The key and owner this request acts as","description":"Any key.","tags":["Account"],"x-postacio-scope":"read","parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","description":"No key needed.","tags":["Account"],"security":[],"x-postacio-scope":null,"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"An OpenAPI 3.1 document."}}}}}}},"/groups":{"get":{"operationId":"listGroups","summary":"Social groups this key may use, with their accounts","description":"Any key.","tags":["Groups"],"x-postacio-scope":"read","parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}":{"get":{"operationId":"getGroup","summary":"One social group with its accounts","description":"Any key.","tags":["Groups"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/accounts":{"get":{"operationId":"listAccounts","summary":"Connected accounts of a group","description":"Any key.","tags":["Groups"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts":{"get":{"operationId":"listDrafts","summary":"Drafts and posts of a group","description":"`status=failed` includes partially failed posts.\n\nAny key.","tags":["Drafts"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","planned","scheduled","publishing","published","failed"]}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":40}},{"name":"account_id","in":"query","required":false,"description":"Only posts aimed at, or already sent through, this connected account.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"from","in":"query","required":false,"description":"Only posts whose calendar time (scheduled_at, else planned_at) is at or after this. Undated drafts drop out.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"description":"Only posts whose calendar time is before this.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"approval","in":"query","required":false,"description":"Only posts at this approval status.","schema":{"type":"string","enum":["not_requested","pending","changes_requested","approved"]}},{"name":"client_status","in":"query","required":false,"description":"Only posts at this client status: \"sent\" and \"in_review\" are with the client; \"not_sent\" was never sent.","schema":{"type":"string","enum":["not_sent","sent","in_review","approved","exempt"]}},{"name":"sort","in":"query","required":false,"description":"\"newest\" (default): newest created first. \"time\": by calendar time, earliest first.","schema":{"type":"string","enum":["newest","time"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftPage"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createDraft","summary":"Create a draft, optionally planning, scheduling or publishing it","description":"Scheduling (`publish_at` as a time or \"next-free-slot\") and `publish_at: \"now\"` need publish permission. `\"now\"` answers 202 with `publish_state: \"in_progress\"`; poll the draft until it is `finished`.\n\nAny key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraft"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}":{"get":{"operationId":"getDraft","summary":"One draft","description":"Any key.","tags":["Drafts"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"updateDraft","summary":"Change a draft (last write wins)","description":"A scheduled draft needs publish permission; a publishing or published one answers 409.\n\nAny key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraft"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteDraft","summary":"Delete a draft","description":"Anything past a plain draft (scheduled, held, published or failed) needs publish permission; a publishing one answers 409.\n\nAny key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Done; no body.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/plan":{"post":{"operationId":"planDraft","summary":"Put a draft on the calendar without publishing it","description":"Any key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanDraft"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"unplanDraft","summary":"Take a draft off the calendar","description":"Any key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/schedule":{"post":{"operationId":"scheduleDraft","summary":"Schedule a draft to publish","description":"Needs a key with publishing turned on (403 `publish_not_allowed` otherwise).","tags":["Drafts"],"x-postacio-scope":"publish","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleDraft"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"unscheduleDraft","summary":"Unschedule, keeping the date as planned","description":"Needs a key with publishing turned on (403 `publish_not_allowed` otherwise).","tags":["Drafts"],"x-postacio-scope":"publish","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/publish":{"post":{"operationId":"publishDraft","summary":"Publish now","description":"Answers at once with `publish_state: \"in_progress\"`; poll the draft until it is `finished`. Also spends the owner's publish budget (20 a minute).\n\nNeeds a key with publishing turned on (403 `publish_not_allowed` otherwise).","tags":["Drafts"],"x-postacio-scope":"publish","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/approval":{"post":{"operationId":"decideApproval","summary":"Ask for approval, approve, or request changes","description":"`request` needs write access; `approve` and `request_changes` need publish permission. `approve` takes `expected_version`, the version you reviewed: a newer one is 409. Approving a post held for approval sends it out. `request_changes` needs a `comment`, posted as a review comment.\n\nAny key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftApproval"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/share":{"post":{"operationId":"shareDraft","summary":"Turn the review link on or off","description":"Any key.","tags":["Drafts"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareDraft"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/comments":{"get":{"operationId":"listComments","summary":"Review comments on a draft, oldest first","description":"Any key.","tags":["Comments"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"resolved","in":"query","required":false,"description":"Only resolved (`true`) or only open (`false`) threads. A reply's own flag is always false; its thread's first comment carries the state.","schema":{"type":"string","enum":["true","false"]}},{"name":"lane","in":"query","required":false,"description":"Only the team's comments, or only those the client sees.","schema":{"type":"string","enum":["team","client"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentPage"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createComment","summary":"Comment on a draft, or reply","description":"Comments are flat: a reply is a new comment. It is signed with the key's or agent's name, and @Name notifies that teammate or named reviewer.\n\nAny key.","tags":["Comments"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateComment"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/drafts/{draftId}/comments/{commentId}":{"patch":{"operationId":"updateComment","summary":"Resolve or reopen a comment","description":"Any comment on the draft, whoever wrote it. Setting the state it already has changes nothing.\n\nAny key.","tags":["Comments"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"description":"A comment id from `GET /comments`.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateComment"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comment"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteComment","summary":"Delete a comment","description":"Any comment on the draft, whoever wrote it.\n\nAny key.","tags":["Comments"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"draftId","in":"path","required":true,"description":"A draft id.","schema":{"type":"string","format":"uuid"}},{"name":"commentId","in":"path","required":true,"description":"A comment id from `GET /comments`.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Done; no body.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/media":{"post":{"operationId":"createMediaUpload","summary":"Start an upload: reserve it and get a URL to PUT the file to","description":"Single-part uploads up to 50 MiB. PUT the bytes to `upload_url` with exactly `headers`, then call verify.\n\nAny key.","tags":["Media"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaUpload"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUpload"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/media/import":{"post":{"operationId":"importMedia","summary":"Import a file from a public https link","description":"The server downloads the link (https only, public addresses only, up to 3 redirects, 45 s, 50 MiB) and stores it like an upload. Pass the answer in a draft's `media` array.\n\nAny key.","tags":["Media"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportMedia"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaRef"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/media/{mediaId}":{"get":{"operationId":"getMedia","summary":"Where an upload is: reserved, uploaded, ready or deleting","description":"Any key.","tags":["Media"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"mediaId","in":"path","required":true,"description":"The `media_id` from `POST /media`.","schema":{"type":"string","pattern":"^[0-9a-fA-F-]{36}(\\.[A-Za-z0-9][A-Za-z0-9.+-]{0,39})?$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaStatus"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/media/{mediaId}/verify":{"post":{"operationId":"verifyMedia","summary":"Check an uploaded file and get the attachment for a draft","description":"Pass the answer in a draft's `media` array, adding `alt_text` there. A file that fails the check is deleted.\n\nAny key.","tags":["Media"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"mediaId","in":"path","required":true,"description":"The `media_id` from `POST /media`.","schema":{"type":"string","pattern":"^[0-9a-fA-F-]{36}(\\.[A-Za-z0-9][A-Za-z0-9.+-]{0,39})?$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyMedia"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaRef"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/tags":{"get":{"operationId":"listTags","summary":"The tag vocabulary","description":"A key limited to some groups lists only the tags used by posts in those groups.\n\nAny key.","tags":["Tags"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createTag","summary":"Create a tag, or return the one with that name","description":"Any key.","tags":["Tags"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTag"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/queue/slots":{"get":{"operationId":"listQueueSlots","summary":"The group's posting slots","description":"Any key.","tags":["Queue"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createQueueSlot","summary":"Add a posting slot","description":"Every account must be a live account of this group, and no account may pass 21 slot times a week.\n\nAny key.","tags":["Queue"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSlot"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Slot"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/queue/slots/{slotId}":{"patch":{"operationId":"updateQueueSlot","summary":"Change a posting slot","description":"Only the fields sent change. Posts already scheduled keep their times.\n\nAny key.","tags":["Queue"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"slotId","in":"path","required":true,"description":"A slot id from `GET /queue/slots`.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSlot"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Slot"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteQueueSlot","summary":"Remove a posting slot","description":"Posts already scheduled keep their times.\n\nAny key.","tags":["Queue"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"slotId","in":"path","required":true,"description":"A slot id from `GET /queue/slots`.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Done; no body.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/queue/next":{"get":{"operationId":"nextQueueSlots","summary":"The next open queue times (\"next-free-slot\" takes the first)","description":"Any key.","tags":["Queue"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"accounts","in":"query","required":false,"description":"Comma-separated account ids. Default: every account in the group.","schema":{"type":"string","maxLength":2000}},{"name":"from","in":"query","required":false,"description":"Earliest time to offer. Default: now.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"limit","in":"query","required":false,"schema":{"default":10,"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextSlotList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/goals":{"get":{"operationId":"getGoals","summary":"The group's posting goals and caps, and its goal pauses","description":"A group goal (`account_id: null`) counts original posts and every account inherits it; an account's own goal of the same kind replaces it.\n\nAny key.","tags":["Goals"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"put":{"operationId":"putGoals","summary":"Replace the group's posting goals and caps","description":"Send the whole set: a goal left out is removed. Changed and removed goals are closed, never overwritten, so past periods keep the goals they had. A field the group can't hold is 400 `validation` naming it in `param` (`goals[2].target`); a paused group is 409.\n\nAny key.","tags":["Goals"],"x-postacio-scope":"write","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutGoals"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/goals/progress":{"get":{"operationId":"getGoalProgress","summary":"How far each account is through its goals this period","description":"Per account and goal, in the group's timezone: published (`done`), scheduled (`planned`), waiting for approval, and `remaining` to schedule. Only posts published through Postacio count.\n\nAny key.","tags":["Goals"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgress"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/accounts/{accountId}/analytics/posts":{"get":{"operationId":"postMetrics","summary":"Per-post metrics for one account","description":"The window is clamped to your plan's analytics history.\n\nAny key.","tags":["Analytics"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"accountId","in":"path","required":true,"description":"An account id from the group's `accounts`.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"offset","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":100000}},{"name":"from","in":"query","required":false,"description":"Published at or after. Defaults to 30 days ago; clamped to the plan's history.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"description":"Published before. Defaults to now.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"metrics","in":"query","required":false,"description":"Comma-separated subset of views, likes, comments, shares, saves, reach, impressions.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostMetricsPage"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/accounts/{accountId}/analytics/followers":{"get":{"operationId":"followerSeries","summary":"Follower count over time for one account","description":"Buckets are in the group's timezone; each holds the last reading in it.\n\nAny key.","tags":["Analytics"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"accountId","in":"path","required":true,"description":"An account id from the group's `accounts`.","schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"bucket","in":"query","required":false,"schema":{"default":"day","type":"string","enum":["day","week"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowerSeries"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/groups/{groupId}/analytics/summary":{"get":{"operationId":"groupSummary","summary":"A group's numbers per account and in total","description":"Posts published in the window, each metric summed over them (each post's latest reading), and the change in followers. The window is clamped to your plan's analytics history.\n\nAny key.","tags":["Analytics"],"x-postacio-scope":"read","parameters":[{"name":"groupId","in":"path","required":true,"description":"A social group id from `GET /groups`.","schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"description":"Published at or after. Defaults to 30 days ago; clamped to the plan's history.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"description":"Published before. Defaults to now.","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"metrics","in":"query","required":false,"description":"Comma-separated subset of views, likes, comments, shares, saves, reach, impressions.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupSummary"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks":{"get":{"operationId":"listWebhooks","summary":"Webhook subscriptions","description":"Webhooks receive draft events from every group, so these routes need a key with access to all groups (403 `forbidden` otherwise). They also spend the webhook-management budget Settings uses (30 a minute).\n\nAny key.","tags":["Webhooks"],"x-postacio-scope":"read","parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createWebhook","summary":"Subscribe a URL to draft events","description":"The answer carries the `whsec_` signing secret, once. Up to 10 webhooks (409 after); a private, local or plain-http URL is 422 on `url`. Each event is POSTed as JSON (`WebhookPayload`, at most 32 KiB) with `Postacio-Event`, `Postacio-Delivery-Id` and `Postacio-Signature: t=<unix seconds>,v1=<hex hmac-sha256(secret, \"<t>.<raw body>\")>`. Verify against the raw body and reject a `t` more than 5 minutes off. Answer 2xx within 30 s; failures are retried 7 times with backoff, under the same `Postacio-Delivery-Id`, and a webhook that keeps failing (25 attempts over at least 24 hours) is paused until resumed.\n\nWebhooks receive draft events from every group, so these routes need a key with access to all groups (403 `forbidden` otherwise). They also spend the webhook-management budget Settings uses (30 a minute).\n\nAny key.","tags":["Webhooks"],"x-postacio-scope":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhook"}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWebhook"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{webhookId}":{"get":{"operationId":"getWebhook","summary":"One webhook","description":"Webhooks receive draft events from every group, so these routes need a key with access to all groups (403 `forbidden` otherwise). They also spend the webhook-management budget Settings uses (30 a minute).\n\nAny key.","tags":["Webhooks"],"x-postacio-scope":"read","parameters":[{"name":"webhookId","in":"path","required":true,"description":"A webhook id from `GET /webhooks`.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"updateWebhook","summary":"Change a webhook's URL, events or description, or resume it","description":"`status: \"active\"` resumes a paused webhook. Webhooks receive draft events from every group, so these routes need a key with access to all groups (403 `forbidden` otherwise). They also spend the webhook-management budget Settings uses (30 a minute).\n\nAny key.","tags":["Webhooks"],"x-postacio-scope":"write","parameters":[{"name":"webhookId","in":"path","required":true,"description":"A webhook id from `GET /webhooks`.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhook"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteWebhook","summary":"Unsubscribe: delete a webhook and its delivery history","description":"Webhooks receive draft events from every group, so these routes need a key with access to all groups (403 `forbidden` otherwise). They also spend the webhook-management budget Settings uses (30 a minute).\n\nAny key.","tags":["Webhooks"],"x-postacio-scope":"write","parameters":[{"name":"webhookId","in":"path","required":true,"description":"A webhook id from `GET /webhooks`.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Done; no body.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}}},"webhooks":{"draftEvent":{"post":{"summary":"A draft event, sent to each subscribed webhook URL","description":"Each event is POSTed as JSON (`WebhookPayload`, at most 32 KiB) with `Postacio-Event`, `Postacio-Delivery-Id` and `Postacio-Signature: t=<unix seconds>,v1=<hex hmac-sha256(secret, \"<t>.<raw body>\")>`. Verify against the raw body and reject a `t` more than 5 minutes off. Answer 2xx within 30 s; failures are retried 7 times with backoff, under the same `Postacio-Delivery-Id`, and a webhook that keeps failing (25 attempts over at least 24 hours) is paused until resumed.","tags":["Webhooks"],"parameters":[{"name":"Postacio-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Postacio-Delivery-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Postacio-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^t=\\d+,v1=[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer in 30 s, is retried."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key (`pk_live_…`) or an agent access token (`at_…`)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","revoked","account_paused","plan_limit","forbidden","publish_not_allowed","not_found","validation","quota_exceeded","rate_limited","idempotency_conflict","approval_required","conflict","maintenance","internal"]},"message":{"type":"string","description":"A sentence written for a person; safe to show."},"param":{"description":"The request field, header or query parameter at fault.","type":"string"},"detail":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"account_id":{"type":"string"},"platform":{"type":"string"},"block_id":{"type":"string"}},"required":["code","message"]}},"retry_after":{"description":"Seconds to wait, on 429.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"needed":{"description":"On approval_required: whose approval is missing - \"team\" or \"client\".","type":"string","enum":["team","client"]}},"required":["code","message"]}},"required":["error"]},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"]},"principal":{"type":"object","properties":{"kind":{"type":"string","enum":["api_key","agent"]},"id":{"type":"string"},"name":{"type":["string","null"]},"can_publish":{"type":"boolean"},"groups":{"anyOf":[{"type":"string","const":"all"},{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}]}},"required":["kind","id","name","can_publish","groups"]},"timezone":{"type":"string","description":"The owner's timezone (IANA name); UTC when they never chose one."},"now":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"The current instant, in UTC."},"local_now":{"type":"string","description":"The same instant on the owner's wall clock, with its offset."},"local_weekday":{"type":"string","description":"Today's weekday on the owner's wall clock."}},"required":["user","principal","timezone","now","local_now","local_weekday"]},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"avatar_url":{"type":["string","null"]},"status":{"type":"string","enum":["active","expired","revoked","error"]},"enabled_by_default":{"type":"boolean"}},"required":["id","platform","name","handle","avatar_url","status","enabled_by_default"]},"Group":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"color":{"type":"string"},"primary_platform":{"anyOf":[{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},{"type":"null"}]},"primary_account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"avatar_url":{"type":["string","null"]},"status":{"type":"string","enum":["active","expired","revoked","error"]},"enabled_by_default":{"type":"boolean"}},"required":["id","platform","name","handle","avatar_url","status","enabled_by_default"]}}},"required":["id","name","timezone","color","primary_platform","primary_account_id"]},"GroupList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"color":{"type":"string"},"primary_platform":{"anyOf":[{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},{"type":"null"}]},"primary_account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"avatar_url":{"type":["string","null"]},"status":{"type":"string","enum":["active","expired","revoked","error"]},"enabled_by_default":{"type":"boolean"}},"required":["id","platform","name","handle","avatar_url","status","enabled_by_default"]}}},"required":["id","name","timezone","color","primary_platform","primary_account_id"]}}},"required":["items"]},"AccountList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"avatar_url":{"type":["string","null"]},"status":{"type":"string","enum":["active","expired","revoked","error"]},"enabled_by_default":{"type":"boolean"}},"required":["id","platform","name","handle","avatar_url","status","enabled_by_default"]}}},"required":["items"]},"CreateDraft":{"type":"object","properties":{"text":{"description":"The post. Use `thread` instead for a multi-post thread.","type":"string","maxLength":10000},"thread":{"description":"Posts of a thread, in order.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":10000}},"title":{"description":"A working title shown in Postacio; never published.","type":"string","maxLength":140},"targets":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string","maxLength":90000},"options":{"description":"This account's publishing settings, keyed by option name. Which options exist depends on the account's platform; see the per-platform shapes. Omitted options keep their defaults.","anyOf":[{"type":"object","properties":{"replySettings":{"type":"string","enum":["Everyone","Accounts you follow","Accounts you mention","Verified accounts"],"description":"Who can reply. Applied to the first post in the native X thread. Default: \"Everyone\"."},"dropLinksWhenOut":{"type":"boolean","description":"Post on X without the link. If this X account's X posts for the month can't cover a post with a link (after any X usage pack the group holds), it goes out with the links taken out and counts as a post without one. Default: false."}},"additionalProperties":false,"title":"X options","description":"Options for an account on X."},{"type":"object","properties":{"linkPreview":{"type":"boolean","description":"Show link previews. Let Telegram render a preview for links in text messages. Postacio loads a preview of links you paste, to show it here. Default: true."},"linkPreviewSize":{"type":"string","enum":["Automatic","Small","Large"],"description":"Preview size. Applies when linkPreview is true. Default: \"Automatic\"."},"linkPreviewAbove":{"type":"boolean","description":"Show the preview above the text. Applies when linkPreview is true. Default: false."},"linkPreviewUrl":{"type":"string","maxLength":90000,"description":"Link to preview. Preview this link instead of the first one in the text. It doesn't have to appear in the text. Applies when linkPreview is true. Default: \"\"."},"sendAsAlbum":{"type":"boolean","description":"Group media as an album. Send multiple photos and videos in one native Telegram media group. Default: true."},"captionAbove":{"type":"boolean","description":"Put the caption above the media. Default: false."},"spoiler":{"type":"boolean","description":"Hide photos and videos behind a spoiler. Readers tap to reveal them. Files are not affected. Default: false."},"buttons":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40},"url":{"type":"string"}},"required":["text","url"],"additionalProperties":false},"description":"Link buttons. Buttons that open a link, under the last message of the post. An album can't carry them, so a post that ends with one needs \"Group media as an album\" off. Default: []."},"silent":{"type":"boolean","description":"Send silently. Subscribers get the post without a notification sound. Default: false."},"protectContent":{"type":"boolean","description":"Protect content. Prevent forwarding and saving in Telegram where the destination supports it. Default: false."},"deleteAfter":{"type":"string","enum":["Never","1 hour","6 hours","12 hours","24 hours","47 hours"],"description":"Remove after. Remove the post from the channel after this long. Telegram lets a bot remove its post for 48 hours. Default: \"Never\"."},"topicId":{"type":"string","maxLength":90000,"description":"Forum topic. Only for a group with Topics turned on. In Telegram, open the topic and copy its link. Leave it empty to post in the group's main chat. Default: \"\"."}},"additionalProperties":false,"title":"Telegram options","description":"Options for an account on Telegram."},{"type":"object","properties":{"aspectRatio":{"type":"string","enum":["Original","Square (1:1)","Portrait (4:5)","Landscape (16:9)"],"description":"Aspect ratio. Photos are center-cropped to this ratio at publish. Original keeps your photo and only trims it if Instagram would reject it (accepted range: 4:5 to 1.91:1). Applies when the draft is a Post (not a Reel or Story). Default: \"Original\"."},"feedMedia":{"type":"string","enum":["Video (publishes as Reel)","Photo carousel","Photos & video (mixed carousel)"],"description":"Choose media type. Choose which to publish when your tray contains both. Video publishes as a Reel; Photo carousel posts your photos; Photos & video posts a mixed carousel of both. Applies when the draft is a Post and its media mixes a video and photos. Default: \"Video (publishes as Reel)\"."},"shareReelToFeed":{"type":"boolean","description":"Also show Reel in feed. Applies when the draft is a Reel. Default: true."},"collaborators":{"maxItems":3,"type":"array","items":{"type":"string","description":"A public Instagram username: letters, numbers, periods and underscores, at most 30, with or without @."},"description":"Collaborators. Up to 3 accounts invited to co-author this post. It shows on their profiles once they accept the invite in Instagram. Not on Stories or trial reels. Applies when the draft is a Post or a Reel (not a Story or a trial reel). Default: []."},"aiGenerated":{"type":"boolean","description":"Add the AI info label. Tells people this post was made or edited with AI, with Instagram's AI info label. Applies when the draft is a Post or a Reel (not a Story). Default: false."},"trialReel":{"type":"boolean","description":"Trial reel. Shows the Reel to people who don't follow you first, so you see how it does before your followers do. Only for accounts Instagram has given trial reels to. Applies when the draft is a Reel. Default: false."},"trialGraduation":{"type":"string","enum":["Manually in Instagram","Automatically if it performs well"],"description":"Share with followers. Manually: you decide in the Instagram app when your followers see it. Automatically: Instagram shares it with them if it does well with non-followers. Applies when the draft is a Reel and trialReel is true. Default: \"Manually in Instagram\"."},"comments":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":90000},"description":"Comments Postacio posts under the post, in order, right after it publishes. Not on Stories."},"firstComment":{"type":"string","maxLength":90000,"description":"Retired: use comments. Published only when comments is empty.","deprecated":true},"altText":{"type":"string","maxLength":90000,"description":"Retired: set alt_text on the media item instead. Reaches only a lone feed photo that has none.","deprecated":true},"userTags":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"username":{"type":"string","pattern":"^@?[A-Za-z0-9._]{1,30}$","description":"The tagged account's public Instagram username."},"photo":{"type":"integer","minimum":1,"maximum":10,"description":"Which of the post's photos the tag is on, counted from 1 in media order; videos are not counted. Ignored on a Reel."},"x":{"type":"number","minimum":0,"maximum":1,"description":"From the photo's left edge, 0 to 1. Ignored on a Reel."},"y":{"type":"number","minimum":0,"maximum":1,"description":"From the photo's top edge, 0 to 1. Ignored on a Reel."}},"required":["username"],"additionalProperties":false},"description":"People tagged in the post. On a Post each tag sits on one photo (default: the first, at its centre), up to 20 per photo; on a Reel the tags go on the Reel. Not on Stories."}},"additionalProperties":false,"title":"Instagram options","description":"Options for an account on Instagram."},{"type":"object","properties":{"articleUrl":{"type":"string","maxLength":90000,"description":"Link URL. Publish a native Facebook link preview. Link posts cannot include separate media. Applies when the draft is a Post (not a Reel, Story or Comment). Default: \"\"."},"feedMedia":{"type":"string","enum":["Video","Photos"],"description":"Choose media type. Choose which to publish when your tray contains both. Video posts the clip; Photos posts the carousel. Applies when the draft is a Post and its media mixes a video and photos. Default: \"Video\"."},"comments":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":90000},"description":"Comments Postacio posts under the post, in order, right after it publishes. Not on Stories."},"audience":{"type":"object","properties":{"mode":{"type":"string","enum":["everyone","preferred","restricted"],"description":"\"everyone\"; \"preferred\" guides News Feed distribution; \"restricted\" hides the post from anyone outside it."},"ageMin":{"type":"integer","minimum":13,"maximum":65,"description":"Restricted audiences take only 13, 15, 18, 21, 25."},"ageMax":{"type":"integer","minimum":13,"maximum":65,"description":"Preferred audiences only."},"countries":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"},"description":"Two-letter country codes."},"gender":{"type":"string","enum":["all","men","women"],"description":"Preferred audiences only."},"educationStatus":{"type":"string","enum":["all","high-school","undergraduate","alum"],"description":"Preferred audiences only."},"relationshipStatus":{"type":"string","enum":["all","single","in-a-relationship","married","engaged"],"description":"Preferred audiences only."},"collegeYears":{"maxItems":20,"type":"array","items":{"type":"integer","minimum":1900,"maximum":2100},"description":"Preferred audiences only."}},"additionalProperties":false,"description":"Who the Page post is for. Posts only; omitted fields keep their defaults."}},"additionalProperties":false,"title":"Facebook options","description":"Options for an account on Facebook."},{"type":"object","properties":{"visibility":{"type":"string","enum":["Public","Connections only"],"description":"Visibility. Default: \"Public\"."},"postFormat":{"type":"string","enum":["Post","Article / link"],"description":"Post format. Default: \"Post\"."},"feedMedia":{"type":"string","enum":["Video","Images"],"description":"Choose media type. Choose which to publish when your tray contains both. Video posts the clip; Images creates a native multi-image post (up to 20 images). Applies when postFormat is \"Post\" and the media mixes a video and images. Default: \"Video\"."},"documentTitle":{"type":"string","maxLength":400,"description":"Document title. LinkedIn shows this title above a document post's pages. Leave it empty to use the file's name. Applies when postFormat is \"Post\" and the media is a document (PDF, PowerPoint or Word). Default: \"\"."},"articleUrl":{"type":"string","maxLength":90000,"description":"Article URL. LinkedIn uses this URL as the source of its native article preview. Applies when postFormat is \"Article / link\". Default: \"\"."},"articleTitle":{"type":"string","maxLength":400,"description":"Article title. Required because LinkedIn's Posts API does not scrape the URL for preview metadata. Applies when postFormat is \"Article / link\". Default: \"\"."},"articleDescription":{"type":"string","maxLength":4086,"description":"Article description. Applies when postFormat is \"Article / link\". Default: \"\"."}},"additionalProperties":false,"title":"LinkedIn options","description":"Options for an account on LinkedIn."},{"type":"object","properties":{"privacyLevel":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"string","const":""}],"description":"Who can view the post: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY. Required before scheduling or publishing; there is no default. The account must offer the level when it is checked with TikTok (a private account cannot post to everyone)."},"policyConsent":{"type":"boolean","description":"Required true before scheduling or publishing; there is no default. Set it only once the person posting has answered disclosure and agreed to TikTok's Music Usage Confirmation (https://www.tiktok.com/legal/page/global/music-usage-confirmation/en), and to its Branded Content Policy (https://www.tiktok.com/legal/page/global/bc-policy/en) when brandedContent is true."},"allowComment":{"type":"boolean","description":"Let people comment. Default false. Refused if the account turned comments off."},"allowDuet":{"type":"boolean","description":"Let people Duet the video. Videos only. Default false. Refused if the account turned Duet off."},"allowStitch":{"type":"boolean","description":"Let people Stitch the video. Videos only. Default false. Refused if the account turned Stitch off."},"disclosure":{"type":"boolean","description":"The post promotes a brand, product or service (TikTok's commercial content disclosure). Default false. When true, set yourBrand, brandedContent or both."},"yourBrand":{"type":"boolean","description":"Promotes your own business; TikTok labels it 'Promotional content'."},"brandedContent":{"type":"boolean","description":"A paid partnership promoting a third party; TikTok labels it 'Paid partnership'. Cannot be SELF_ONLY."},"aiGenerated":{"type":"boolean","description":"Label the post as AI-generated content. Default false."},"autoAddMusic":{"type":"boolean","description":"Let TikTok add recommended music. Photo posts only. Default false."},"photoTitle":{"type":"string","maxLength":90,"description":"A photo post's title, at most 90 characters; the post's text is its description. Ignored on a video."}},"additionalProperties":false,"title":"TikTok options","description":"Options for an account on TikTok."},{"type":"object","properties":{"title":{"type":"string","maxLength":100,"description":"The video's title, at most 100 characters, no < or >. Required before scheduling."},"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"string","const":""}],"description":"Who can watch: public, unlisted or private. Default public (an empty string means the default)."},"madeForKids":{"type":"string","enum":["yes","no",""],"description":"Whether the video is made for kids (COPPA): yes or no. Required before scheduling; there is no default."},"tags":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"description":"Tags, at most 500 characters in all (a tag with a space counts its quotes)."},"categoryId":{"type":"string","enum":["1","2","10","15","17","19","20","22","23","24","25","26","27","28","29"],"description":"YouTube's category id: 1 Film & Animation, 2 Autos & Vehicles, 10 Music, 15 Pets & Animals, 17 Sports, 19 Travel & Events, 20 Gaming, 22 People & Blogs, 23 Comedy, 24 Entertainment, 25 News & Politics, 26 Howto & Style, 27 Education, 28 Science & Technology, 29 Nonprofits & Activism. Default \"22\" (People & Blogs)."},"paidPromotion":{"type":"boolean","description":"The video includes a paid product placement, sponsorship or endorsement; YouTube tells viewers so. Default false."}},"additionalProperties":false,"title":"YouTube options","description":"Options for an account on YouTube."}],"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":60},"additionalProperties":{}}},"required":["account_id"],"additionalProperties":false},"description":"The connected accounts to publish to. At most one X account: X forbids the same post on several accounts."},"media":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["image","video","document"]},"content_type":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_sec":{"type":"number","exclusiveMinimum":0},"alt_text":{"type":"string","maxLength":1000}},"required":["key","kind","content_type","name"],"additionalProperties":false}},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"auto_number":{"description":"Prefix each thread post with 1/, 2/ ...","type":"boolean"},"plan_at":{"description":"Put the draft on the calendar without publishing it.","anyOf":[{"type":"string","const":"next-free-slot"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"publish_at":{"description":"\"now\", \"next-free-slot\", or an ISO datetime to schedule.","anyOf":[{"type":"string","const":"now"},{"type":"string","const":"next-free-slot"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"jitter_minutes":{"type":"integer","minimum":0,"maximum":15},"kind":{"description":"What the draft is; fixed once created. post (default, any network); reel and story (Instagram, Facebook; need a video, or media for a story); poll (X, LinkedIn, Telegram; send poll, and the text is the question); article (one X account with X Premium); reply and quote (one X account; send target_url); repost (one X or LinkedIn account; send target_url).","type":"string","enum":["post","article","reply","quote","poll","reel","story","repost"]},"poll":{"description":"The poll, with kind \"poll\". It goes on the first post; the text is its question.","type":"object","properties":{"options":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"string","maxLength":100},"description":"The answers, in order. X and LinkedIn take 2-4 (X 25 characters each, LinkedIn 30); Telegram alone takes up to 12 of 100."},"duration_days":{"description":"How long it runs. X: 1, 3 or 7. LinkedIn: 1, 3, 7 or 14. Telegram reads close_after_days instead. Default 1.","type":"integer","minimum":1,"maximum":14},"multiple_answers":{"description":"Telegram only: readers may pick more than one answer. Not with quiz.","type":"boolean"},"quiz":{"description":"Telegram only: make the poll a quiz with one right answer.","type":"object","properties":{"correct_option":{"type":"integer","minimum":0,"maximum":11,"description":"The right answer, as an index into options."},"explanation":{"description":"Shown after someone answers.","type":"string","maxLength":200}},"required":["correct_option"],"additionalProperties":false},"close_after_days":{"description":"Telegram only: close the poll this many days after it is posted. Omitted, it stays open.","type":"integer","minimum":1,"maximum":14}},"required":["options"],"additionalProperties":false},"target_url":{"description":"The post a reply, quote or repost acts on: a link to an X post (reply, quote, an X repost) or a LinkedIn post (a LinkedIn repost).","type":"string","maxLength":600}},"required":["targets"],"additionalProperties":false},"UpdateDraft":{"type":"object","properties":{"text":{"description":"The post. Use `thread` instead for a multi-post thread.","type":"string","maxLength":10000},"thread":{"description":"Posts of a thread, in order.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":10000}},"title":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}]},"targets":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"text":{"type":"string","maxLength":90000},"options":{"description":"This account's publishing settings, keyed by option name. Which options exist depends on the account's platform; see the per-platform shapes. Omitted options keep their defaults.","anyOf":[{"type":"object","properties":{"replySettings":{"type":"string","enum":["Everyone","Accounts you follow","Accounts you mention","Verified accounts"],"description":"Who can reply. Applied to the first post in the native X thread. Default: \"Everyone\"."},"dropLinksWhenOut":{"type":"boolean","description":"Post on X without the link. If this X account's X posts for the month can't cover a post with a link (after any X usage pack the group holds), it goes out with the links taken out and counts as a post without one. Default: false."}},"additionalProperties":false,"title":"X options","description":"Options for an account on X."},{"type":"object","properties":{"linkPreview":{"type":"boolean","description":"Show link previews. Let Telegram render a preview for links in text messages. Postacio loads a preview of links you paste, to show it here. Default: true."},"linkPreviewSize":{"type":"string","enum":["Automatic","Small","Large"],"description":"Preview size. Applies when linkPreview is true. Default: \"Automatic\"."},"linkPreviewAbove":{"type":"boolean","description":"Show the preview above the text. Applies when linkPreview is true. Default: false."},"linkPreviewUrl":{"type":"string","maxLength":90000,"description":"Link to preview. Preview this link instead of the first one in the text. It doesn't have to appear in the text. Applies when linkPreview is true. Default: \"\"."},"sendAsAlbum":{"type":"boolean","description":"Group media as an album. Send multiple photos and videos in one native Telegram media group. Default: true."},"captionAbove":{"type":"boolean","description":"Put the caption above the media. Default: false."},"spoiler":{"type":"boolean","description":"Hide photos and videos behind a spoiler. Readers tap to reveal them. Files are not affected. Default: false."},"buttons":{"maxItems":6,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40},"url":{"type":"string"}},"required":["text","url"],"additionalProperties":false},"description":"Link buttons. Buttons that open a link, under the last message of the post. An album can't carry them, so a post that ends with one needs \"Group media as an album\" off. Default: []."},"silent":{"type":"boolean","description":"Send silently. Subscribers get the post without a notification sound. Default: false."},"protectContent":{"type":"boolean","description":"Protect content. Prevent forwarding and saving in Telegram where the destination supports it. Default: false."},"deleteAfter":{"type":"string","enum":["Never","1 hour","6 hours","12 hours","24 hours","47 hours"],"description":"Remove after. Remove the post from the channel after this long. Telegram lets a bot remove its post for 48 hours. Default: \"Never\"."},"topicId":{"type":"string","maxLength":90000,"description":"Forum topic. Only for a group with Topics turned on. In Telegram, open the topic and copy its link. Leave it empty to post in the group's main chat. Default: \"\"."}},"additionalProperties":false,"title":"Telegram options","description":"Options for an account on Telegram."},{"type":"object","properties":{"aspectRatio":{"type":"string","enum":["Original","Square (1:1)","Portrait (4:5)","Landscape (16:9)"],"description":"Aspect ratio. Photos are center-cropped to this ratio at publish. Original keeps your photo and only trims it if Instagram would reject it (accepted range: 4:5 to 1.91:1). Applies when the draft is a Post (not a Reel or Story). Default: \"Original\"."},"feedMedia":{"type":"string","enum":["Video (publishes as Reel)","Photo carousel","Photos & video (mixed carousel)"],"description":"Choose media type. Choose which to publish when your tray contains both. Video publishes as a Reel; Photo carousel posts your photos; Photos & video posts a mixed carousel of both. Applies when the draft is a Post and its media mixes a video and photos. Default: \"Video (publishes as Reel)\"."},"shareReelToFeed":{"type":"boolean","description":"Also show Reel in feed. Applies when the draft is a Reel. Default: true."},"collaborators":{"maxItems":3,"type":"array","items":{"type":"string","description":"A public Instagram username: letters, numbers, periods and underscores, at most 30, with or without @."},"description":"Collaborators. Up to 3 accounts invited to co-author this post. It shows on their profiles once they accept the invite in Instagram. Not on Stories or trial reels. Applies when the draft is a Post or a Reel (not a Story or a trial reel). Default: []."},"aiGenerated":{"type":"boolean","description":"Add the AI info label. Tells people this post was made or edited with AI, with Instagram's AI info label. Applies when the draft is a Post or a Reel (not a Story). Default: false."},"trialReel":{"type":"boolean","description":"Trial reel. Shows the Reel to people who don't follow you first, so you see how it does before your followers do. Only for accounts Instagram has given trial reels to. Applies when the draft is a Reel. Default: false."},"trialGraduation":{"type":"string","enum":["Manually in Instagram","Automatically if it performs well"],"description":"Share with followers. Manually: you decide in the Instagram app when your followers see it. Automatically: Instagram shares it with them if it does well with non-followers. Applies when the draft is a Reel and trialReel is true. Default: \"Manually in Instagram\"."},"comments":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":90000},"description":"Comments Postacio posts under the post, in order, right after it publishes. Not on Stories."},"firstComment":{"type":"string","maxLength":90000,"description":"Retired: use comments. Published only when comments is empty.","deprecated":true},"altText":{"type":"string","maxLength":90000,"description":"Retired: set alt_text on the media item instead. Reaches only a lone feed photo that has none.","deprecated":true},"userTags":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"username":{"type":"string","pattern":"^@?[A-Za-z0-9._]{1,30}$","description":"The tagged account's public Instagram username."},"photo":{"type":"integer","minimum":1,"maximum":10,"description":"Which of the post's photos the tag is on, counted from 1 in media order; videos are not counted. Ignored on a Reel."},"x":{"type":"number","minimum":0,"maximum":1,"description":"From the photo's left edge, 0 to 1. Ignored on a Reel."},"y":{"type":"number","minimum":0,"maximum":1,"description":"From the photo's top edge, 0 to 1. Ignored on a Reel."}},"required":["username"],"additionalProperties":false},"description":"People tagged in the post. On a Post each tag sits on one photo (default: the first, at its centre), up to 20 per photo; on a Reel the tags go on the Reel. Not on Stories."}},"additionalProperties":false,"title":"Instagram options","description":"Options for an account on Instagram."},{"type":"object","properties":{"articleUrl":{"type":"string","maxLength":90000,"description":"Link URL. Publish a native Facebook link preview. Link posts cannot include separate media. Applies when the draft is a Post (not a Reel, Story or Comment). Default: \"\"."},"feedMedia":{"type":"string","enum":["Video","Photos"],"description":"Choose media type. Choose which to publish when your tray contains both. Video posts the clip; Photos posts the carousel. Applies when the draft is a Post and its media mixes a video and photos. Default: \"Video\"."},"comments":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":90000},"description":"Comments Postacio posts under the post, in order, right after it publishes. Not on Stories."},"audience":{"type":"object","properties":{"mode":{"type":"string","enum":["everyone","preferred","restricted"],"description":"\"everyone\"; \"preferred\" guides News Feed distribution; \"restricted\" hides the post from anyone outside it."},"ageMin":{"type":"integer","minimum":13,"maximum":65,"description":"Restricted audiences take only 13, 15, 18, 21, 25."},"ageMax":{"type":"integer","minimum":13,"maximum":65,"description":"Preferred audiences only."},"countries":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"},"description":"Two-letter country codes."},"gender":{"type":"string","enum":["all","men","women"],"description":"Preferred audiences only."},"educationStatus":{"type":"string","enum":["all","high-school","undergraduate","alum"],"description":"Preferred audiences only."},"relationshipStatus":{"type":"string","enum":["all","single","in-a-relationship","married","engaged"],"description":"Preferred audiences only."},"collegeYears":{"maxItems":20,"type":"array","items":{"type":"integer","minimum":1900,"maximum":2100},"description":"Preferred audiences only."}},"additionalProperties":false,"description":"Who the Page post is for. Posts only; omitted fields keep their defaults."}},"additionalProperties":false,"title":"Facebook options","description":"Options for an account on Facebook."},{"type":"object","properties":{"visibility":{"type":"string","enum":["Public","Connections only"],"description":"Visibility. Default: \"Public\"."},"postFormat":{"type":"string","enum":["Post","Article / link"],"description":"Post format. Default: \"Post\"."},"feedMedia":{"type":"string","enum":["Video","Images"],"description":"Choose media type. Choose which to publish when your tray contains both. Video posts the clip; Images creates a native multi-image post (up to 20 images). Applies when postFormat is \"Post\" and the media mixes a video and images. Default: \"Video\"."},"documentTitle":{"type":"string","maxLength":400,"description":"Document title. LinkedIn shows this title above a document post's pages. Leave it empty to use the file's name. Applies when postFormat is \"Post\" and the media is a document (PDF, PowerPoint or Word). Default: \"\"."},"articleUrl":{"type":"string","maxLength":90000,"description":"Article URL. LinkedIn uses this URL as the source of its native article preview. Applies when postFormat is \"Article / link\". Default: \"\"."},"articleTitle":{"type":"string","maxLength":400,"description":"Article title. Required because LinkedIn's Posts API does not scrape the URL for preview metadata. Applies when postFormat is \"Article / link\". Default: \"\"."},"articleDescription":{"type":"string","maxLength":4086,"description":"Article description. Applies when postFormat is \"Article / link\". Default: \"\"."}},"additionalProperties":false,"title":"LinkedIn options","description":"Options for an account on LinkedIn."},{"type":"object","properties":{"privacyLevel":{"anyOf":[{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},{"type":"string","const":""}],"description":"Who can view the post: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY. Required before scheduling or publishing; there is no default. The account must offer the level when it is checked with TikTok (a private account cannot post to everyone)."},"policyConsent":{"type":"boolean","description":"Required true before scheduling or publishing; there is no default. Set it only once the person posting has answered disclosure and agreed to TikTok's Music Usage Confirmation (https://www.tiktok.com/legal/page/global/music-usage-confirmation/en), and to its Branded Content Policy (https://www.tiktok.com/legal/page/global/bc-policy/en) when brandedContent is true."},"allowComment":{"type":"boolean","description":"Let people comment. Default false. Refused if the account turned comments off."},"allowDuet":{"type":"boolean","description":"Let people Duet the video. Videos only. Default false. Refused if the account turned Duet off."},"allowStitch":{"type":"boolean","description":"Let people Stitch the video. Videos only. Default false. Refused if the account turned Stitch off."},"disclosure":{"type":"boolean","description":"The post promotes a brand, product or service (TikTok's commercial content disclosure). Default false. When true, set yourBrand, brandedContent or both."},"yourBrand":{"type":"boolean","description":"Promotes your own business; TikTok labels it 'Promotional content'."},"brandedContent":{"type":"boolean","description":"A paid partnership promoting a third party; TikTok labels it 'Paid partnership'. Cannot be SELF_ONLY."},"aiGenerated":{"type":"boolean","description":"Label the post as AI-generated content. Default false."},"autoAddMusic":{"type":"boolean","description":"Let TikTok add recommended music. Photo posts only. Default false."},"photoTitle":{"type":"string","maxLength":90,"description":"A photo post's title, at most 90 characters; the post's text is its description. Ignored on a video."}},"additionalProperties":false,"title":"TikTok options","description":"Options for an account on TikTok."},{"type":"object","properties":{"title":{"type":"string","maxLength":100,"description":"The video's title, at most 100 characters, no < or >. Required before scheduling."},"privacy":{"anyOf":[{"type":"string","enum":["public","unlisted","private"]},{"type":"string","const":""}],"description":"Who can watch: public, unlisted or private. Default public (an empty string means the default)."},"madeForKids":{"type":"string","enum":["yes","no",""],"description":"Whether the video is made for kids (COPPA): yes or no. Required before scheduling; there is no default."},"tags":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":500},"description":"Tags, at most 500 characters in all (a tag with a space counts its quotes)."},"categoryId":{"type":"string","enum":["1","2","10","15","17","19","20","22","23","24","25","26","27","28","29"],"description":"YouTube's category id: 1 Film & Animation, 2 Autos & Vehicles, 10 Music, 15 Pets & Animals, 17 Sports, 19 Travel & Events, 20 Gaming, 22 People & Blogs, 23 Comedy, 24 Entertainment, 25 News & Politics, 26 Howto & Style, 27 Education, 28 Science & Technology, 29 Nonprofits & Activism. Default \"22\" (People & Blogs)."},"paidPromotion":{"type":"boolean","description":"The video includes a paid product placement, sponsorship or endorsement; YouTube tells viewers so. Default false."}},"additionalProperties":false,"title":"YouTube options","description":"Options for an account on YouTube."}],"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":60},"additionalProperties":{}}},"required":["account_id"],"additionalProperties":false},"description":"The connected accounts to publish to. At most one X account: X forbids the same post on several accounts."},"media":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["image","video","document"]},"content_type":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_sec":{"type":"number","exclusiveMinimum":0},"alt_text":{"type":"string","maxLength":1000}},"required":["key","kind","content_type","name"],"additionalProperties":false}},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"auto_number":{"description":"Prefix each thread post with 1/, 2/ ...","type":"boolean"}},"additionalProperties":false},"PlanDraft":{"type":"object","properties":{"plan_at":{"anyOf":[{"type":"string","const":"next-free-slot"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}},"required":["plan_at"],"additionalProperties":false},"ScheduleDraft":{"type":"object","properties":{"publish_at":{"anyOf":[{"type":"string","const":"next-free-slot"},{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"jitter_minutes":{"type":"integer","minimum":0,"maximum":15}},"required":["publish_at"],"additionalProperties":false},"ShareDraft":{"type":"object","properties":{"enabled":{"type":"boolean"},"role":{"type":"string","enum":["viewer","commenter","approver"]},"expiry":{"type":"string","enum":["never","24h","7d","30d"]}},"required":["enabled"],"additionalProperties":false},"Share":{"type":"object","properties":{"enabled":{"type":"boolean"},"url":{"type":["string","null"]},"role":{"type":"string","enum":["viewer","commenter","approver"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["enabled","url","role","expires_at"]},"Comment":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["person","guest","api","agent"],"description":"person: the owner or a team member. guest: a review-link reviewer, or someone no longer in the workspace. api / agent: an API key or AI agent."}},"required":["name","kind"]},"mentions":{"type":"array","items":{"type":"string"},"description":"The names the comment @mentions."},"thread_post_index":{"anyOf":[{"type":"integer","minimum":0,"maximum":49},{"type":"null"}],"description":"The thread post the comment is attached to; null for the whole draft, or when that post has since been removed."},"quote":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["text","start","end"]},{"type":"null"}],"description":"The words in that post the thread is about, on a thread's first comment: the text selected and its offsets in the post's text when it was written. Null for a comment on the post or the draft, and on replies."},"lane":{"type":"string","enum":["team","client"],"description":"\"team\": the workspace only. \"client\": also shown to clients on the review link and approval view."},"reply_to":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The first comment of the thread this one replies to; null for a thread's first comment."},"resolved":{"type":"boolean"},"resolved_by":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["name","at"]},{"type":"null"}],"description":"Who resolved the thread and when, on a thread's first comment. Null while open."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","body","author","mentions","thread_post_index","quote","lane","reply_to","resolved","resolved_by","created_at","updated_at"]},"CommentPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["person","guest","api","agent"],"description":"person: the owner or a team member. guest: a review-link reviewer, or someone no longer in the workspace. api / agent: an API key or AI agent."}},"required":["name","kind"]},"mentions":{"type":"array","items":{"type":"string"},"description":"The names the comment @mentions."},"thread_post_index":{"anyOf":[{"type":"integer","minimum":0,"maximum":49},{"type":"null"}],"description":"The thread post the comment is attached to; null for the whole draft, or when that post has since been removed."},"quote":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"start":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"end":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["text","start","end"]},{"type":"null"}],"description":"The words in that post the thread is about, on a thread's first comment: the text selected and its offsets in the post's text when it was written. Null for a comment on the post or the draft, and on replies."},"lane":{"type":"string","enum":["team","client"],"description":"\"team\": the workspace only. \"client\": also shown to clients on the review link and approval view."},"reply_to":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The first comment of the thread this one replies to; null for a thread's first comment."},"resolved":{"type":"boolean"},"resolved_by":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["name","at"]},{"type":"null"}],"description":"Who resolved the thread and when, on a thread's first comment. Null while open."},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","body","author","mentions","thread_post_index","quote","lane","reply_to","resolved","resolved_by","created_at","updated_at"]}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"required":["items","count","limit","offset","next","previous"]},"CreateComment":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000,"description":"The comment. Name a teammate or a named reviewer with @Name to notify them."},"thread_post_index":{"description":"Attach the comment to one post of a thread (0 is the first). Omit for the draft as a whole.","type":"integer","minimum":0,"maximum":49},"lane":{"description":"Who can read it: \"team\" (default) is the workspace only; \"client\" is also shown on the review link and the approval view.","type":"string","enum":["team","client"]},"reply_to":{"description":"Reply to a comment. The reply joins that comment's thread and takes its lane and thread post, so lane and thread_post_index are not sent with it.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["body"],"additionalProperties":false},"UpdateComment":{"type":"object","properties":{"resolved":{"type":"boolean","description":"true resolves the comment, false reopens it."}},"required":["resolved"],"additionalProperties":false},"Draft":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","planned","scheduled","held","publishing","published","partially_failed","failed"]},"publish_state":{"type":"string","enum":["idle","in_progress","finished"]},"kind":{"type":"string","enum":["post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What the draft is; fixed once created."},"text":{"type":"string"},"thread":{"type":"array","items":{"type":"string"}},"poll":{"anyOf":[{"type":"object","properties":{"options":{"type":"array","items":{"type":"string"}},"duration_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"multiple_answers":{"type":"boolean"},"quiz":{"type":"object","properties":{"correct_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"explanation":{"type":"string"}},"required":["correct_option"]},"close_after_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["options","duration_days"]},{"type":"null"}],"description":"The poll on the first post, for a poll draft."},"target_url":{"description":"The post a reply, quote, repost or comment acts on.","type":["string","null"]},"title":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["image","video","document"]},"content_type":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_sec":{"type":"number","exclusiveMinimum":0},"alt_text":{"type":"string","maxLength":1000}},"required":["key","kind","content_type","name"],"additionalProperties":false}},"planned_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"share_url":{"type":["string","null"]},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["app","api","agent"]},"name":{"type":["string","null"]}},"required":["kind","name"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"targets":{"type":"array","items":{"type":"object","properties":{"account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"status":{"anyOf":[{"type":"string","enum":["pending","publishing","published","failed"]},{"type":"null"}]},"text":{"type":["string","null"]},"permalink":{"type":["string","null"]},"error":{"type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["account_id","platform","status","text","permalink","error","published_at"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"description":"\"needs_person\": an API key or AI agent wrote this reply to, or quote of, someone else's X post. It does not publish until a person approves it in Postacio; a key or agent cannot."},"approval":{"type":"object","properties":{"required":{"type":"boolean","description":"The group asks for approval before a post is scheduled or published."},"status":{"type":"string","enum":["not_requested","pending","changes_requested","approved"]},"approved_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The version the approval covers."},"current":{"type":"boolean","description":"Nothing stands in the way: approval isn't required, or it covers this version."},"client":{"type":"object","properties":{"required":{"type":"boolean","description":"The group needs a reviewer's approval before a post is scheduled or published."},"status":{"type":"string","enum":["not_sent","sent","in_review","approved","exempt"],"description":"Where the post stands with its client."},"approved_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The version the client approved (or that an exemption covers)."},"current":{"type":"boolean","description":"The client's approval isn't required, or it covers this version."}},"required":["required","status","approved_version","current"],"description":"The client's half of the gate (approval views)."},"missing":{"type":"array","items":{"type":"string","enum":["team","client"]},"description":"Which approvals still stand between this post and going out. Empty when nothing does."}},"required":["required","status","approved_version","current","client","missing"],"description":"Where the draft stands with its group's approval gate."},"hold_reason":{"description":"Why a \"held\" post is waiting: \"awaiting_approval\"; \"needs_person\" (an API key or AI agent wrote this reply to or quote of someone else's X post, and a person must approve it in Postacio); \"limit\" (the monthly allowance); \"paused_group\" or \"paused_account\".","type":["string","null"]}},"required":["id","group_id","status","publish_state","kind","text","thread","poll","target_url","title","tags","media","planned_at","scheduled_at","published_at","share_url","origin","version","created_at","updated_at","targets","warnings","approval","hold_reason"]},"DraftPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","planned","scheduled","held","publishing","published","partially_failed","failed"]},"publish_state":{"type":"string","enum":["idle","in_progress","finished"]},"kind":{"type":"string","enum":["post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What the draft is; fixed once created."},"text":{"type":"string"},"thread":{"type":"array","items":{"type":"string"}},"poll":{"anyOf":[{"type":"object","properties":{"options":{"type":"array","items":{"type":"string"}},"duration_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"multiple_answers":{"type":"boolean"},"quiz":{"type":"object","properties":{"correct_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"explanation":{"type":"string"}},"required":["correct_option"]},"close_after_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["options","duration_days"]},{"type":"null"}],"description":"The poll on the first post, for a poll draft."},"target_url":{"description":"The post a reply, quote, repost or comment acts on.","type":["string","null"]},"title":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["image","video","document"]},"content_type":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_sec":{"type":"number","exclusiveMinimum":0},"alt_text":{"type":"string","maxLength":1000}},"required":["key","kind","content_type","name"],"additionalProperties":false}},"planned_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"share_url":{"type":["string","null"]},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["app","api","agent"]},"name":{"type":["string","null"]}},"required":["kind","name"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"targets":{"type":"array","items":{"type":"object","properties":{"account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"status":{"anyOf":[{"type":"string","enum":["pending","publishing","published","failed"]},{"type":"null"}]},"text":{"type":["string","null"]},"permalink":{"type":["string","null"]},"error":{"type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["account_id","platform","status","text","permalink","error","published_at"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"description":"\"needs_person\": an API key or AI agent wrote this reply to, or quote of, someone else's X post. It does not publish until a person approves it in Postacio; a key or agent cannot."},"approval":{"type":"object","properties":{"required":{"type":"boolean","description":"The group asks for approval before a post is scheduled or published."},"status":{"type":"string","enum":["not_requested","pending","changes_requested","approved"]},"approved_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The version the approval covers."},"current":{"type":"boolean","description":"Nothing stands in the way: approval isn't required, or it covers this version."},"client":{"type":"object","properties":{"required":{"type":"boolean","description":"The group needs a reviewer's approval before a post is scheduled or published."},"status":{"type":"string","enum":["not_sent","sent","in_review","approved","exempt"],"description":"Where the post stands with its client."},"approved_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The version the client approved (or that an exemption covers)."},"current":{"type":"boolean","description":"The client's approval isn't required, or it covers this version."}},"required":["required","status","approved_version","current"],"description":"The client's half of the gate (approval views)."},"missing":{"type":"array","items":{"type":"string","enum":["team","client"]},"description":"Which approvals still stand between this post and going out. Empty when nothing does."}},"required":["required","status","approved_version","current","client","missing"],"description":"Where the draft stands with its group's approval gate."},"hold_reason":{"description":"Why a \"held\" post is waiting: \"awaiting_approval\"; \"needs_person\" (an API key or AI agent wrote this reply to or quote of someone else's X post, and a person must approve it in Postacio); \"limit\" (the monthly allowance); \"paused_group\" or \"paused_account\".","type":["string","null"]}},"required":["id","group_id","status","publish_state","kind","text","thread","poll","target_url","title","tags","media","planned_at","scheduled_at","published_at","share_url","origin","version","created_at","updated_at","targets","warnings","approval","hold_reason"]}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"required":["items","count","limit","offset","next","previous"]},"CreateMediaUpload":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"content_type":{"type":"string","minLength":1,"maxLength":200,"description":"The MIME type the file will be uploaded with, e.g. image/png."},"bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The exact file size. Single-part uploads only (up to 50 MiB)."}},"required":["filename","content_type","bytes"],"additionalProperties":false},"MediaUpload":{"type":"object","properties":{"media_id":{"type":"string"},"key":{"type":"string"},"upload_url":{"type":"string"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["media_id","key","upload_url","method","headers"]},"MediaStatus":{"type":"object","properties":{"media_id":{"type":"string"},"key":{"type":"string"},"state":{"type":"string","enum":["reserved","uploaded","ready","deleting"]},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["media_id","key","state","bytes"]},"VerifyMedia":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\u0000-\\u001f\\u007f]+$","description":"The file name to show for this attachment."},"content_type":{"type":"string","minLength":1,"maxLength":200}},"required":["name","content_type"],"additionalProperties":false},"MediaRef":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["image","video","document"]},"content_type":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_sec":{"type":"number","exclusiveMinimum":0},"alt_text":{"type":"string","maxLength":1000}},"required":["key","kind","content_type","name"],"additionalProperties":false},"ImportMedia":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"A public https link to an image, video or PDF (up to 50 MiB)."},"name":{"description":"The file name to keep. Defaults to the link's last path segment.","type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"alt_text":{"description":"Alt text, carried into the draft's media item.","type":"string","maxLength":1000}},"required":["url"],"additionalProperties":false},"DraftApproval":{"type":"object","properties":{"action":{"type":"string","enum":["request","approve","request_changes"],"description":"\"request\" asks the group's approvers; \"approve\" and \"request_changes\" decide."},"message":{"description":"A note with a request (at most 500 characters).","type":"string","maxLength":500},"comment":{"description":"What needs to change (required for request_changes), or a note with an approval.","type":"string","maxLength":2000},"expected_version":{"description":"To approve: the draft version you reviewed, from get_draft. A newer version is refused.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["action"],"additionalProperties":false},"GroupSummary":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"totals":{"type":"object","properties":{"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Posts published in the window, counted once per account."},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]},"description":"Each metric summed over those posts: the latest reading of each post."},"followers_change":{"description":"Summed over the accounts with a reading at both ends.","type":["number","null"]}},"required":["posts","metrics","followers_change"]},"accounts":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"name":{"type":["string","null"]},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}},"followers":{"type":"object","properties":{"start":{"description":"The first reading in the window.","type":["number","null"]},"end":{"description":"The last reading in the window.","type":["number","null"]},"change":{"type":["number","null"]}},"required":["start","end","change"]}},"required":["account_id","platform","name","posts","metrics","followers"]}}},"required":["from","to","totals","accounts"]},"Tag":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"]},"CreateTag":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40,"description":"Matched case-insensitively: an existing tag with this name is returned, not duplicated. A key limited to some groups may get back the name and colour it sent rather than the stored ones; the id is authoritative."},"color":{"type":"string","enum":["slate","green","amber","red","blue","violet","teal","pink"]}},"required":["name"],"additionalProperties":false},"TagList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"]}}},"required":["items"]},"SlotList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"type":"string"},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"minutes":{"type":"integer","minimum":0,"maximum":1439},"account_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"starts_on":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ends_on":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"skip_dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"required":["id","label","days","minutes","account_ids","starts_on","ends_on","skip_dates"]}}},"required":["items"]},"Slot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"type":"string"},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"minutes":{"type":"integer","minimum":0,"maximum":1439},"account_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"starts_on":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ends_on":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"skip_dates":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"required":["id","label","days","minutes","account_ids","starts_on","ends_on","skip_dates"]},"CreateSlot":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"A name for the slot, shown in Postacio's queue."},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"Weekdays it runs on: 0 = Monday … 6 = Sunday."},"minutes":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes past midnight in the group's timezone (540 = 09:00)."},"account_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The group's accounts this slot posts to."},"starts_on":{"description":"First local date it runs (YYYY-MM-DD). Null or absent: no start.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ends_on":{"description":"Last local date it runs (YYYY-MM-DD). Null or absent: no end.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"skip_dates":{"description":"Local dates it does not run on.","maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"required":["label","days","minutes","account_ids"],"additionalProperties":false},"UpdateSlot":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60,"description":"A name for the slot, shown in Postacio's queue."},"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"Weekdays it runs on: 0 = Monday … 6 = Sunday."},"minutes":{"type":"integer","minimum":0,"maximum":1439,"description":"Minutes past midnight in the group's timezone (540 = 09:00)."},"account_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"description":"The group's accounts this slot posts to."},"starts_on":{"description":"First local date it runs (YYYY-MM-DD). Null or absent: no start.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"ends_on":{"description":"Last local date it runs (YYYY-MM-DD). Null or absent: no end.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"skip_dates":{"description":"Local dates it does not run on.","maxItems":366,"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"additionalProperties":false},"NextSlotList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slot_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"label":{"type":"string"},"account_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["slot_id","at","label","account_ids"]}}},"required":["items"]},"Goal":{"type":"object","properties":{"account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Null: the group's goal, which every account inherits."},"kind":{"type":"string","enum":["original","post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What it counts. \"original\": posts, articles, quotes, polls and reels."},"direction":{"type":"string","enum":["goal","cap"],"description":"\"goal\": at least target. \"cap\": at most target."},"target":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Per period: 1-20 a day, 1-50 a week, 1-200 a month. Null: an account opts out of the group's goal."},"period":{"type":"string","enum":["day","week","month"]},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"The days a daily goal counts, 0 = Monday."}},"required":["account_id","kind","direction","target","period","weekdays"]},"GoalList":{"type":"object","properties":{"goals":{"type":"array","items":{"type":"object","properties":{"account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Null: the group's goal, which every account inherits."},"kind":{"type":"string","enum":["original","post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What it counts. \"original\": posts, articles, quotes, polls and reels."},"direction":{"type":"string","enum":["goal","cap"],"description":"\"goal\": at least target. \"cap\": at most target."},"target":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Per period: 1-20 a day, 1-50 a week, 1-200 a month. Null: an account opts out of the group's goal."},"period":{"type":"string","enum":["day","week","month"]},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"The days a daily goal counts, 0 = Monday."}},"required":["account_id","kind","direction","target","period","weekdays"]}},"pauses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"Null: the whole group."},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last paused day, inclusive."}},"required":["id","account_id","starts_on","ends_on"]}}},"required":["goals","pauses"]},"PutGoals":{"type":"object","properties":{"goals":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"account_id":{"description":"An account of the group. Null or absent: the group's goal (kind original only).","anyOf":[{"type":"string","maxLength":36,"format":"uuid"},{"type":"null"}]},"kind":{"type":"string","enum":["original","post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What it counts. \"original\": posts, articles, quotes, polls and reels."},"direction":{"type":"string","enum":["goal","cap"],"description":"\"goal\": at least target. \"cap\": at most target."},"target":{"anyOf":[{"type":"integer","minimum":1,"maximum":200},{"type":"null"}],"description":"Per period: 1-20 a day, 1-50 a week, 1-200 a month. Null only on an account's original goal: none there."},"period":{"type":"string","enum":["day","week","month"]},"weekdays":{"description":"Daily goals: the days it counts, 0 = Monday. Default: every day.","maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}}},"required":["kind","target","period"],"additionalProperties":false},"description":"The whole set. A goal left out is removed; history is kept."}},"required":["goals"],"additionalProperties":false},"GoalProgress":{"type":"object","properties":{"timezone":{"type":"string","description":"The group's timezone: periods start at its midnight, weeks on Monday."},"accounts":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["original","post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What it counts. \"original\": posts, articles, quotes, polls and reels."},"direction":{"type":"string","enum":["goal","cap"],"description":"\"goal\": at least target. \"cap\": at most target."},"target":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"period":{"type":"string","enum":["day","week","month"]},"weekdays":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"source":{"type":"string","enum":["group","account"],"description":"Inherited from the group, or the account's own."},"period_key":{"type":"string","description":"The current period: d:2026-10-17, w:<its Monday> or m:2026-10."},"period_start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"period_end":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"done":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Published in the period."},"planned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Scheduled for later in the period, approved where approval is required."},"needs_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Scheduled in the period but waiting for an approval; not part of planned."},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Goals: still to schedule (target - done - planned, at least 0; posts awaiting approval still count as missing). Caps: room left."},"state":{"type":"string","enum":["ok","behind","met","over_cap","paused","reconnect","off_day","unavailable"]},"paused_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"goal_days":{"anyOf":[{"type":"object","properties":{"met":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"elapsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["met","elapsed","total"]},{"type":"null"}],"description":"Daily goals: this week's goal days met, gone by, and in all."}},"required":["kind","direction","target","period","weekdays","source","period_key","period_start","period_end","done","planned","needs_approval","remaining","state","paused_until","goal_days"]}}},"required":["account_id","platform","name","handle","status","items"]}}},"required":["timezone","accounts"]},"PostMetricsPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"target_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"post_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"permalink":{"type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"metrics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["number","null"]}}},"required":["target_id","post_id","platform","permalink","published_at","metrics"]}},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next":{"type":["string","null"]},"previous":{"type":["string","null"]}},"required":["items","count","limit","offset","next","previous"]},"FollowerSeries":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"followers":{"type":["number","null"]}},"required":["at","followers"]}}},"required":["points"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["draft.created","draft.updated","draft.planned","draft.scheduled","draft.unscheduled","draft.published","draft.partially_failed","draft.failed","draft.deleted"]}},"description":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused"],"description":"Paused after 25 failed attempts over at least 24 hours."},"failure_streak":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","events","description","status","failure_streak","failing_since","last_delivery_at","created_at","updated_at"]},"WebhookList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["draft.created","draft.updated","draft.planned","draft.scheduled","draft.unscheduled","draft.published","draft.partially_failed","draft.failed","draft.deleted"]}},"description":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused"],"description":"Paused after 25 failed attempts over at least 24 hours."},"failure_streak":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","url","events","description","status","failure_streak","failing_since","last_delivery_at","created_at","updated_at"]}}},"required":["items"]},"CreateWebhook":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"A public https:// address. Private, local and plain-http addresses are refused (422)."},"events":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["draft.created","draft.updated","draft.planned","draft.scheduled","draft.unscheduled","draft.published","draft.partially_failed","draft.failed","draft.deleted"]},"description":"The draft events to send."},"description":{"description":"A note for you, shown in Settings.","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url","events"],"additionalProperties":false},"CreatedWebhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["draft.created","draft.updated","draft.planned","draft.scheduled","draft.unscheduled","draft.published","draft.partially_failed","draft.failed","draft.deleted"]}},"description":{"type":["string","null"]},"status":{"type":"string","enum":["active","paused"],"description":"Paused after 25 failed attempts over at least 24 hours."},"failure_streak":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failing_since":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_delivery_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"secret":{"description":"The `whsec_` signing secret. Shown once: store it now. An Idempotency-Key replay answers without it.","type":"string"}},"required":["id","url","events","description","status","failure_streak","failing_since","last_delivery_at","created_at","updated_at"]},"UpdateWebhook":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"events":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["draft.created","draft.updated","draft.planned","draft.scheduled","draft.unscheduled","draft.published","draft.partially_failed","draft.failed","draft.deleted"]}},"description":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"status":{"description":"\"active\" resumes a paused webhook and clears its failure streak. Pausing is automatic only.","type":"string","const":"active"}},"additionalProperties":false},"WebhookPayload":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The delivery id, the same as the `Postacio-Delivery-Id` header. De-duplicate on it."},"event":{"type":"string","enum":["draft.created","draft.updated","draft.planned","draft.scheduled","draft.unscheduled","draft.published","draft.partially_failed","draft.failed","draft.deleted"]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["app","api","agent"]},"name":{"type":["string","null"]}},"required":["kind","name"]},"data":{"type":"object","properties":{"draft":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","planned","scheduled","held","publishing","published","partially_failed","failed"]},"publish_state":{"type":"string","enum":["idle","in_progress","finished"]},"kind":{"type":"string","enum":["post","article","reply","quote","poll","reel","story","repost","comment"],"description":"What the draft is; fixed once created."},"text":{"type":"string"},"thread":{"type":"array","items":{"type":"string"}},"poll":{"anyOf":[{"type":"object","properties":{"options":{"type":"array","items":{"type":"string"}},"duration_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"multiple_answers":{"type":"boolean"},"quiz":{"type":"object","properties":{"correct_option":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"explanation":{"type":"string"}},"required":["correct_option"]},"close_after_days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["options","duration_days"]},{"type":"null"}],"description":"The poll on the first post, for a poll draft."},"target_url":{"description":"The post a reply, quote, repost or comment acts on.","type":["string","null"]},"title":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"media":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["image","video","document"]},"content_type":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_sec":{"type":"number","exclusiveMinimum":0},"alt_text":{"type":"string","maxLength":1000}},"required":["key","kind","content_type","name"],"additionalProperties":false}},"planned_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"share_url":{"type":["string","null"]},"origin":{"type":"object","properties":{"kind":{"type":"string","enum":["app","api","agent"]},"name":{"type":["string","null"]}},"required":["kind","name"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"targets":{"type":"array","items":{"type":"object","properties":{"account_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"platform":{"type":"string","enum":["x","telegram","instagram","facebook","linkedin","tiktok","youtube"]},"status":{"anyOf":[{"type":"string","enum":["pending","publishing","published","failed"]},{"type":"null"}]},"text":{"type":["string","null"]},"permalink":{"type":["string","null"]},"error":{"type":["string","null"]},"published_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["account_id","platform","status","text","permalink","error","published_at"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"description":"\"needs_person\": an API key or AI agent wrote this reply to, or quote of, someone else's X post. It does not publish until a person approves it in Postacio; a key or agent cannot."},"approval":{"type":"object","properties":{"required":{"type":"boolean","description":"The group asks for approval before a post is scheduled or published."},"status":{"type":"string","enum":["not_requested","pending","changes_requested","approved"]},"approved_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The version the approval covers."},"current":{"type":"boolean","description":"Nothing stands in the way: approval isn't required, or it covers this version."},"client":{"type":"object","properties":{"required":{"type":"boolean","description":"The group needs a reviewer's approval before a post is scheduled or published."},"status":{"type":"string","enum":["not_sent","sent","in_review","approved","exempt"],"description":"Where the post stands with its client."},"approved_version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The version the client approved (or that an exemption covers)."},"current":{"type":"boolean","description":"The client's approval isn't required, or it covers this version."}},"required":["required","status","approved_version","current"],"description":"The client's half of the gate (approval views)."},"missing":{"type":"array","items":{"type":"string","enum":["team","client"]},"description":"Which approvals still stand between this post and going out. Empty when nothing does."}},"required":["required","status","approved_version","current","client","missing"],"description":"Where the draft stands with its group's approval gate."},"hold_reason":{"description":"Why a \"held\" post is waiting: \"awaiting_approval\"; \"needs_person\" (an API key or AI agent wrote this reply to or quote of someone else's X post, and a person must approve it in Postacio); \"limit\" (the monthly allowance); \"paused_group\" or \"paused_account\".","type":["string","null"]}},"required":["id","group_id","status","publish_state","kind","text","thread","poll","target_url","title","tags","media","planned_at","scheduled_at","published_at","share_url","origin","version","created_at","updated_at","targets","warnings","approval","hold_reason"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"group_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","group_id"]}],"description":"The draft as `GET /drafts/{id}` returns it; only `{ id, group_id }` for `draft.deleted` or when truncated."},"truncated":{"description":"The full draft was over 32 KiB; fetch it through the API.","type":"boolean","const":true}},"required":["draft"]}},"required":["id","event","created_at","origin","data"]}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Up to 128 visible ASCII characters. Retrying with the same key and body within 24 hours replays the first answer (with `Idempotent-Replayed: true`) instead of doing the work twice; the same key with a different body is 422 `idempotency_conflict`.","schema":{"type":"string","maxLength":128}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per minute for this key.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in this key's window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix seconds when this key's window resets.","schema":{"type":"integer"}},"X-RateLimit-User-Limit":{"description":"Requests allowed per minute across all of the owner's keys and agents.","schema":{"type":"integer"}},"X-RateLimit-User-Remaining":{"description":"Requests left in the owner's window.","schema":{"type":"integer"}},"X-RateLimit-User-Reset":{"description":"Unix seconds when the owner's window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying (429 only).","schema":{"type":"integer"}}},"responses":{"Error":{"description":"An error in the v1 envelope.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"X-RateLimit-User-Limit":{"$ref":"#/components/headers/X-RateLimit-User-Limit"},"X-RateLimit-User-Remaining":{"$ref":"#/components/headers/X-RateLimit-User-Remaining"},"X-RateLimit-User-Reset":{"$ref":"#/components/headers/X-RateLimit-User-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}