{"openapi":"3.1.0","info":{"title":"Crier API","version":"1.0.0","description":"Publish to every social network from one API. Every response wraps its result in `data`; errors use `{ error: { code, message } }`.","license":{"name":"Proprietary","url":"https://usecrier.com/condiciones"},"contact":{"name":"Crier","url":"https://usecrier.com","email":"soporte@twofacesco.com"}},"servers":[{"url":"https://api.usecrier.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"workspace","description":"Your workspace and who is calling."},{"name":"team","description":"Members and invitations. Owners and admins manage the team; members publish and answer."},{"name":"profiles","description":"A profile is one brand or end customer. Social accounts are connected to a profile."},{"name":"queue","description":"Recurring weekly slots per profile. Posts sent with `queue: true` take the next free one."},{"name":"connect","description":"Connect a social account: send the user to the URL, Crier brings them back to your redirectUrl."},{"name":"accounts","description":"Connected social accounts, whether they can post, and their boards, playlists and subreddits."},{"name":"account-groups","description":"Saved selections of accounts, to post to them together."},{"name":"posts","description":"Publish now, schedule, queue or save drafts to one or many accounts."},{"name":"media","description":"Upload images and videos to Crier before posting them."},{"name":"inbox","description":"Direct messages, comments and reviews of a profile’s accounts. Lists take the profile; actions take the account the item belongs to."},{"name":"automations","description":"Comment-to-DM: when someone comments a keyword, answer with a private message (Instagram, Facebook) or a public reply (every network)."},{"name":"analytics","description":"Followers, daily totals, best times to post and top posts, per profile or per account."},{"name":"billing","description":"A prepaid balance: connected accounts beyond the free ones are charged day by day and usage (X API, messages) as it happens. Topping it up happens in the dashboard."},{"name":"webhooks","description":"Receive Crier events at your HTTPS endpoint."},{"name":"api-keys","description":"Manage API keys. Only from the dashboard, so a leaked key cannot mint new ones."}],"paths":{"/v1/me":{"get":{"operationId":"getMe","tags":["workspace"],"summary":"Who is calling","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspaceId":{"type":"string"},"user":{"anyOf":[{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"}},"required":["userId"]},{"type":"null"}],"description":"Null when called with an API key."},"role":{"anyOf":[{"type":"string","enum":["owner","admin","member"]},{"type":"null"}],"description":"The dashboard user’s role; null with an API key."}},"required":["workspaceId","user","role"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspace":{"get":{"operationId":"getWorkspace","tags":["workspace"],"summary":"Get the workspace","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"anyOf":[{"type":"string","enum":["api","self"]},{"type":"null"}]},"requireApproval":{"type":"boolean","description":"Posts by members wait for an owner or admin to approve them."},"createdAt":{"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))$"}},"required":["id","name","usage","requireApproval","createdAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateWorkspace","tags":["workspace"],"summary":"Update the workspace","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"usage":{"type":"string","enum":["api","self"]},"requireApproval":{"description":"Posts by members wait for an owner or admin to approve them.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"usage":{"anyOf":[{"type":"string","enum":["api","self"]},{"type":"null"}]},"requireApproval":{"type":"boolean","description":"Posts by members wait for an owner or admin to approve them."},"createdAt":{"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))$"}},"required":["id","name","usage","requireApproval","createdAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/team":{"get":{"operationId":"getTeam","tags":["team"],"summary":"List members and invitations","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"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))$"},"you":{"type":"boolean"}},"required":["userId","role","joinedAt","you"]}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"createdAt":{"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))$"},"expiresAt":{"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))$"}},"required":["id","email","role","createdAt","expiresAt"]}}},"required":["members","invitations"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/team/invitations":{"post":{"operationId":"inviteMember","tags":["team"],"summary":"Invite someone","description":"Returns a link to send to them. They join by signing in with the invited email.","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Who to invite; they must sign in with this email to accept."},"role":{"default":"member","description":"`admin` manages the team, API keys and webhooks; `member` publishes and answers.","type":"string","enum":["admin","member"]}},"required":["email"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"invitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"createdAt":{"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))$"},"expiresAt":{"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))$"}},"required":["id","email","role","createdAt","expiresAt"]},"url":{"type":"string","format":"uri","description":"The link to send. Shown only now; valid for 7 days."}},"required":["invitation","url"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/team/invitations/{id}":{"delete":{"operationId":"cancelInvitation","tags":["team"],"summary":"Cancel an invitation","x-dashboard-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/team/members/{userId}":{"patch":{"operationId":"changeMemberRole","tags":["team"],"summary":"Change a role","x-dashboard-only":true,"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","enum":["admin","member"]}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joinedAt":{"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))$"},"you":{"type":"boolean"}},"required":["userId","role","joinedAt","you"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeMember","tags":["team"],"summary":"Remove someone, or leave","x-dashboard-only":true,"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations/accept":{"post":{"operationId":"acceptInvitation","tags":["team"],"summary":"Accept an invitation","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":200,"description":"The token in the invitation link."}},"required":["token"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspaceId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["workspaceId","role"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profiles":{"get":{"operationId":"listProfiles","tags":["profiles"],"summary":"List profiles","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"externalId":{"type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","createdAt","updatedAt"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProfile","tags":["profiles"],"summary":"Create a profile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Brand or end-customer name."},"timezone":{"description":"IANA timezone, e.g. Europe/Madrid. Used by the queue.","type":"string","maxLength":64},"externalId":{"description":"Your own id for this customer, returned as is.","type":"string","maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"externalId":{"type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profiles/{id}":{"get":{"operationId":"getProfile","tags":["profiles"],"summary":"Get a profile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"externalId":{"type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProfile","tags":["profiles"],"summary":"Update a profile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Brand or end-customer name."},"timezone":{"description":"IANA timezone, e.g. Europe/Madrid. Used by the queue.","type":"string","maxLength":64},"externalId":{"description":"Your own id for this customer, returned as is.","type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"externalId":{"type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteProfile","tags":["profiles"],"summary":"Delete a profile","description":"Also disconnects its accounts.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profiles/{id}/queue":{"get":{"operationId":"getQueue","tags":["queue"],"summary":"Get a profile's queue","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 = Sunday … 6 = Saturday"},"time":{"type":"string","description":"HH:mm"}},"required":["dayOfWeek","time"]}},"nextSlots":{"type":"array","items":{"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))$"},"description":"The next free slots, soonest first."}},"required":["timezone","slots","nextSlots"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setQueue","tags":["queue"],"summary":"Set the queue slots","description":"Replaces every slot. Days go from 0 (Sunday) to 6 (Saturday); times are HH:mm in the queue timezone.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timezone":{"type":"string","minLength":1,"maxLength":64},"slots":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["dayOfWeek","time"]}}},"required":["slots"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 = Sunday … 6 = Saturday"},"time":{"type":"string","description":"HH:mm"}},"required":["dayOfWeek","time"]}},"nextSlots":{"type":"array","items":{"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))$"},"description":"The next free slots, soonest first."}},"required":["timezone","slots","nextSlots"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteQueue","tags":["queue"],"summary":"Delete the queue","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connect/{platform}":{"get":{"operationId":"getConnectUrl","tags":["connect"],"summary":"Start connecting an account","description":"Returns the URL to send the user to. When they finish, Crier redirects to `redirectUrl` with `connected=<platform>&accountId=…`, with `error=…` if it failed, or with `select=<sessionId>` when the user must pick a page, organization, board, location or profile (Facebook, LinkedIn, Pinterest, Google Business, Snapchat). In that case list the options and select one.","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]}},{"name":"profileId","in":"query","required":true,"description":"The profile the account will belong to.","schema":{"type":"string","minLength":1}},{"name":"redirectUrl","in":"query","required":true,"description":"Where Crier sends the user back when the connection finishes.","schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Send the user here to authorize the network."}},"required":["url"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connect/sessions/{id}/options":{"get":{"operationId":"listConnectOptions","tags":["connect"],"summary":"List what the user can pick","description":"The `id` is the `select` value Crier added to your redirectUrl. Sessions expire after one hour.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"detail":{"type":"string"},"imageUrl":{"type":"string","format":"uri"}},"required":["id","name"]}}},"required":["platform","options"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connect/sessions/{id}/select":{"post":{"operationId":"selectConnectOption","tags":["connect"],"summary":"Pick an option and finish connecting","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"optionId":{"type":"string","minLength":1,"maxLength":200}},"required":["optionId"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","needs_reconnection","disconnected"]},"connectedAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","profileId","platform","status","connectedAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts":{"get":{"operationId":"listAccounts","tags":["accounts"],"summary":"List connected accounts","parameters":[{"name":"profileId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","needs_reconnection","disconnected"]},"connectedAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","profileId","platform","status","connectedAt","updatedAt"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/health":{"get":{"operationId":"getAccountsHealth","tags":["accounts"],"summary":"Check whether accounts can post","description":"Asks each network right now. Accounts that need reconnecting are updated to `needs_reconnection`.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"status":{"type":"string","enum":["healthy","warning","error"]},"canPost":{"type":"boolean"},"needsReconnection":{"type":"boolean"},"issues":{"type":"array","items":{"type":"string"}}},"required":["accountId","platform","status","canPost","needsReconnection","issues"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}/{kind}":{"get":{"operationId":"listAccountResources","tags":["accounts"],"summary":"List boards, playlists, subreddits or flairs","description":"`kind` is `pinterest-boards`, `youtube-playlists`, `reddit-subreddits` or `reddit-flairs` (with `subreddit`). Use the ids in the post options.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["pinterest-boards","youtube-playlists","reddit-subreddits","reddit-flairs"]}},{"name":"subreddit","in":"query","required":false,"description":"Required for reddit-flairs.","schema":{"type":"string","pattern":"^\\w{2,21}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Send it as boardId, playlistId, subreddit or flairId."},"name":{"type":"string"},"detail":{"type":"string"},"isDefault":{"description":"The account's default, used when a post does not pick one.","type":"boolean"}},"required":["id","name"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/{id}":{"delete":{"operationId":"disconnectAccount","tags":["accounts"],"summary":"Disconnect an account","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account-groups":{"get":{"operationId":"listAccountGroups","tags":["account-groups"],"summary":"List groups","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"accountIds":{"type":"array","items":{"type":"string"}},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","accountIds","createdAt","updatedAt"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createAccountGroup","tags":["account-groups"],"summary":"Create a group","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"description":"Unique within the workspace."},"accountIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Accounts of any profile."}},"required":["name","accountIds"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"accountIds":{"type":"array","items":{"type":"string"}},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","accountIds","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account-groups/{id}":{"patch":{"operationId":"updateAccountGroup","tags":["account-groups"],"summary":"Update a group","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60,"description":"Unique within the workspace."},"accountIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Accounts of any profile."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"accountIds":{"type":"array","items":{"type":"string"}},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","accountIds","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteAccountGroup","tags":["account-groups"],"summary":"Delete a group","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts":{"post":{"operationId":"createPost","tags":["posts"],"summary":"Create a post","description":"Publishes now unless you send `scheduledFor`, `queue: true` or `draft: true`. Each target is one account and can carry its own text, media and network options (`instagram`, `youtube`, `tiktok`…). TikTok targets always need `tiktok` options.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content":{"type":"string","maxLength":10000,"description":"Text posted to every target that has no content of its own."},"media":{"description":"Images, videos or documents. Upload them first with POST /v1/media/upload-url.","maxItems":35,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"A connected account (GET /v1/accounts)."},"content":{"description":"Replaces the post text on this network.","type":"string","maxLength":10000},"media":{"maxItems":35,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"youtube":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"visibility":{"type":"string","enum":["public","unlisted","private"]},"madeForKids":{"type":"boolean"},"categoryId":{"type":"string","pattern":"^\\d{1,3}$"},"playlistId":{"type":"string","maxLength":100},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"firstComment":{"type":"string","maxLength":10000},"thumbnailUrl":{"type":"string","format":"uri"},"containsSyntheticMedia":{"type":"boolean"},"notifySubscribers":{"type":"boolean"}},"additionalProperties":false},"tiktok":{"type":"object","properties":{"privacy":{"type":"string","enum":["public","friends","followers","private"]},"allowComments":{"type":"boolean"},"allowDuet":{"default":false,"type":"boolean"},"allowStitch":{"default":false,"type":"boolean"},"commercialContent":{"type":"string","enum":["own_brand","paid_partnership"]},"autoAddMusic":{"type":"boolean"},"consent":{"type":"boolean","const":true}},"required":["privacy","allowComments","consent"],"additionalProperties":false},"instagram":{"type":"object","properties":{"format":{"type":"string","enum":["feed","reel","story"]},"shareToFeed":{"type":"boolean"},"collaborators":{"maxItems":3,"type":"array","items":{"type":"string","pattern":"^@?[\\w.]{1,30}$"}},"firstComment":{"type":"string","maxLength":2200},"coverUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"facebook":{"type":"object","properties":{"format":{"type":"string","enum":["feed","reel","story"]},"reelTitle":{"type":"string","maxLength":255},"firstComment":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false},"linkedin":{"type":"object","properties":{"firstComment":{"type":"string","minLength":1,"maxLength":10000},"disableLinkPreview":{"type":"boolean"},"documentTitle":{"type":"string","maxLength":400}},"additionalProperties":false},"x":{"type":"object","properties":{"thread":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}},"replySettings":{"type":"string","enum":["following","mentionedUsers","subscribers","verified"]}},"additionalProperties":false},"threads":{"type":"object","properties":{"thread":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}},"topicTag":{"type":"string","minLength":1,"maxLength":50},"firstComment":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false},"bluesky":{"type":"object","properties":{"thread":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"pinterest":{"type":"object","properties":{"title":{"type":"string","maxLength":100},"link":{"type":"string","format":"uri"},"boardId":{"type":"string","maxLength":100}},"additionalProperties":false},"googleBusiness":{"type":"object","properties":{"callToAction":{"type":"object","properties":{"type":{"type":"string","enum":["learn_more","book","order","shop","sign_up","call"]},"url":{"type":"string","format":"uri"}},"required":["type"],"additionalProperties":false}},"additionalProperties":false},"telegram":{"type":"object","properties":{"parseMode":{"type":"string","enum":["html","markdown"]},"disableLinkPreview":{"type":"boolean"},"silent":{"type":"boolean"},"protectContent":{"type":"boolean"}},"additionalProperties":false},"snapchat":{"type":"object","properties":{"format":{"type":"string","enum":["story","saved_story","spotlight"]}},"additionalProperties":false},"reddit":{"type":"object","properties":{"subreddit":{"type":"string","pattern":"^[\\w]{2,21}$"},"title":{"type":"string","maxLength":300},"link":{"type":"string","format":"uri"},"flairId":{"type":"string","maxLength":100},"nsfw":{"type":"boolean"},"spoiler":{"type":"boolean"}},"additionalProperties":false}},"required":["accountId"]}},"scheduledFor":{"description":"When to publish (ISO 8601 with offset). Omit to publish 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)))$"},"timezone":{"description":"IANA timezone that scheduledFor refers to.","type":"string","maxLength":64},"queue":{"description":"Take the next free slot of the profile's queue.","type":"boolean"},"draft":{"description":"Save without publishing or scheduling.","type":"boolean"},"requiresApproval":{"description":"Hold it as `pending_approval` until an owner or admin approves it. Members of a workspace that requires approval always get it.","type":"boolean"}},"required":["content","targets"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listPosts","tags":["posts"],"summary":"List posts","description":"Newest first.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/import":{"post":{"operationId":"importPosts","tags":["posts"],"summary":"Import posts from a CSV","description":"One post per row, up to 50 rows. Columns: `content`, `accounts` (ids separated by `|`) or `group`, `schedule_time`, `timezone`, `queue`, `draft`, `media_urls` and per-network columns (see the CSV import guide). Send `dryRun: true` first to check every row without posting.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":1000000,"description":"The CSV text, header row first."},"dryRun":{"description":"Check every row without posting.","type":"boolean"}},"required":["csv"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"valid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"invalid":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dryRun":{"type":"boolean"},"unknownColumns":{"type":"array","items":{"type":"string"},"description":"Columns that were ignored."},"rows":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1-based, header excluded."},"ok":{"type":"boolean"},"postId":{"type":"string"},"error":{"type":"string"}},"required":["row","ok"]}}},"required":["total","valid","invalid","dryRun","unknownColumns","rows"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}":{"patch":{"operationId":"updatePost","tags":["posts"],"summary":"Change a post that is not live","description":"Drafts, scheduled, failed and cancelled posts. Fields you leave out keep their value; `targets` replaces the whole list. `draft: false` publishes a draft now, or at `scheduledFor`, or in the queue.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content":{"type":"string","maxLength":10000,"description":"Text posted to every target that has no content of its own."},"media":{"description":"Images, videos or documents. Upload them first with POST /v1/media/upload-url.","maxItems":35,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"A connected account (GET /v1/accounts)."},"content":{"description":"Replaces the post text on this network.","type":"string","maxLength":10000},"media":{"maxItems":35,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"youtube":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"visibility":{"type":"string","enum":["public","unlisted","private"]},"madeForKids":{"type":"boolean"},"categoryId":{"type":"string","pattern":"^\\d{1,3}$"},"playlistId":{"type":"string","maxLength":100},"tags":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"firstComment":{"type":"string","maxLength":10000},"thumbnailUrl":{"type":"string","format":"uri"},"containsSyntheticMedia":{"type":"boolean"},"notifySubscribers":{"type":"boolean"}},"additionalProperties":false},"tiktok":{"type":"object","properties":{"privacy":{"type":"string","enum":["public","friends","followers","private"]},"allowComments":{"type":"boolean"},"allowDuet":{"default":false,"type":"boolean"},"allowStitch":{"default":false,"type":"boolean"},"commercialContent":{"type":"string","enum":["own_brand","paid_partnership"]},"autoAddMusic":{"type":"boolean"},"consent":{"type":"boolean","const":true}},"required":["privacy","allowComments","consent"],"additionalProperties":false},"instagram":{"type":"object","properties":{"format":{"type":"string","enum":["feed","reel","story"]},"shareToFeed":{"type":"boolean"},"collaborators":{"maxItems":3,"type":"array","items":{"type":"string","pattern":"^@?[\\w.]{1,30}$"}},"firstComment":{"type":"string","maxLength":2200},"coverUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"facebook":{"type":"object","properties":{"format":{"type":"string","enum":["feed","reel","story"]},"reelTitle":{"type":"string","maxLength":255},"firstComment":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false},"linkedin":{"type":"object","properties":{"firstComment":{"type":"string","minLength":1,"maxLength":10000},"disableLinkPreview":{"type":"boolean"},"documentTitle":{"type":"string","maxLength":400}},"additionalProperties":false},"x":{"type":"object","properties":{"thread":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}},"replySettings":{"type":"string","enum":["following","mentionedUsers","subscribers","verified"]}},"additionalProperties":false},"threads":{"type":"object","properties":{"thread":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}},"topicTag":{"type":"string","minLength":1,"maxLength":50},"firstComment":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false},"bluesky":{"type":"object","properties":{"thread":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},"pinterest":{"type":"object","properties":{"title":{"type":"string","maxLength":100},"link":{"type":"string","format":"uri"},"boardId":{"type":"string","maxLength":100}},"additionalProperties":false},"googleBusiness":{"type":"object","properties":{"callToAction":{"type":"object","properties":{"type":{"type":"string","enum":["learn_more","book","order","shop","sign_up","call"]},"url":{"type":"string","format":"uri"}},"required":["type"],"additionalProperties":false}},"additionalProperties":false},"telegram":{"type":"object","properties":{"parseMode":{"type":"string","enum":["html","markdown"]},"disableLinkPreview":{"type":"boolean"},"silent":{"type":"boolean"},"protectContent":{"type":"boolean"}},"additionalProperties":false},"snapchat":{"type":"object","properties":{"format":{"type":"string","enum":["story","saved_story","spotlight"]}},"additionalProperties":false},"reddit":{"type":"object","properties":{"subreddit":{"type":"string","pattern":"^[\\w]{2,21}$"},"title":{"type":"string","maxLength":300},"link":{"type":"string","format":"uri"},"flairId":{"type":"string","maxLength":100},"nsfw":{"type":"boolean"},"spoiler":{"type":"boolean"}},"additionalProperties":false}},"required":["accountId"]}},"scheduledFor":{"description":"When to publish (ISO 8601 with offset). Omit to publish 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)))$"},"timezone":{"description":"IANA timezone that scheduledFor refers to.","type":"string","maxLength":64},"queue":{"description":"Take the next free slot of the profile's queue.","type":"boolean"},"draft":{"description":"Save without publishing or scheduling.","type":"boolean"},"requiresApproval":{"description":"Hold it as `pending_approval` until an owner or admin approves it. Members of a workspace that requires approval always get it.","type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getPost","tags":["posts"],"summary":"Get a post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deletePost","tags":["posts"],"summary":"Delete a post","description":"Removes it from Crier. A post that is still live must be unpublished first.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/edit":{"post":{"operationId":"editPublishedPost","tags":["posts"],"summary":"Edit the text of a live post","description":"On X (Premium accounts, within 1 hour), Facebook, LinkedIn, YouTube, Pinterest, Google Business, Telegram, Discord and Reddit. Media cannot change.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000,"description":"The new text of the live post."},"accountId":{"description":"Edit only this account’s copy; every live copy otherwise.","type":"string","minLength":1}},"required":["content"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/metrics":{"get":{"operationId":"getPostMetrics","tags":["posts"],"summary":"Get the metrics of a post","description":"Impressions, reach, views, likes, comments, shares, saves and clicks, in total and per account. Each network reports its own subset.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"total":{"type":"object","properties":{"impressions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shares":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saves":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engagementRate":{"type":"number","description":"Percentage: interactions over impressions (or reach)."}},"required":["impressions","reach","views","likes","comments","shares","saves","clicks","engagementRate"]},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"metrics":{"type":"object","properties":{"impressions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shares":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saves":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engagementRate":{"type":"number","description":"Percentage: interactions over impressions (or reach)."}},"required":["impressions","reach","views","likes","comments","shares","saves","clicks","engagementRate"]}},"required":["accountId","platform","metrics"]}},"updatedAt":{"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))$"}},"required":["total","targets"]},{"type":"null"}],"description":"Null until the networks report metrics, usually minutes after publishing."}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/cancel":{"post":{"operationId":"cancelPost","tags":["posts"],"summary":"Cancel a scheduled post, draft or post waiting for approval","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/review":{"post":{"operationId":"reviewPost","tags":["posts"],"summary":"Approve or reject a post","description":"Only for posts in `pending_approval`, by owners, admins or an API key. Approving schedules it for its date, puts it in the queue if it asked for one, or publishes it now if its date already passed. Rejecting returns it to draft with the note and sends `post.rejected`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"],"description":"`approve` schedules it (or publishes it now if its date passed); `reject` returns it to draft."},"note":{"description":"Why, for whoever wrote it. Shown with the draft after a rejection.","type":"string","maxLength":1000}},"required":["decision"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/recycling":{"put":{"operationId":"setRecycling","tags":["posts"],"summary":"Recycle a post","description":"Posts it again every `every` weeks or months as a new post (`recycledFrom` points back), until `maxCopies` or `until`. YouTube and TikTok targets are left out of the copies, and each account can have up to 10 posts recycling. Sending it again changes the rule and keeps the count.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"every":{"type":"integer","minimum":1,"maximum":52,"description":"How many units between copies."},"unit":{"type":"string","enum":["week","month"],"description":"`week` or `month`."},"startAt":{"description":"When the first copy goes out. Defaults to one interval after the post’s date; for an old post, the next date of that series, at the same time of day.","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)))$"},"maxCopies":{"description":"Stop after this many copies.","type":"integer","minimum":1,"maximum":100},"until":{"description":"Stop after this date.","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)))$"},"variations":{"description":"Texts used in turn instead of the post’s text. A target’s own text still wins. Recommended for X and Pinterest, which flag repeats.","minItems":2,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":10000}},"timezone":{"description":"IANA time zone (e.g. `Europe/Madrid`) the interval is counted in, so copies keep their local time when the clocks change. UTC by default.","type":"string","maxLength":64}},"required":["every","unit"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"stopRecycling","tags":["posts"],"summary":"Stop recycling a post","description":"Copies already created stay as they are.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/retry":{"post":{"operationId":"retryPost","tags":["posts"],"summary":"Retry the failed targets","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/posts/{id}/unpublish":{"post":{"operationId":"unpublishPost","tags":["posts"],"summary":"Take a published post down","description":"From every network, or only from `accountId`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations":{"get":{"operationId":"listConversations","tags":["inbox"],"summary":"List conversations","description":"Direct messages on Facebook, Instagram, X, Bluesky, Reddit and Telegram, most recent first.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","archived"]}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page.","schema":{"type":"string","maxLength":4000}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation id."},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"participant":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"picture":{"type":"string","format":"uri"}}},"lastMessage":{"type":"string"},"updatedAt":{"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))$"},"status":{"type":"string","enum":["active","archived"]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"description":"Opens the conversation on the network.","type":"string","format":"uri"}},"required":["id","accountId","platform","participant","status","unreadCount"]}},"nextCursor":{"description":"Send it as cursor for the next page; null on the last one.","type":["string","null"]}},"required":["items","nextCursor"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations/{id}/messages":{"get":{"operationId":"listMessages","tags":["inbox"],"summary":"List the messages of a conversation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":true,"description":"The account the item belongs to.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page.","schema":{"type":"string","maxLength":4000}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["incoming","outgoing"]},"text":{"type":"string"},"senderName":{"type":"string"},"createdAt":{"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))$"},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","audio","file","sticker","share","other"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"}},"required":["type"]}},"deliveryStatus":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","direction","text","createdAt","attachments","deleted"]}},"nextCursor":{"description":"Send it as cursor for the next page; null on the last one.","type":["string","null"]}},"required":["items","nextCursor"],"description":"Oldest first within a page; the next page goes further back."}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"sendMessage","tags":["inbox"],"summary":"Send a message","description":"Text, an attachment or both. Meta only lets a page answer within 24 hours of the person’s last message.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"The account the item belongs to."},"text":{"type":"string","minLength":1,"maxLength":4000},"attachmentUrl":{"description":"A public https URL (for example from POST /v1/media/upload-url).","type":"string","format":"uri"},"attachmentType":{"type":"string","enum":["image","video","audio","file"]}},"required":["accountId"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations/{id}/read":{"post":{"operationId":"markConversationRead","tags":["inbox"],"summary":"Mark a conversation as read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"The account the item belongs to."}},"required":["accountId"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/conversations/{id}":{"patch":{"operationId":"setConversationStatus","tags":["inbox"],"summary":"Archive or reopen a conversation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"The account the item belongs to."},"status":{"type":"string","enum":["active","archived"]}},"required":["accountId","status"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/posts":{"get":{"operationId":"listCommentedPosts","tags":["inbox"],"summary":"List posts with comments","description":"Recent posts of the profile’s accounts with their comment counts, including posts published outside Crier.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page.","schema":{"type":"string","maxLength":4000}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque post id for the comment endpoints."},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"picture":{"type":"string","format":"uri"},"url":{"type":"string","format":"uri"},"createdAt":{"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))$"},"commentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"likeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","accountId","platform","content","commentCount","likeCount"]}},"nextCursor":{"description":"Send it as cursor for the next page; null on the last one.","type":["string","null"]}},"required":["items","nextCursor"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/posts/{id}/comments":{"get":{"operationId":"listComments","tags":["inbox"],"summary":"List the comments of a post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":true,"description":"The account the item belongs to.","schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page.","schema":{"type":"string","maxLength":4000}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque comment id."},"text":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"picture":{"type":"string","format":"uri"},"isOwner":{"type":"boolean","description":"Written by the connected account."}},"required":["isOwner"]},"createdAt":{"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))$"},"likeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replyCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"can":{"type":"object","properties":{"reply":{"type":"boolean"},"delete":{"type":"boolean"},"hide":{"type":"boolean"},"like":{"type":"boolean"}},"required":["reply","delete","hide","like"],"description":"What this network allows on it."},"hidden":{"type":"boolean"},"liked":{"type":"boolean"},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque comment id."},"text":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"picture":{"type":"string","format":"uri"},"isOwner":{"type":"boolean","description":"Written by the connected account."}},"required":["isOwner"]},"createdAt":{"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))$"},"likeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"replyCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string","format":"uri"},"can":{"type":"object","properties":{"reply":{"type":"boolean"},"delete":{"type":"boolean"},"hide":{"type":"boolean"},"like":{"type":"boolean"}},"required":["reply","delete","hide","like"],"description":"What this network allows on it."},"hidden":{"type":"boolean"},"liked":{"type":"boolean"}},"required":["id","text","author","likeCount","replyCount","can","hidden","liked"]}}},"required":["id","text","author","likeCount","replyCount","can","hidden","liked","replies"]}},"nextCursor":{"description":"Send it as cursor for the next page; null on the last one.","type":["string","null"]}},"required":["items","nextCursor"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"replyToComment","tags":["inbox"],"summary":"Comment or reply to a comment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"The account the item belongs to."},"text":{"type":"string","minLength":1,"maxLength":8000},"commentId":{"description":"Reply under this comment; omit to comment on the post.","type":"string","minLength":1}},"required":["accountId","text"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/posts/{id}/comments/{commentId}":{"patch":{"operationId":"setCommentState","tags":["inbox"],"summary":"Hide or like a comment","description":"Each comment says in `can` what its network allows.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"The account the item belongs to."},"hidden":{"type":"boolean"},"liked":{"type":"boolean"}},"required":["accountId"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteComment","tags":["inbox"],"summary":"Delete a comment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":true,"description":"The account the item belongs to.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/reviews":{"get":{"operationId":"listReviews","tags":["inbox"],"summary":"List reviews","description":"Google Business and Facebook reviews, with their total and average rating.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"description":"nextCursor of the previous page.","schema":{"type":"string","maxLength":4000}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"hasReply","in":"query","required":false,"description":"Only reviews with (true) or without (false) a reply.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque review id."},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"reviewer":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"picture":{"type":"string","format":"uri"}}},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1 to 5; null on Facebook, which recommends instead."},"recommends":{"type":"boolean"},"text":{"type":"string"},"createdAt":{"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))$"},"reply":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"createdAt":{"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))$"}},"required":["text"]},{"type":"null"}]},"url":{"type":"string","format":"uri"},"location":{"description":"Google Business location.","type":"string"}},"required":["id","accountId","platform","reviewer","rating","text","reply"]}},"nextCursor":{"description":"Send it as cursor for the next page; null on the last one.","type":["string","null"]},"summary":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"averageRating":{"type":["number","null"]}},"required":["total","averageRating"]}},"required":["items","nextCursor","summary"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox/reviews/{id}/reply":{"post":{"operationId":"replyToReview","tags":["inbox"],"summary":"Reply to a review","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accountId":{"type":"string","minLength":1,"description":"The account the item belongs to."},"text":{"type":"string","minLength":1,"maxLength":4000}},"required":["accountId","text"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteReviewReply","tags":["inbox"],"summary":"Delete a review reply","description":"Google Business only.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"accountId","in":"query","required":true,"description":"The account the item belongs to.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/automations":{"get":{"operationId":"listAutomations","tags":["automations"],"summary":"List automations","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"name":{"type":"string"},"trigger":{"type":"string","enum":["comment","story_reply"]},"postId":{"type":["string","null"]},"inboxPostId":{"type":["string","null"]},"keywords":{"type":"array","items":{"type":"string"}},"matchMode":{"type":"string","enum":["contains","word","exact"]},"excludeKeywords":{"type":"array","items":{"type":"string"}},"dmMessage":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["url","postback"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"payload":{"type":"string"}},"required":["type","title"]}},"commentReply":{"type":"string"},"dmDelaySeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repeat":{"type":"string","enum":["once","every_comment"]},"likeComment":{"type":"boolean"},"hideComment":{"type":"boolean"},"active":{"type":"boolean"},"stats":{"type":"object","properties":{"triggered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsFailed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uniqueContacts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linkClicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["triggered","dmsSent","dmsFailed","uniqueContacts","linkClicks"]},"createdAt":{"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))$"}},"required":["id","accountId","platform","name","trigger","postId","inboxPostId","keywords","matchMode","excludeKeywords","buttons","repeat","likeComment","hideComment","active","stats"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createAutomation","tags":["automations"],"summary":"Create an automation","description":"On Instagram and Facebook it sends `dmMessage` (with up to 3 buttons) to whoever comments a keyword; on TikTok, Threads, LinkedIn and YouTube it posts `commentReply`. Without a post it watches every post of the account.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"trigger":{"default":"comment","type":"string","enum":["comment","story_reply"],"description":"`story_reply`: replies to an Instagram story."},"postId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"A Crier post to watch."},"inboxPostId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Or a post as GET /v1/inbox/posts lists it. Neither: every post."},"keywords":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"description":"Empty: any comment fires it."},"matchMode":{"default":"contains","type":"string","enum":["contains","word","exact"]},"excludeKeywords":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"dmMessage":{"type":"string","minLength":1,"maxLength":1000,"description":"Private message to the commenter. Instagram and Facebook only, required there."},"buttons":{"default":[],"maxItems":3,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["url","postback"]},"title":{"type":"string","minLength":1,"maxLength":20},"url":{"type":"string","format":"uri"},"payload":{"type":"string","maxLength":1000}},"required":["type","title"],"additionalProperties":false},"description":"Up to 3 buttons under the DM."},"commentReply":{"type":"string","minLength":1,"maxLength":2000,"description":"Public reply to the comment. Required on TikTok, Threads, LinkedIn and YouTube."},"dmDelaySeconds":{"type":"integer","minimum":0,"maximum":86400},"repeat":{"default":"once","type":"string","enum":["once","every_comment"],"description":"`once`: one DM per person."},"likeComment":{"default":false,"type":"boolean"},"hideComment":{"default":false,"type":"boolean"},"active":{"default":true,"type":"boolean"},"accountId":{"type":"string","minLength":1,"description":"Instagram, Facebook, TikTok, Threads, LinkedIn or YouTube account."}},"required":["name","accountId"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"name":{"type":"string"},"trigger":{"type":"string","enum":["comment","story_reply"]},"postId":{"type":["string","null"]},"inboxPostId":{"type":["string","null"]},"keywords":{"type":"array","items":{"type":"string"}},"matchMode":{"type":"string","enum":["contains","word","exact"]},"excludeKeywords":{"type":"array","items":{"type":"string"}},"dmMessage":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["url","postback"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"payload":{"type":"string"}},"required":["type","title"]}},"commentReply":{"type":"string"},"dmDelaySeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repeat":{"type":"string","enum":["once","every_comment"]},"likeComment":{"type":"boolean"},"hideComment":{"type":"boolean"},"active":{"type":"boolean"},"stats":{"type":"object","properties":{"triggered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsFailed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uniqueContacts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linkClicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["triggered","dmsSent","dmsFailed","uniqueContacts","linkClicks"]},"createdAt":{"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))$"}},"required":["id","accountId","platform","name","trigger","postId","inboxPostId","keywords","matchMode","excludeKeywords","buttons","repeat","likeComment","hideComment","active","stats"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/automations/{id}":{"get":{"operationId":"getAutomation","tags":["automations"],"summary":"Get an automation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"name":{"type":"string"},"trigger":{"type":"string","enum":["comment","story_reply"]},"postId":{"type":["string","null"]},"inboxPostId":{"type":["string","null"]},"keywords":{"type":"array","items":{"type":"string"}},"matchMode":{"type":"string","enum":["contains","word","exact"]},"excludeKeywords":{"type":"array","items":{"type":"string"}},"dmMessage":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["url","postback"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"payload":{"type":"string"}},"required":["type","title"]}},"commentReply":{"type":"string"},"dmDelaySeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repeat":{"type":"string","enum":["once","every_comment"]},"likeComment":{"type":"boolean"},"hideComment":{"type":"boolean"},"active":{"type":"boolean"},"stats":{"type":"object","properties":{"triggered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsFailed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uniqueContacts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linkClicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["triggered","dmsSent","dmsFailed","uniqueContacts","linkClicks"]},"createdAt":{"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))$"}},"required":["id","accountId","platform","name","trigger","postId","inboxPostId","keywords","matchMode","excludeKeywords","buttons","repeat","likeComment","hideComment","active","stats"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateAutomation","tags":["automations"],"summary":"Update or pause an automation","description":"Fields you leave out keep their value. `active: false` pauses it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"trigger":{"type":"string","enum":["comment","story_reply"],"description":"`story_reply`: replies to an Instagram story."},"postId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"A Crier post to watch."},"inboxPostId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Or a post as GET /v1/inbox/posts lists it. Neither: every post."},"keywords":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"description":"Empty: any comment fires it."},"matchMode":{"type":"string","enum":["contains","word","exact"]},"excludeKeywords":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"dmMessage":{"type":"string","minLength":1,"maxLength":1000,"description":"Private message to the commenter. Instagram and Facebook only, required there."},"buttons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["url","postback"]},"title":{"type":"string","minLength":1,"maxLength":20},"url":{"type":"string","format":"uri"},"payload":{"type":"string","maxLength":1000}},"required":["type","title"],"additionalProperties":false},"description":"Up to 3 buttons under the DM."},"commentReply":{"type":"string","minLength":1,"maxLength":2000,"description":"Public reply to the comment. Required on TikTok, Threads, LinkedIn and YouTube."},"dmDelaySeconds":{"type":"integer","minimum":0,"maximum":86400},"repeat":{"type":"string","enum":["once","every_comment"],"description":"`once`: one DM per person."},"likeComment":{"type":"boolean"},"hideComment":{"type":"boolean"},"active":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"name":{"type":"string"},"trigger":{"type":"string","enum":["comment","story_reply"]},"postId":{"type":["string","null"]},"inboxPostId":{"type":["string","null"]},"keywords":{"type":"array","items":{"type":"string"}},"matchMode":{"type":"string","enum":["contains","word","exact"]},"excludeKeywords":{"type":"array","items":{"type":"string"}},"dmMessage":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["url","postback"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"payload":{"type":"string"}},"required":["type","title"]}},"commentReply":{"type":"string"},"dmDelaySeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"repeat":{"type":"string","enum":["once","every_comment"]},"likeComment":{"type":"boolean"},"hideComment":{"type":"boolean"},"active":{"type":"boolean"},"stats":{"type":"object","properties":{"triggered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsSent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dmsFailed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"uniqueContacts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"linkClicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["triggered","dmsSent","dmsFailed","uniqueContacts","linkClicks"]},"createdAt":{"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))$"}},"required":["id","accountId","platform","name","trigger","postId","inboxPostId","keywords","matchMode","excludeKeywords","buttons","repeat","likeComment","hideComment","active","stats"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteAutomation","tags":["automations"],"summary":"Delete an automation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/automations/{id}/logs":{"get":{"operationId":"listAutomationLogs","tags":["automations"],"summary":"What an automation did","description":"Every comment that fired it, newest first, with the DM outcome.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"commenter":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"}}},"commentText":{"type":"string"},"status":{"type":"string","enum":["pending","sent","failed","skipped","gated"]},"error":{"type":"string"},"replyStatus":{"type":"string"},"clicked":{"type":"boolean"},"createdAt":{"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))$"}},"required":["id","commenter","status","clicked","createdAt"]}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","total"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/followers":{"get":{"operationId":"getFollowers","tags":["analytics"],"summary":"Followers and growth","description":"Current followers, growth over the period and the daily history of each account. Refreshed once a day.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"description":"Only this account; the whole profile otherwise.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"description":"First day (YYYY-MM-DD). Defaults to 30 days ago.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last day (YYYY-MM-DD). Defaults to today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"username":{"type":"string"},"followers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"growth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Change over the period."},"growthPercent":{"type":"number"},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"YYYY-MM-DD"},"followers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","followers"]}}},"required":["accountId","platform","followers","growth","growthPercent","history"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/daily":{"get":{"operationId":"getDailyMetrics","tags":["analytics"],"summary":"Daily totals","description":"Posts and engagement per day (counted on the day it arrived), and totals per network.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"description":"Only this account; the whole profile otherwise.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"description":"First day (YYYY-MM-DD). Defaults to 30 days ago.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last day (YYYY-MM-DD). Defaults to today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"YYYY-MM-DD"},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metrics":{"type":"object","properties":{"impressions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shares":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saves":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engagementRate":{"type":"number","description":"Percentage: interactions over impressions (or reach)."}},"required":["impressions","reach","views","likes","comments","shares","saves","clicks","engagementRate"]}},"required":["date","posts","metrics"]}},"byPlatform":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metrics":{"type":"object","properties":{"impressions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shares":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saves":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engagementRate":{"type":"number","description":"Percentage: interactions over impressions (or reach)."}},"required":["impressions","reach","views","likes","comments","shares","saves","clicks","engagementRate"]}},"required":["platform","posts","metrics"]}}},"required":["days","byPlatform"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/best-times":{"get":{"operationId":"getBestTimes","tags":["analytics"],"summary":"Best times to post","description":"Average engagement per weekday and hour, from the account’s published posts.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"description":"Only this account; the whole profile otherwise.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"0 = Sunday … 6 = Saturday"},"hour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Hour in UTC"},"avgEngagement":{"type":"number"},"posts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["dayOfWeek","hour","avgEngagement","posts"]},"description":"Best slots first."}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/analytics/top-posts":{"get":{"operationId":"getTopPosts","tags":["analytics"],"summary":"Top posts","description":"Posts of the period by engagement (or date), including those published outside Crier.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"accountId","in":"query","required":false,"description":"Only this account; the whole profile otherwise.","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"description":"First day (YYYY-MM-DD). Defaults to 30 days ago.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"Last day (YYYY-MM-DD). Defaults to today.","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["engagement","date"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"postId":{"description":"The Crier post, when it was published through Crier.","type":["string","null"]},"accountId":{"type":["string","null"]},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"publishedAt":{"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))$"},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"metrics":{"type":"object","properties":{"impressions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reach":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"likes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shares":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"saves":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"engagementRate":{"type":"number","description":"Percentage: interactions over impressions (or reach)."}},"required":["impressions","reach","views","likes","comments","shares","saves","clicks","engagementRate"]},"external":{"type":"boolean","description":"Published outside Crier."}},"required":["postId","accountId","platform","content","metrics","external"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/media/upload-url":{"post":{"operationId":"createUploadUrl","tags":["media"],"summary":"Get an upload URL","description":"JPEG, PNG, WebP and GIF up to 20 MB; MP4, MOV and WebM up to 1 GB. PUT the file to `uploadUrl`, then post `publicUrl`.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":3},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["filename","contentType","size"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"uploadUrl":{"type":"string","format":"uri","description":"Pre-signed URL: PUT the file there with the same Content-Type."},"publicUrl":{"type":"string","format":"uri","description":"Use it in a post's media once uploaded."},"kind":{"type":"string","enum":["image","gif","video"]},"expiresIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seconds the upload URL stays valid."}},"required":["uploadUrl","publicUrl","kind","expiresIn"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhook-endpoint":{"get":{"operationId":"getWebhookEndpoint","tags":["webhooks"],"summary":"Get the webhook endpoint","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["account.connected","account.disconnected","post.scheduled","post.published","post.partial","post.failed","post.cancelled","post.removed","post.rejected","post.recycled","message.received","comment.received","review.received"]}},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["url","events","createdAt","updatedAt"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setWebhookEndpoint","tags":["webhooks"],"summary":"Set the webhook endpoint","description":"Omit `events` to receive all of them. The signing secret is returned only the first time.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"starts_with","pattern":"^https:\\/\\/.*"},"events":{"type":"array","items":{"type":"string","enum":["account.connected","account.disconnected","post.scheduled","post.published","post.partial","post.failed","post.cancelled","post.removed","post.rejected","post.recycled","message.received","comment.received","review.received"]}}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpoint":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["account.connected","account.disconnected","post.scheduled","post.published","post.partial","post.failed","post.cancelled","post.removed","post.rejected","post.recycled","message.received","comment.received","review.received"]}},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["url","events","createdAt","updatedAt"]},"secret":{"description":"Signing secret, returned only when the endpoint is created.","type":"string"}},"required":["endpoint"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhookEndpoint","tags":["webhooks"],"summary":"Delete the webhook endpoint","parameters":[],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing":{"get":{"operationId":"getBilling","tags":["billing"],"summary":"Get the balance","description":"Balance, connected accounts and what they cost. With the balance used up, connecting beyond the free accounts, and publishing or sending from accounts beyond them or on X, answer 402.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"False while billing is not available: nothing is charged or limited."},"balance":{"type":"number","description":"Prepaid balance in cents (up to three decimals). Negative when charges outran it."},"currency":{"type":"string"},"connectedAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"freeAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthlyEstimate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Monthly price of the accounts connected now, in cents. It is charged day by day."},"dailyEstimate":{"type":"number","description":"What those accounts cost today, in cents (up to three decimals)."},"daysLeft":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Whole days the balance covers at that cost; null when nothing is charged daily."},"lines":{"type":"array","items":{"type":"object","properties":{"from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"to":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unitAmount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Cents per account and month."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","accounts","unitAmount","amount"]}},"canConnectMore":{"type":"boolean","description":"Whether one more account can be connected right now."},"blocked":{"type":"boolean","description":"The balance is used up: accounts beyond the free ones, and X accounts, cannot publish or send until it is topped up."},"card":{"description":"The saved payment method, for automatic recharges.","type":"object","properties":{"brand":{"type":"string","description":"Card brand (`visa`, `mastercard`…) or another saved method (`link`, `sepa_debit`)."},"last4":{"type":"string"},"expMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["brand"]},"autoRecharge":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recharge when the balance falls below this, in cents."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What each recharge adds, in cents."},"monthlyLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Most that automatic recharges add in a calendar month, in cents."}},"required":["enabled","threshold","amount","monthlyLimit"]},"autoRechargeError":{"description":"Why the last automatic recharge failed; it switched itself off.","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))$"},"message":{"type":"string"}},"required":["at","message"]},"autoRechargedThisMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Added by automatic recharges this calendar month, in cents."},"topUp":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"description":"Allowed top-up amounts, in cents."},"hasPortal":{"type":"boolean","description":"Whether the billing portal (invoices, payment method) is available."}},"required":["enabled","balance","currency","connectedAccounts","freeAccounts","monthlyEstimate","dailyEstimate","daysLeft","lines","canConnectMore","blocked","autoRechargedThisMonth","topUp","hasPortal"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/movements":{"get":{"operationId":"listBillingMovements","tags":["billing"],"summary":"List balance movements","description":"Top-ups and charges, newest first.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["top_up","auto_recharge","accounts","usage","adjustment"]},"amount":{"type":"number","description":"Cents (up to three decimals): positive adds, negative debits."},"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))$"},"day":{"description":"UTC day (YYYY-MM-DD) a charge covers.","type":"string"},"accounts":{"description":"Accounts a day was charged for.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"family":{"description":"Usage family of a usage charge.","type":"string","enum":["xApi","messages"]}},"required":["id","kind","amount","at"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/top-up":{"post":{"operationId":"topUpBalance","tags":["billing"],"summary":"Top up the balance","description":"Opens a payment page. The balance grows once the payment succeeds; the card is saved for automatic recharges.","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Balance to add, in cents (taxes, if any, on top). Limits come with GET /v1/billing."},"successUrl":{"type":"string","format":"uri","description":"Dashboard page to come back to after paying."},"cancelUrl":{"type":"string","format":"uri","description":"Dashboard page to come back to if the user leaves Checkout."}},"required":["amount","successUrl","cancelUrl"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Send the user here."}},"required":["url"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/auto-recharge":{"put":{"operationId":"setAutoRecharge","tags":["billing"],"summary":"Set automatic recharges","description":"Tops up the saved card when the balance falls below the threshold, up to a monthly limit. Needs one top-up first.","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"threshold":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Recharge when the balance falls below this, in cents."},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"What each recharge adds, in cents."},"monthlyLimit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Most that automatic recharges may add in a calendar month, in cents."}},"required":["enabled","threshold","amount","monthlyLimit"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"False while billing is not available: nothing is charged or limited."},"balance":{"type":"number","description":"Prepaid balance in cents (up to three decimals). Negative when charges outran it."},"currency":{"type":"string"},"connectedAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"freeAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthlyEstimate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Monthly price of the accounts connected now, in cents. It is charged day by day."},"dailyEstimate":{"type":"number","description":"What those accounts cost today, in cents (up to three decimals)."},"daysLeft":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Whole days the balance covers at that cost; null when nothing is charged daily."},"lines":{"type":"array","items":{"type":"object","properties":{"from":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"to":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unitAmount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Cents per account and month."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","accounts","unitAmount","amount"]}},"canConnectMore":{"type":"boolean","description":"Whether one more account can be connected right now."},"blocked":{"type":"boolean","description":"The balance is used up: accounts beyond the free ones, and X accounts, cannot publish or send until it is topped up."},"card":{"description":"The saved payment method, for automatic recharges.","type":"object","properties":{"brand":{"type":"string","description":"Card brand (`visa`, `mastercard`…) or another saved method (`link`, `sepa_debit`)."},"last4":{"type":"string"},"expMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["brand"]},"autoRecharge":{"type":"object","properties":{"enabled":{"type":"boolean"},"threshold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recharge when the balance falls below this, in cents."},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What each recharge adds, in cents."},"monthlyLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Most that automatic recharges add in a calendar month, in cents."}},"required":["enabled","threshold","amount","monthlyLimit"]},"autoRechargeError":{"description":"Why the last automatic recharge failed; it switched itself off.","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))$"},"message":{"type":"string"}},"required":["at","message"]},"autoRechargedThisMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Added by automatic recharges this calendar month, in cents."},"topUp":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"description":"Allowed top-up amounts, in cents."},"hasPortal":{"type":"boolean","description":"Whether the billing portal (invoices, payment method) is available."}},"required":["enabled","balance","currency","connectedAccounts","freeAccounts","monthlyEstimate","dailyEstimate","daysLeft","lines","canConnectMore","blocked","autoRechargedThisMonth","topUp","hasPortal"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/portal":{"post":{"operationId":"openBillingPortal","tags":["billing"],"summary":"Open the billing portal","description":"Invoices and the saved payment method.","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"returnUrl":{"type":"string","format":"uri","description":"Dashboard page to come back to."}},"required":["returnUrl"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Send the user here."}},"required":["url"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys":{"get":{"operationId":"listApiKeys","tags":["api-keys"],"summary":"List API keys","x-dashboard-only":true,"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"createdAt":{"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))$"},"revokedAt":{"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))$"}},"required":["id","name","prefix","createdAt"]}}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApiKey","tags":["api-keys"],"summary":"Create an API key","x-dashboard-only":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"createdAt":{"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))$"},"revokedAt":{"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))$"}},"required":["id","name","prefix","createdAt"]},"secret":{"type":"string","description":"The full key, shown only this once."}},"required":["key","secret"]}}}}}},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys/{id}":{"delete":{"operationId":"revokeApiKey","tags":["api-keys"],"summary":"Revoke an API key","x-dashboard-only":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request (`invalid_request`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid credentials (`unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (`not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The network rejected the request (`provider_rejected`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Temporarily unavailable, retry later (`provider_unavailable`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"event":{"post":{"summary":"Crier event","description":"POSTed to your endpoint with the headers `Crier-Event`, `Crier-Event-Id` and `Crier-Signature: t=<unix seconds>,v1=<hex>`, where v1 is the HMAC-SHA256 of `<t>.<raw body>` with your signing secret. Answer 2xx within 10 seconds; failures are retried.","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["account.connected","account.disconnected","post.scheduled","post.published","post.partial","post.failed","post.cancelled","post.removed","post.rejected","post.recycled","message.received","comment.received","review.received"]},"createdAt":{"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))$"},"data":{"type":"object","properties":{"post":{"description":"post.* events.","type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"targets":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"content":{"type":"string"},"media":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image","video","gif","document"]},"url":{"type":"string","format":"uri"},"altText":{"type":"string","maxLength":1000}},"required":["type","url"]}},"status":{"type":"string","enum":["pending","published","failed","removed"]},"url":{"description":"The live post, once published.","type":"string","format":"uri"},"error":{"type":"string"}},"required":["accountId","platform","status"],"additionalProperties":{},"description":"Also carries the network options sent for this target."}},"status":{"type":"string","enum":["draft","pending_approval","scheduled","publishing","published","partial","failed","cancelled"]},"scheduledFor":{"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))$"},"approval":{"description":"Present once the post went through review.","type":"object","properties":{"requestedBy":{"description":"User who asked for it; absent when an API key did.","type":"string"},"requestedAt":{"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))$"},"queue":{"description":"Approving puts it in the profile’s queue.","type":"boolean"},"decision":{"type":"string","enum":["approved","rejected"]},"decidedBy":{"type":"string"},"decidedAt":{"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))$"},"note":{"description":"Why it was rejected.","type":"string"}},"required":["requestedAt"]},"recycling":{"description":"Present once recycling was turned on.","type":"object","properties":{"active":{"type":"boolean"},"every":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","enum":["week","month"]},"startAt":{"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))$"},"maxCopies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"until":{"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))$"},"variations":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string"},"copies":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Copies created so far."},"nextAt":{"description":"When the next copy goes out; absent once it stopped.","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))$"},"lastCopyId":{"description":"The latest copy, a post of its own.","type":"string"}},"required":["active","every","unit","copies"]},"recycledFrom":{"description":"On a recycled copy: the original post.","type":"string"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","content","media","targets","status","createdAt","updatedAt"]},"account":{"description":"account.* events.","type":"object","properties":{"id":{"type":"string"},"profileId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","needs_reconnection","disconnected"]},"connectedAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","profileId","platform","status","connectedAt","updatedAt"]},"accountId":{"description":"Inbox events: the account it happened on.","type":"string"},"profileId":{"type":"string"},"platform":{"type":"string","enum":["instagram","tiktok","youtube","linkedin","x","facebook","threads","pinterest","bluesky","reddit","google-business","telegram","discord","snapchat"]},"conversationId":{"description":"message.received: use it with /v1/inbox/conversations/{id}.","type":"string"},"message":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"sentAt":{"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))$"},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["type"]}},"sender":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"picture":{"type":"string","format":"uri"}}}},"required":["id","text","attachments","sender"]},"postId":{"description":"comment.received: use it with /v1/inbox/posts/{id}/comments.","type":"string"},"crierPostId":{"description":"comment.received: the Crier post, when it was published through Crier.","type":["string","null"]},"comment":{"type":"object","properties":{"id":{"type":"string","description":"Use it as commentId to reply."},"text":{"type":"string"},"createdAt":{"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))$"},"parentId":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"},"username":{"type":"string"},"picture":{"type":"string","format":"uri"},"isOwner":{"type":"boolean"}},"required":["isOwner"]}},"required":["id","text","author"]},"review":{"type":"object","properties":{"id":{"type":"string","description":"Use it with /v1/inbox/reviews/{id}/reply."},"rating":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"text":{"type":"string"},"createdAt":{"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))$"},"reviewer":{"type":"object","properties":{"name":{"type":"string"},"picture":{"type":"string","format":"uri"}}}},"required":["id","rating","text","reviewer"]}},"description":"What changed; which fields are present depends on type."}},"required":["id","type","createdAt","data"]}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Your API key, `crier_live_…`, created in the dashboard."}},"schemas":{"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}