{"openapi":"3.1.0","info":{"title":"WaSparks Social API","description":"Publish to Facebook Pages, Instagram and LinkedIn, and handle the comments and messages that come back, through one API: connect your users' accounts with embedded OAuth, schedule posts to several accounts at once, answer comments and direct messages, and receive signed webhooks when anything changes.\n\nThere are two keys. A **partner key** calls the Partner API under `/v1/partner` to provision orgs, plans, org keys and branding, and sees usage counts only. An **org key** calls the Content API under `/v1` for one org's accounts and content. A partner in OPERATOR mode may also call the Content API with its partner key, naming the org in the `X-Tenant-Id` header (the org's `external_ref`). Guides, quick starts and the changelog: https://docs.social.wasparks.com","termsOfService":"https://social.wasparks.com/terms/","contact":{"name":"WaSparks","url":"https://docs.social.wasparks.com","email":"hello@wasparks.com"},"version":"1.0.5","x-privacy-policy":"https://social.wasparks.com/privacy/"},"servers":[{"url":"https://connect.social.wasparks.com","description":"Production"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Partner · Orgs","description":"The organizations you provision for your clients: create one per client, put it on one of your plans, and suspend, resume or close it. You see names, status, plan and counts only, never an org's accounts or content. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permissions: `orgs:read`, `orgs:write`."},{"name":"Partner · Org API keys","description":"Org keys you mint so your software can call the Content API on behalf of one of your orgs. The plaintext key is returned once, at creation; every mint is audit-logged, and the org can list and revoke its keys. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permission: `org_keys:write`."},{"name":"Partner · Plans","description":"Your own plans: the limits (social accounts, posts per month, members, workspaces) your orgs are held to, addressed by `code`. The listing also shows the platform plans you may assign. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permissions: `plans:read`, `plans:write`."},{"name":"Partner · Redirect URIs","description":"The `redirect_uri` allow-list for connect sessions. An entry here applies to every one of your orgs; matching is exact and https only. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permission: `orgs:write`."},{"name":"Partner · Usage","description":"Usage counts across your orgs, which is what you are billed on: per org, per event type or per day. Counts only, never what was published. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permission: `usage:read`."},{"name":"Partner · Branding","description":"White-label branding for the partner app: product name, logo, colour, email sender and support link. Stored now, rendered by the white-label app. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permission: `branding:write`."},{"name":"Partner · Domains","description":"Custom hostnames (CNAMEs) that serve your white-label app. Add one, point its CNAME at us, then verify it. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permission: `domains:write`."},{"name":"Partner · Webhooks","description":"Your outbound webhook subscriptions. A DELEGATED partner hears partner events only (`org.*`, `usage.daily_ready`, `webhook.disabled`); an OPERATOR partner may also subscribe to content events and hears them for all of its orgs, each envelope naming `org_id`. Payloads are documented under `webhooks`. Partner API: call it with a partner key. An org key is refused with `403 org_key_not_allowed`. Permission: `partner_webhooks:write`."},{"name":"Org & workspaces","description":"The calling org (its plan and usage against limits) and its workspaces, the brands inside an org that every account, post and conversation belongs to. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Reading needs no permission; changes need `workspaces:write`."},{"name":"Connect","description":"Embedded OAuth: create a connect session, send your user to its `url`, then read what they granted and connect the accounts they pick. Also the org's own `redirect_uri` allow-list. Guide: `/guides/connect/`. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permissions: `accounts:read`, `accounts:write`."},{"name":"Accounts","description":"Connected social accounts (Facebook Pages, Instagram business accounts, LinkedIn organizations and member profiles): list them, check their credential and disconnect them. `capabilities` says what each one can do. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permissions: `accounts:read`, `accounts:write`."},{"name":"Media","description":"Images, videos and documents to attach to posts: register a public URL for us to fetch, or upload the bytes to a signed URL. Each item is checked against every platform's rules. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permission: `media:write`."},{"name":"Posts","description":"Compose, schedule and publish one post to several accounts at once, each account a target with its own status, permalink and error. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permissions: `posts:read`, `posts:write`."},{"name":"Comments","description":"Comments on your accounts' posts, from Facebook and Instagram (webhooks) and LinkedIn (polling): read, reply, comment, hide, delete and react. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permissions: `comments:read`, `comments:write`."},{"name":"Conversations","description":"Messenger and Instagram DM conversations: read threads and messages, send within the 24-hour reply window, and mark read, close or reopen. LinkedIn has no messaging. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permissions: `messages:read`, `messages:write`."},{"name":"Webhook subscriptions","description":"The org's outbound webhooks: subscribe an https URL to event types, send a test, inspect deliveries and redeliver. Every delivery is a signed `WebhookEnvelope`; each event type and its payload is documented under `webhooks`. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permission: `webhooks:write`."},{"name":"Usage","description":"The org's own usage counts and plan limits, per event type or per day. Content API: call it with an org key, or with an OPERATOR partner's key plus `X-Tenant-Id` (the org's `external_ref`). Permission: `usage:read`."}],"paths":{"/v1/partner/branding":{"get":{"tags":["Partner · Branding"],"summary":"Get your branding","description":"Returns your white-label branding; fields never set are null. Permission: `[branding:write]`. No errors specific to this operation.","operationId":"getBranding","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Branding"},"example":{"product_name":"Acme Social","logo_url":"https://cdn.acmecoffee.example/brand/logo.png","favicon_url":"https://cdn.acmecoffee.example/brand/favicon.ico","primary_color":"#6f4e37","email_sender_name":"Acme Social","email_sender_address":"social@acmecoffee.example","support_url":"https://help.acmecoffee.example"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"put":{"tags":["Partner · Branding"],"summary":"Update your branding","description":"Changes your white-label branding. Only the fields you send change; send an empty string to clear one. Permission: `[branding:write]`. Errors to handle: `400 validation_failed` (a colour that is not `#rrggbb`, or a bad email address).","operationId":"updateBranding","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrandingRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Branding"},"example":{"product_name":"Acme Social","logo_url":"https://cdn.acmecoffee.example/brand/logo.png","favicon_url":"https://cdn.acmecoffee.example/brand/favicon.ico","primary_color":"#6f4e37","email_sender_name":"Acme Social","email_sender_address":"social@acmecoffee.example","support_url":"https://help.acmecoffee.example"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/workspaces":{"get":{"tags":["Org & workspaces"],"summary":"List workspaces","description":"Lists the org's workspaces, the default one included. All come on one page. Any valid key for the org; no permission needed. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). No errors specific to this operation.","operationId":"listWorkspaces","parameters":[{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkspaceList"},"example":{"data":[{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","name":"Acme Coffee","is_default":true,"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Org & workspaces"],"summary":"Create a workspace","description":"Adds a workspace, such as a brand or a location, to the org; it counts against the plan's `workspaces` limit. Accounts, posts and media are then created in it by passing its `workspace_id`. Permission: `[workspaces:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (missing `name`), `402 quota_exceeded` (`workspaces`).","operationId":"createWorkspace","parameters":[{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Workspace"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","name":"Acme Coffee","is_default":true,"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/workspaces/{workspaceId}/archive":{"post":{"tags":["Org & workspaces"],"summary":"Archive a workspace","description":"Archives a workspace. The default workspace cannot be archived. Permission: `[workspaces:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `409 invalid_state` (the default workspace).","operationId":"archiveWorkspace","parameters":[{"name":"workspaceId","in":"path","description":"The workspace's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Workspace"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","name":"Acme Coffee","is_default":true,"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/webhook-subscriptions":{"get":{"tags":["Webhook subscriptions"],"summary":"List webhook subscriptions","description":"Lists the org's subscriptions, without their secrets. All come on one page. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). No errors specific to this operation.","operationId":"listWebhookSubscriptions","parameters":[{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionList"},"example":{"data":[{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Webhook subscriptions"],"summary":"Create a webhook subscription","description":"Subscribes an https URL to org event types; every event and its payload is listed under `webhooks`. The signing `secret` is in this response only: verify `X-WSS-Signature` on every delivery with it. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (an unknown or partner-only event type, or a URL that is not https).","operationId":"createWebhookSubscription","parameters":[{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookSubscriptionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreatedWebhookSubscription"},"example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","secret":"4b7d0e2f9a1c3e5f7a9b1d3f5e7c9a0b2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/webhook-subscriptions/{subscriptionId}/test":{"post":{"tags":["Webhook subscriptions"],"summary":"Send a test event","description":"Sends a signed `webhook.test` envelope to the URL now and reports how it went. It is not stored or retried, never counts towards disabling, and works on a disabled subscription. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"testWebhookSubscription","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"},"example":{"delivered":true,"status_code":200,"error":null,"duration_ms":182}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/webhook-subscriptions/deliveries/{deliveryId}/redeliver":{"post":{"tags":["Webhook subscriptions"],"summary":"Redeliver a delivery","description":"Queues a delivery to be sent again with the same event, whatever its earlier outcome. The consumer sees the same envelope `id`, so its dedupe still holds. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `409 invalid_state` (already queued, or the subscription is disabled).","operationId":"redeliverWebhookDelivery","parameters":[{"name":"deliveryId","in":"path","description":"The delivery's id, from the deliveries list.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"},"example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101","subscription_id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","event_id":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001","event_type":"post.published","status":"DELIVERED","attempts":1,"last_status_code":200,"next_attempt_at":"2026-11-02T09:01:04Z","delivered_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/posts":{"get":{"tags":["Posts"],"summary":"List posts","description":"Lists the org's posts, newest first, optionally filtered by status, account or workspace. Permission: `[posts:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (a bad `limit` or `cursor`).","operationId":"listPosts","parameters":[{"name":"status","in":"query","description":"Only posts in this status, such as `SCHEDULED` or `FAILED`.","required":false,"schema":{"type":"string","enum":["DRAFT","SCHEDULED","PUBLISHING","PUBLISHED","PARTIAL","FAILED","CANCELLED"]},"example":"SCHEDULED"},{"name":"account_id","in":"query","description":"Only posts with a target on this account.","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"name":"workspace_id","in":"query","description":"Only posts in this workspace.","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PostList"},"example":{"data":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Posts"],"summary":"Create a post","description":"Creates a post to one or more accounts: published now, at `scheduled_at`, or saved with `draft: true`. It is validated for every platform before anything is queued, and counts towards `posts_per_month`; `Idempotency-Key` makes a retry safe. Permission: `[posts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (`details.fields` lists each account's problems), `400 media_not_ready`, `402 quota_exceeded` (`posts_per_month`), `409 idempotency_conflict`.","operationId":"createPost","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Post"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/posts/{postId}/targets/{targetId}/retry":{"post":{"tags":["Posts"],"summary":"Retry a failed target","description":"Queues a `FAILED` target for another attempt and puts the post back to `PUBLISHING`. A target that failed with `publish_outcome_unknown` may have been published, so retrying it can publish twice. Permission: `[posts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `409 invalid_state` (the target is not `FAILED`).","operationId":"retryPostTarget","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"name":"targetId","in":"path","description":"The target's id: one entry of the post's `targets`.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Post"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/posts/{postId}/targets/{targetId}/comments":{"post":{"tags":["Comments"],"summary":"Comment on a published post","description":"Posts a top-level comment as the account on one of its published targets and returns it. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (the account lacks the `comments` capability), `404 not_found`, `409 invalid_state` (the target is not published), `422 account_needs_reauth`, `422 platform_rejected`.","operationId":"createPostTargetComment","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"name":"targetId","in":"path","description":"The target's id: one entry of the post's `targets`.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentTextRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Comment"},"example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/posts/{postId}/publish":{"post":{"tags":["Posts"],"summary":"Publish a post now","description":"Publishes a `DRAFT` or `SCHEDULED` post immediately. Follow its targets, or the `post.*` webhooks, for the outcome. Permission: `[posts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `409 invalid_state` (not a draft or scheduled post).","operationId":"publishPost","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Post"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/posts/{postId}/cancel":{"post":{"tags":["Posts"],"summary":"Cancel a scheduled post","description":"Cancels a `SCHEDULED` or `DRAFT` post before it is published; it becomes `CANCELLED`. Permission: `[posts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `409 invalid_state` (already publishing or published).","operationId":"cancelPost","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Post"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/webhook-subscriptions":{"get":{"tags":["Partner · Webhooks"],"summary":"List webhook subscriptions","description":"Lists your partner subscriptions, without their secrets. All come on one page. Permission: `[partner_webhooks:write]`. No errors specific to this operation.","operationId":"listPartnerWebhookSubscriptions","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionList"},"example":{"data":[{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Partner · Webhooks"],"summary":"Create a webhook subscription","description":"Subscribes an https URL to partner events (`org.*`, `usage.daily_ready`, `webhook.disabled`); an OPERATOR partner may add content events and then receives them for all its orgs, each naming its `org_id`. The signing `secret` is in this response only. Permission: `[partner_webhooks:write]`. Errors to handle: `400 validation_failed` (an unknown or disallowed event type, or a URL that is not https).","operationId":"createPartnerWebhookSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookSubscriptionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreatedWebhookSubscription"},"example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","secret":"4b7d0e2f9a1c3e5f7a9b1d3f5e7c9a0b2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/webhook-subscriptions/{subscriptionId}/test":{"post":{"tags":["Partner · Webhooks"],"summary":"Send a test event","description":"Sends a signed `webhook.test` envelope to the URL now and reports how it went. It is not stored or retried, never counts towards disabling, and works on a disabled subscription. Permission: `[partner_webhooks:write]`. Errors to handle: `404 not_found`.","operationId":"testPartnerWebhookSubscription","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookTestResult"},"example":{"delivered":true,"status_code":200,"error":null,"duration_ms":182}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/redirect-uris":{"get":{"tags":["Partner · Redirect URIs"],"summary":"List redirect URIs","description":"Lists the `redirect_uri` values every one of your orgs may use in connect sessions. Permission: `[orgs:write]`. No errors specific to this operation.","operationId":"listPartnerRedirectUris","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedirectUriList"},"example":{"data":[{"id":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001","uri":"https://app.acmecoffee.example/social/connected","owner_scope":"PARTNER","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Partner · Redirect URIs"],"summary":"Add a redirect URI","description":"Allows a `redirect_uri` in the connect sessions of all your orgs. Matching is exact, https only (`http://localhost` with test keys); adding one already listed returns it. Permission: `[orgs:write]`. Errors to handle: `400 validation_failed` (not https, or malformed).","operationId":"addPartnerRedirectUri","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRedirectUriRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedirectUri"},"example":{"id":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001","uri":"https://app.acmecoffee.example/social/connected","owner_scope":"PARTNER","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/plans":{"get":{"tags":["Partner · Plans"],"summary":"List plans","description":"Lists the plans you may put orgs on: your own and the platform's. All plans come on one page. Permission: `[plans:read]`. No errors specific to this operation.","operationId":"listPlans","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PlanList"},"example":{"data":[{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3},"status":"ACTIVE"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Partner · Plans"],"summary":"Create a plan","description":"Creates one of your own plans. Use its `code` as `plan_code` when creating or updating orgs. Permission: `[plans:write]`. Errors to handle: `400 validation_failed` (a bad `code` or limit), `409 invalid_state` (`code` already used).","operationId":"createPlan","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Plan"},"example":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3},"status":"ACTIVE"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs":{"get":{"tags":["Partner · Orgs"],"summary":"List orgs","description":"Lists your orgs, newest first. Filter by `external_ref` to find the org of one of your clients. Permission: `[orgs:read]`. Errors to handle: `400 validation_failed` (a bad filter, `limit` or `cursor`).","operationId":"listOrgs","parameters":[{"name":"status","in":"query","description":"Only orgs in this status: `ACTIVE`, `SUSPENDED` or `CLOSED`.","required":false,"schema":{"type":"string","enum":["ACTIVE","SUSPENDED","CLOSED"]},"example":"ACTIVE"},{"name":"external_ref","in":"query","description":"Only the org with this `external_ref`.","required":false,"schema":{"type":"string"},"example":"acme-coffee-42"},{"name":"plan_code","in":"query","description":"Only orgs on this plan.","required":false,"schema":{"type":"string"},"example":"growth"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrgList"},"example":{"data":[{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Partner · Orgs"],"summary":"Create an org","description":"Creates an org for one of your clients on one of your plans, with a default workspace, and sends `org.created` to your partner subscriptions. Next, mint an org key for it with `POST /v1/partner/orgs/{orgId}/api-keys`. Permission: `[orgs:write]`. Errors to handle: `400 validation_failed` (unknown `plan_code`, or an invalid field), `409 invalid_state` (`external_ref` already used by another of your orgs).","operationId":"createOrg","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}/suspend":{"post":{"tags":["Partner · Orgs"],"summary":"Suspend an org","description":"Suspends an org: its Content API calls answer `403 org_suspended` and its scheduled posts wait until it is resumed. The optional reason is audit-logged, and `org.suspended` is sent. Permission: `[orgs:write]`. Errors to handle: `404 not_found` (unknown id, or another partner's org).","operationId":"suspendOrg","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgStatusChangeRequest"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}/resume":{"post":{"tags":["Partner · Orgs"],"summary":"Resume a suspended org","description":"Makes a suspended org active again and sends `org.resumed`. Permission: `[orgs:write]`. Errors to handle: `403 org_closed` (a closed org cannot be resumed), `404 not_found` (unknown id, or another partner's org).","operationId":"resumeOrg","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}/close":{"post":{"tags":["Partner · Orgs"],"summary":"Close an org","description":"Closes an org for good: its Content API calls answer `403 org_closed` from then on. The optional reason is audit-logged, and `org.closed` is sent. Permission: `[orgs:write]`. Errors to handle: `404 not_found` (unknown id, or another partner's org).","operationId":"closeOrg","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgStatusChangeRequest"}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}/api-keys":{"get":{"tags":["Partner · Org API keys"],"summary":"List an org's API keys","description":"Lists the org's keys with their prefix, permissions and status, never the secret. All keys come on one page. Permission: `[org_keys:write]`. Errors to handle: `404 not_found` (unknown id, or another partner's org).","operationId":"listOrgApiKeys","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApiKeyList"},"example":{"data":[{"id":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001","name":"Acme Coffee production","key_prefix":"3fa9c1d2e4b5a6c7d8","environment":"LIVE","permissions":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"status":"ACTIVE","last_used_at":"2026-11-02T09:00:04Z","expires_at":"2027-11-02T00:00:00Z","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Partner · Org API keys"],"summary":"Create an org API key","description":"Mints a key your software uses to call the Content API for this org. The plaintext `key` is in this response only, so store it now; every mint is audit-logged with the partner key that made it. Permission: `[org_keys:write]`. Errors to handle: `400 validation_failed` (an unknown or non-org permission in `permissions`), `404 not_found` (unknown id, or another partner's org).","operationId":"createOrgApiKey","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"},"example":{"id":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001","key":"wsk_live_org_3fa9c1d2e4b5a6c7d8_8d2e5f0a1b3c4d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6","name":"Acme Coffee production","key_prefix":"3fa9c1d2e4b5a6c7d8","environment":"LIVE","permissions":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"status":"ACTIVE","expires_at":"2027-11-02T00:00:00Z","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/domains":{"get":{"tags":["Partner · Domains"],"summary":"List custom domains","description":"Lists your custom hostnames and their status. All come on one page. Permission: `[domains:write]`. No errors specific to this operation.","operationId":"listDomains","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DomainList"},"example":{"data":[{"id":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001","hostname":"social.acmecoffee.example","status":"PENDING","verification_token":"wasparks-verify-q8Zt3nV1mXc5LkP0aR7sWd2eYf9uBh4j","verified_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Partner · Domains"],"summary":"Add a custom domain","description":"Registers a hostname for your white-label app, in status `PENDING`. Point its CNAME at us, then call `POST /v1/partner/domains/{domainId}/verify`. Permission: `[domains:write]`. Errors to handle: `400 validation_failed` (not a bare hostname), `409 invalid_state` (hostname already registered).","operationId":"addDomain","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Domain"},"example":{"id":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001","hostname":"social.acmecoffee.example","status":"PENDING","verification_token":"wasparks-verify-q8Zt3nV1mXc5LkP0aR7sWd2eYf9uBh4j","verified_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/domains/{domainId}/verify":{"post":{"tags":["Partner · Domains"],"summary":"Verify a custom domain","description":"Marks the domain `VERIFIED`. DNS is not checked yet; we switch the domain to `ACTIVE` once we serve it. Permission: `[domains:write]`. Errors to handle: `404 not_found`.","operationId":"verifyDomain","parameters":[{"name":"domainId","in":"path","description":"The custom domain's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Domain"},"example":{"id":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001","hostname":"social.acmecoffee.example","status":"PENDING","verification_token":"wasparks-verify-q8Zt3nV1mXc5LkP0aR7sWd2eYf9uBh4j","verified_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/media":{"post":{"tags":["Media"],"summary":"Add media","description":"Registers an image, video or PDF. With `source_url` we fetch it now and it is `READY` at once; with `upload: true`, PUT the bytes to `upload_url` with the same `Content-Type`, then call `POST /v1/media/{mediaId}/complete`. Permission: `[media:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (both or neither of `source_url` and `upload`, an unsupported type, too large, or a URL we may not fetch).","operationId":"createMedia","parameters":[{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMediaRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MediaUpload"},"example":{"media":{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"},"upload_url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","upload_expires_at":"2026-11-02T09:15:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/media/{mediaId}/complete":{"post":{"tags":["Media"],"summary":"Complete a media upload","description":"Confirms the bytes were uploaded and makes the media `READY`, with its checks against each platform. Calling it again on `READY` media changes nothing. Permission: `[media:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 media_not_ready` (nothing uploaded; the media is now `FAILED`), `400 validation_failed` (the file is over the size limit), `404 not_found`.","operationId":"completeMediaUpload","parameters":[{"name":"mediaId","in":"path","description":"The media item's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Media"},"example":{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/conversations/{conversationId}/reopen":{"post":{"tags":["Conversations"],"summary":"Reopen a conversation","description":"Marks a closed conversation `OPEN` again. Permission: `[messages:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"reopenConversation","parameters":[{"name":"conversationId","in":"path","description":"The conversation's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Conversation"},"example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/conversations/{conversationId}/read":{"post":{"tags":["Conversations"],"summary":"Mark a conversation read","description":"Sets the conversation's `unread_count` to 0. Permission: `[messages:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"markConversationRead","parameters":[{"name":"conversationId","in":"path","description":"The conversation's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Conversation"},"example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/conversations/{conversationId}/messages":{"get":{"tags":["Conversations"],"summary":"List a conversation's messages","description":"Lists the conversation's messages, newest first. Permission: `[messages:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `400 validation_failed` (a bad `limit` or `cursor`).","operationId":"listMessages","parameters":[{"name":"conversationId","in":"path","description":"The conversation's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MessageList"},"example":{"data":[{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c101","conversation_id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","direction":"OUT","text":"Yes, every latte comes with oat milk on request.","attachments":[{"type":"IMAGE","url":"https://lookaside.fbsbx.com/…/image.jpg"}],"status":"SENT","error":{"code":"send_outcome_unknown","message":"The send was not confirmed in time."},"created_at":"2026-11-02T09:00:04Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Conversations"],"summary":"Send a message","description":"Sends text, media or both as the account: within 24 hours of the person's last message, or up to 7 days with `tag: HUMAN_AGENT`. The message is accepted as `QUEUED` and `message.sent` or `message.failed` follows; `Idempotency-Key` makes a retry safe. Permission: `[messages:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (no text or media, or an unavailable tag), `400 media_not_ready`, `404 not_found`, `409 idempotency_conflict`, `422 reply_window_closed`, `422 account_needs_reauth`.","operationId":"sendMessage","parameters":[{"name":"conversationId","in":"path","description":"The conversation's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},{"$ref":"#/components/parameters/TenantId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Message"},"example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c101","conversation_id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","direction":"OUT","text":"Yes, every latte comes with oat milk on request.","attachments":[{"type":"IMAGE","url":"https://lookaside.fbsbx.com/…/image.jpg"}],"status":"SENT","error":{"code":"send_outcome_unknown","message":"The send was not confirmed in time."},"created_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/conversations/{conversationId}/close":{"post":{"tags":["Conversations"],"summary":"Close a conversation","description":"Marks the conversation `CLOSED` in your inbox. The person can still write. Permission: `[messages:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"closeConversation","parameters":[{"name":"conversationId","in":"path","description":"The conversation's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Conversation"},"example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/connect/sessions":{"post":{"tags":["Connect"],"summary":"Start an OAuth session","description":"Starts embedded OAuth: redirect your user's browser to the returned `url`. After consenting they come back to `redirect_uri` with `session_id` and `status`; then read the session and connect the accounts they pick. Guide: `/guides/connect/`. Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (`redirect_uri` not on the allow-list, or an unknown feature), `404 not_found` (unknown `workspace_id`).","operationId":"createConnectSession","parameters":[{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectSessionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConnectSessionCreated"},"example":{"id":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001","url":"https://www.facebook.com/v21.0/dialog/oauth?client_id=…&state=…","expires_at":"2026-11-02T09:15:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/connect/sessions/{sessionId}/accounts":{"post":{"tags":["Connect"],"summary":"Connect accounts from a session","description":"Connects the granted accounts you pick by `external_id` and returns them; one the org already has is refreshed rather than added twice. Each account counts against the `social_accounts` limit and sends `account.connected`; the session is then `COMPLETED`. Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (an `external_id` that was not granted), `402 quota_exceeded` (`social_accounts`), `404 not_found`, `409 invalid_state` (the session is not `READY`).","operationId":"connectAccounts","parameters":[{"name":"sessionId","in":"path","description":"The connect session's id, as `POST /v1/connect/sessions` returned it and as it comes back on your `redirect_uri`.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectAccountsRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SocialAccount"}},"example":[{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"}]}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/connect/redirect-uris":{"get":{"tags":["Connect"],"summary":"List redirect URIs","description":"Lists every `redirect_uri` this org's connect sessions may use: its own entries and those its partner registered for all orgs (see `owner_scope`). Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). No errors specific to this operation.","operationId":"listRedirectUris","parameters":[{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedirectUriList"},"example":{"data":[{"id":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001","uri":"https://app.acmecoffee.example/social/connected","owner_scope":"PARTNER","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Connect"],"summary":"Add a redirect URI","description":"Allows a `redirect_uri` in this org's connect sessions. Matching is exact, https only (`http://localhost` with test keys); adding one already listed returns it. Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (not https, or malformed).","operationId":"addRedirectUri","parameters":[{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRedirectUriRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RedirectUri"},"example":{"id":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001","uri":"https://app.acmecoffee.example/social/connected","owner_scope":"PARTNER","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/comments/{commentId}/unhide":{"post":{"tags":["Comments"],"summary":"Unhide a comment","description":"Makes a hidden comment visible again and sends `comment.updated`. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (LinkedIn, or no `comment_hide` capability), `404 not_found`, `409 invalid_state` (the comment was deleted), `422 platform_rejected`.","operationId":"unhideComment","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Comment"},"example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/comments/{commentId}/replies":{"post":{"tags":["Comments"],"summary":"Reply to a comment","description":"Posts a reply as the account and returns it; `Idempotency-Key` makes a retry safe. Instagram allows replies to top-level comments only. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (the account lacks the `comments` capability), `400 unsupported_for_platform` (a reply to an Instagram reply), `404 not_found`, `409 invalid_state` (the comment was deleted), `409 idempotency_conflict`, `422 account_needs_reauth`, `422 platform_rejected`.","operationId":"replyToComment","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"$ref":"#/components/parameters/TenantId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentTextRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Comment"},"example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/comments/{commentId}/reactions":{"post":{"tags":["Comments"],"summary":"React to a comment","description":"Adds a `LIKE` from the account to the comment. The body may be left out. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (no `reactions` capability), `400 validation_failed` (a type other than `LIKE`), `404 not_found`, `422 platform_rejected`.","operationId":"addCommentReaction","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionRequest"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"delete":{"tags":["Comments"],"summary":"Remove a reaction","description":"Removes the account's reaction from the comment. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (no `reactions` capability), `400 validation_failed` (a type other than `LIKE`), `404 not_found`, `422 platform_rejected`.","operationId":"removeCommentReaction","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"name":"type","in":"query","description":"The reaction to remove: `LIKE`, the default.","required":false,"schema":{"type":"string"},"example":"LIKE"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/comments/{commentId}/hide":{"post":{"tags":["Comments"],"summary":"Hide a comment","description":"Hides the comment on Facebook or Instagram and sends `comment.hidden`. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (LinkedIn, or no `comment_hide` capability), `404 not_found`, `409 invalid_state` (the comment was deleted), `422 platform_rejected`.","operationId":"hideComment","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Comment"},"example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/accounts/{accountId}/comments/sync":{"post":{"tags":["Comments"],"summary":"Sync an account's comments now","description":"Reads the account's recent posts and their comments now, to catch up after a webhook outage or ahead of the next LinkedIn poll. New and changed comments send their usual events. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (the account lacks the `comments` capability), `404 not_found`, `409 invalid_state` (a sync of this account is already running), `422 account_needs_reauth`.","operationId":"syncAccountComments","parameters":[{"name":"accountId","in":"path","description":"The connected account's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CommentSyncResult"},"example":{"account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","posts_seen":20,"comments_created":3,"comments_updated":1}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/accounts/{accountId}/check":{"post":{"tags":["Accounts"],"summary":"Check an account's credential","description":"Asks the platform whether the account's credential still works. An invalid one is the answer, not an error: the account moves to `NEEDS_REAUTH` and `account.needs_reauth` is sent. Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"checkAccount","parameters":[{"name":"accountId","in":"path","description":"The connected account's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountHealth"},"example":{"account":{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"},"valid":true,"missing_scopes":[],"problems":[],"token_expires_at":"2027-01-01T09:00:00Z","publishing_quota_remaining":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/workspaces/{workspaceId}":{"patch":{"tags":["Org & workspaces"],"summary":"Rename a workspace","description":"Renames a workspace. Without `name` the workspace is returned unchanged. Permission: `[workspaces:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"updateWorkspace","parameters":[{"name":"workspaceId","in":"path","description":"The workspace's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Workspace"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","name":"Acme Coffee","is_default":true,"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/webhook-subscriptions/{subscriptionId}":{"delete":{"tags":["Webhook subscriptions"],"summary":"Delete a webhook subscription","description":"Deletes the subscription; nothing more is delivered to it. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"deleteWebhookSubscription","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"patch":{"tags":["Webhook subscriptions"],"summary":"Update a webhook subscription","description":"Replaces the event types, or pauses (`PAUSED`) and resumes (`ACTIVE`) deliveries; `ACTIVE` also re-enables a disabled subscription. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (`status: DISABLED`, or a disallowed event type), `404 not_found`.","operationId":"updateWebhookSubscription","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"},"example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/posts/{postId}":{"get":{"tags":["Posts"],"summary":"Get a post","description":"Returns a post with each target's status, permalink and error. Permission: `[posts:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"getPost","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Post"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"delete":{"tags":["Posts"],"summary":"Delete a post","description":"Deletes the post on our side, always. With `remote=true` we also try to delete each published target on its platform and report each outcome; a platform refusal never fails the request. Permission: `[posts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"deletePost","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"name":"remote","in":"query","description":"Also delete the published targets on their platforms.","required":false,"schema":{"type":"boolean","default":false},"example":true},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DeletedPost"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","status":"PUBLISHED","remote_results":[{"target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"DELETED","code":null,"message":null}]}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"patch":{"tags":["Posts"],"summary":"Update a draft or scheduled post","description":"Changes a `DRAFT` or `SCHEDULED` post; only the fields you send change, and the post is validated again. Permission: `[posts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed`, `404 not_found`, `409 invalid_state` (already publishing or published).","operationId":"updatePost","parameters":[{"name":"postId","in":"path","description":"The post's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"$ref":"#/components/parameters/TenantId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Post"},"example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/webhook-subscriptions/{subscriptionId}":{"delete":{"tags":["Partner · Webhooks"],"summary":"Delete a webhook subscription","description":"Deletes the subscription; nothing more is delivered to it. Permission: `[partner_webhooks:write]`. Errors to handle: `404 not_found`.","operationId":"deletePartnerWebhookSubscription","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"patch":{"tags":["Partner · Webhooks"],"summary":"Update a webhook subscription","description":"Replaces the event types, or pauses (`PAUSED`) and resumes (`ACTIVE`) deliveries; `ACTIVE` also re-enables a disabled subscription. Permission: `[partner_webhooks:write]`. Errors to handle: `400 validation_failed` (`status: DISABLED`, or a disallowed event type), `404 not_found`.","operationId":"updatePartnerWebhookSubscription","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"},"example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/plans/{code}":{"patch":{"tags":["Partner · Plans"],"summary":"Update a plan","description":"Renames a plan or replaces its limits; orgs on the plan are held to the new limits from their next request. Only your own plans can be changed. Permission: `[plans:write]`. Errors to handle: `400 validation_failed`, `404 not_found` (unknown code, or a platform plan).","operationId":"updatePlan","parameters":[{"name":"code","in":"path","description":"The plan's code, as you chose it when creating the plan.","required":true,"schema":{"type":"string"},"example":"growth"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Plan"},"example":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3},"status":"ACTIVE"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}":{"get":{"tags":["Partner · Orgs"],"summary":"Get an org","description":"Returns one of your orgs with counts of its connected accounts and members, never their content. Permission: `[orgs:read]`. Errors to handle: `404 not_found` (unknown id, or another partner's org).","operationId":"getOrg","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"patch":{"tags":["Partner · Orgs"],"summary":"Update an org","description":"Changes an org's name, plan, timezone or `external_ref`; only the fields you send change, and `org.updated` is sent. A new plan's limits apply from the next request. Permission: `[orgs:write]`. Errors to handle: `400 validation_failed` (unknown `plan_code`), `404 not_found` (unknown id, or another partner's org), `409 invalid_state` (`external_ref` already used).","operationId":"updateOrg","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/webhook-subscriptions/{subscriptionId}/deliveries":{"get":{"tags":["Webhook subscriptions"],"summary":"List a subscription's deliveries","description":"Lists the subscription's deliveries and how each went, optionally filtered by status. Payloads are not included. Permission: `[webhooks:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`, `400 validation_failed` (a bad `limit` or `cursor`).","operationId":"listWebhookDeliveries","parameters":[{"name":"subscriptionId","in":"path","description":"The webhook subscription's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},{"name":"status","in":"query","description":"Only deliveries in this status: `PENDING`, `SENDING`, `DELIVERED`, `FAILED` or `DEAD`.","required":false,"schema":{"type":"string","enum":["PENDING","SENDING","DELIVERED","FAILED","DEAD"]},"example":"DEAD"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"},"example":{"data":[{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101","subscription_id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","event_id":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001","event_type":"post.published","status":"DELIVERED","attempts":1,"last_status_code":200,"next_attempt_at":"2026-11-02T09:01:04Z","delivered_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/usage":{"get":{"tags":["Usage"],"summary":"Get the org's usage","description":"Counts the org's usage for a date range (by default the last 30 days), per event type or per day, with its plan limits against current use. Permission: `[usage:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (`from` after `to`, a range over 400 days, or `group_by=org`).","operationId":"getUsage","parameters":[{"name":"from","in":"query","description":"First day counted (UTC), inclusive. Defaults to 29 days before `to`.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-10-03"},{"name":"to","in":"query","description":"Last day counted (UTC), inclusive. Defaults to today; at most 400 days after `from`.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-11-01"},{"name":"group_by","in":"query","description":"How to group: `event_type` (default) or `day`.","required":false,"schema":{"type":"string","default":"event_type","description":"How usage rows are grouped: `org` (one row per org, Partner API only), `event_type` (a single row of totals) or `day` (one row per day with activity).","enum":["org","event_type","day"]},"example":"day"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageSummary"},"example":{"from":"2026-10-03","to":"2026-11-01","group_by":"day","data":[{"org_id":null,"day":"2026-11-01","totals":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904}}],"limits":[{"limit":"social_accounts","used":3,"max":10}]}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/usage":{"get":{"tags":["Partner · Usage"],"summary":"Get usage across your orgs","description":"Counts usage across all your orgs for a date range (by default the last 30 days), per org, per event type or per day. These are the counts you are billed on, never content. Permission: `[usage:read]`. Errors to handle: `400 validation_failed` (`from` after `to`, or a range over 400 days).","operationId":"getPartnerUsage","parameters":[{"name":"from","in":"query","description":"First day counted (UTC), inclusive. Defaults to 29 days before `to`.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-10-03"},{"name":"to","in":"query","description":"Last day counted (UTC), inclusive. Defaults to today; at most 400 days after `from`.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-11-01"},{"name":"group_by","in":"query","description":"How to group: `org`, `event_type` (default) or `day`.","required":false,"schema":{"type":"string","default":"event_type","description":"How usage rows are grouped: `org` (one row per org, Partner API only), `event_type` (a single row of totals) or `day` (one row per day with activity).","enum":["org","event_type","day"]},"example":"day"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageSummary"},"example":{"from":"2026-10-03","to":"2026-11-01","group_by":"day","data":[{"org_id":null,"day":"2026-11-01","totals":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904}}],"limits":[{"limit":"social_accounts","used":3,"max":10}]}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}/usage":{"get":{"tags":["Partner · Usage"],"summary":"Get one org's usage","description":"Counts one of your orgs' usage for a date range, with its plan limits against current use. The same counts the org sees on `GET /v1/usage`. Permission: `[usage:read]`. Errors to handle: `400 validation_failed` (bad range), `404 not_found` (unknown id, or another partner's org).","operationId":"getOrgUsage","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"},{"name":"from","in":"query","description":"First day counted (UTC), inclusive. Defaults to 29 days before `to`.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-10-03"},{"name":"to","in":"query","description":"Last day counted (UTC), inclusive. Defaults to today; at most 400 days after `from`.","required":false,"schema":{"type":"string","format":"date"},"example":"2026-11-01"},{"name":"group_by","in":"query","description":"How to group: `org`, `event_type` (default) or `day`.","required":false,"schema":{"type":"string","default":"event_type","description":"How usage rows are grouped: `org` (one row per org, Partner API only), `event_type` (a single row of totals) or `day` (one row per day with activity).","enum":["org","event_type","day"]},"example":"day"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageSummary"},"example":{"from":"2026-10-03","to":"2026-11-01","group_by":"day","data":[{"org_id":null,"day":"2026-11-01","totals":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904}}],"limits":[{"limit":"social_accounts","used":3,"max":10}]}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/org":{"get":{"tags":["Org & workspaces"],"summary":"Get the current org","description":"Returns the org the key acts for, its plan, and its use of each plan limit: enough to show quota bars without another call. Any valid key for the org; no permission needed. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `403 org_suspended`, `403 org_closed`.","operationId":"getCurrentOrg","parameters":[{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CurrentOrg"},"example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","status":"ACTIVE","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","plan":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3}},"usage":[{"limit":"social_accounts","used":3,"max":10}]}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/media/{mediaId}":{"get":{"tags":["Media"],"summary":"Get media","description":"Returns the media with a fresh short-lived `url` and its checks against each platform's rules. Any valid key for the org; no permission needed. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"getMedia","parameters":[{"name":"mediaId","in":"path","description":"The media item's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Media"},"example":{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"delete":{"tags":["Media"],"summary":"Delete media","description":"Deletes the media and its file. Posts already published keep their copy on the platforms. Permission: `[media:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"deleteMedia","parameters":[{"name":"mediaId","in":"path","description":"The media item's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/conversations":{"get":{"tags":["Conversations"],"summary":"List conversations","description":"Lists the org's Messenger and Instagram DM conversations, most recent activity first. `since` compares with the last message's time. Permission: `[messages:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (a bad filter, `limit` or `cursor`).","operationId":"listConversations","parameters":[{"name":"account_id","in":"query","description":"Only conversations with this account.","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"name":"channel","in":"query","description":"Only this channel: `MESSENGER` or `INSTAGRAM_DM`.","required":false,"schema":{"type":"string","enum":["MESSENGER","INSTAGRAM_DM"]},"example":"INSTAGRAM_DM"},{"name":"status","in":"query","description":"Only conversations in this status: `OPEN` or `CLOSED`.","required":false,"schema":{"type":"string","enum":["OPEN","CLOSED"]},"example":"OPEN"},{"name":"unread","in":"query","description":"`true` for conversations with unread messages only.","required":false,"schema":{"type":"boolean"},"example":true},{"name":"since","in":"query","description":"Only conversations whose last message is at or after this time (ISO-8601, UTC).","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-11-01T00:00:00Z"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConversationList"},"example":{"data":[{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/conversations/{conversationId}":{"get":{"tags":["Conversations"],"summary":"Get a conversation","description":"Returns a conversation with its reply window: whether, and until when, you may send. Permission: `[messages:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"getConversation","parameters":[{"name":"conversationId","in":"path","description":"The conversation's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Conversation"},"example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/connect/sessions/{sessionId}":{"get":{"tags":["Connect"],"summary":"Get a connect session","description":"Returns the session's status and, once `READY`, the accounts the user granted with what each will be able to do. A session expires 15 minutes after it was created. Permission: `[accounts:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found` (unknown or expired session).","operationId":"getConnectSession","parameters":[{"name":"sessionId","in":"path","description":"The connect session's id, as `POST /v1/connect/sessions` returned it and as it comes back on your `redirect_uri`.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ConnectSession"},"example":{"id":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001","platform":"meta","status":"READY","error":null,"expires_at":"2026-11-02T09:15:00Z","available_accounts":[{"platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"already_connected":false}]}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/comments":{"get":{"tags":["Comments"],"summary":"List comments","description":"Lists comments on the org's accounts, newest first. `since` compares with when we first stored each comment, so polling with the time of your last poll misses none. Permission: `[comments:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 validation_failed` (a bad filter, `limit` or `cursor`).","operationId":"listComments","parameters":[{"name":"account_id","in":"query","description":"Only comments on this account.","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"name":"post_id","in":"query","description":"Only comments on this post (one published through us).","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},{"name":"external_post_id","in":"query","description":"Only comments on the post with this platform id, published through us or not.","required":false,"schema":{"type":"string"},"example":"104857600123456_998877665544332"},{"name":"parent_id","in":"query","description":"Only replies to this comment.","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b000"},{"name":"since","in":"query","description":"Only comments we stored at or after this time (ISO-8601, UTC).","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-11-01T00:00:00Z"},{"name":"is_own","in":"query","description":"`true` for the account's own comments only, `false` for everyone else's.","required":false,"schema":{"type":"boolean"},"example":false},{"name":"status","in":"query","description":"Only comments in this status: `VISIBLE`, `HIDDEN` or `DELETED`.","required":false,"schema":{"type":"string","enum":["VISIBLE","HIDDEN","DELETED"]},"example":"VISIBLE"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CommentList"},"example":{"data":[{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/comments/{commentId}":{"get":{"tags":["Comments"],"summary":"Get a comment","description":"Returns one comment with its reply count. Permission: `[comments:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"getComment","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Comment"},"example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"delete":{"tags":["Comments"],"summary":"Delete a comment","description":"Deletes the comment on the platform, where the platform allows it, and returns it as `DELETED`; `comment.deleted` is sent. Permission: `[comments:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `400 unsupported_for_platform` (the account lacks the `comments` capability), `404 not_found`, `422 platform_rejected`.","operationId":"deleteComment","parameters":[{"name":"commentId","in":"path","description":"The comment's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Comment"},"example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/accounts":{"get":{"tags":["Accounts"],"summary":"List connected accounts","description":"Lists the org's accounts, disconnected ones included, optionally filtered by platform, status or workspace. All come on one page. Permission: `[accounts:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found` (unknown `workspace_id`).","operationId":"listAccounts","parameters":[{"name":"platform","in":"query","description":"Only accounts on this platform: `FACEBOOK_PAGE`, `INSTAGRAM`, `LINKEDIN_ORGANIZATION` or `LINKEDIN_PROFILE`.","required":false,"schema":{"type":"string","enum":["FACEBOOK_PAGE","INSTAGRAM","LINKEDIN_ORGANIZATION","LINKEDIN_PROFILE"]},"example":"INSTAGRAM"},{"name":"status","in":"query","description":"Only accounts in this status: `CONNECTED`, `NEEDS_REAUTH` or `DISCONNECTED`.","required":false,"schema":{"type":"string","enum":["CONNECTED","NEEDS_REAUTH","DISCONNECTED"]},"example":"CONNECTED"},{"name":"workspace_id","in":"query","description":"Only accounts in this workspace.","required":false,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SocialAccountList"},"example":{"data":[{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"}],"next_cursor":null}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/accounts/{accountId}":{"get":{"tags":["Accounts"],"summary":"Get an account","description":"Returns one account with its status and capabilities. Permission: `[accounts:read]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"getAccount","parameters":[{"name":"accountId","in":"path","description":"The connected account's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SocialAccount"},"example":{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"}}}},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"delete":{"tags":["Accounts"],"summary":"Disconnect an account","description":"Disconnects the account: its platform webhooks are unsubscribed, its tokens deleted and `account.disconnected` is sent. Its posts, comments and conversations are kept. Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found`.","operationId":"disconnectAccount","parameters":[{"name":"accountId","in":"path","description":"The connected account's id (ours, not the platform's).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/redirect-uris/{redirectUriId}":{"delete":{"tags":["Partner · Redirect URIs"],"summary":"Remove a redirect URI","description":"Removes the URI from your allow-list; new connect sessions can no longer use it. Permission: `[orgs:write]`. Errors to handle: `404 not_found`.","operationId":"removePartnerRedirectUri","parameters":[{"name":"redirectUriId","in":"path","description":"The allow-list entry's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/orgs/{orgId}/api-keys/{keyId}":{"delete":{"tags":["Partner · Org API keys"],"summary":"Revoke an org API key","description":"Revokes the key at once: requests made with it answer `401 key_revoked` from then on. This cannot be undone. Permission: `[org_keys:write]`. Errors to handle: `404 not_found` (unknown key, or not your org).","operationId":"revokeOrgApiKey","parameters":[{"name":"orgId","in":"path","description":"The org's id, as `POST /v1/partner/orgs` returned it.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"},{"name":"keyId","in":"path","description":"The org API key's id (not the key itself).","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/partner/domains/{domainId}":{"delete":{"tags":["Partner · Domains"],"summary":"Delete a custom domain","description":"Removes the hostname; your app is no longer served on it. Permission: `[domains:write]`. Errors to handle: `404 not_found`.","operationId":"deleteDomain","parameters":[{"name":"domainId","in":"path","description":"The custom domain's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/v1/connect/redirect-uris/{redirectUriId}":{"delete":{"tags":["Connect"],"summary":"Remove a redirect URI","description":"Removes one of the org's own entries; its partner's entries cannot be removed here. Permission: `[accounts:write]`. With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Errors to handle: `404 not_found` (unknown id, or a partner entry).","operationId":"removeRedirectUri","parameters":[{"name":"redirectUriId","in":"path","description":"The allow-list entry's id.","required":true,"schema":{"type":"string","format":"uuid"},"example":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001"},{"$ref":"#/components/parameters/TenantId"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad request. Codes: validation_failed, unsupported_for_platform, media_not_ready, tenant_required. On validation_failed, details.fields lists every field at fault; media_not_ready carries details.media_id instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Unauthorized. Codes: invalid_api_key, key_revoked, key_expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"402":{"description":"Quota exceeded. Codes: quota_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden. Codes: partner_key_not_allowed, org_key_not_allowed, insufficient_permission, org_suspended, org_closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found, including another tenant's resource. Codes: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict. Codes: idempotency_conflict, invalid_state, publish_outcome_unknown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"description":"Refused by the platform or the account's state. Codes: reply_window_closed, account_needs_reauth, platform_rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"429":{"description":"Rate limited. Codes: rate_limited, platform_rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal error. Codes: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"Platform unavailable. Codes: platform_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}},"components":{"schemas":{"UpdateBrandingRequest":{"type":"object","description":"Branding changes. Only the fields you send change.","example":{"product_name":"Acme Social","logo_url":"https://cdn.acmecoffee.example/brand/logo.png","favicon_url":"https://cdn.acmecoffee.example/brand/favicon.ico","primary_color":"#6f4e37","email_sender_name":"Acme Social","email_sender_address":"social@acmecoffee.example","support_url":"https://help.acmecoffee.example"},"properties":{"product_name":{"type":"string","description":"The product name your users see. Leave it out to keep the current value; send an empty string to clear it.","example":"Acme Social","maxLength":200,"minLength":0},"logo_url":{"type":"string","description":"https URL of your logo. Leave it out to keep the current value; send an empty string to clear it.","example":"https://cdn.acmecoffee.example/brand/logo.png","maxLength":2000,"minLength":0},"favicon_url":{"type":"string","description":"https URL of your favicon. Leave it out to keep the current value; send an empty string to clear it.","example":"https://cdn.acmecoffee.example/brand/favicon.ico","maxLength":2000,"minLength":0},"primary_color":{"type":"string","description":"Primary colour as `#rrggbb`. Leave it out to keep the current value; send an empty string to clear it.","example":"#6f4e37","pattern":"#[0-9a-fA-F]{6}"},"email_sender_name":{"type":"string","description":"Display name on emails sent to your users. Leave it out to keep the current value; send an empty string to clear it.","example":"Acme Social","maxLength":200,"minLength":0},"email_sender_address":{"type":"string","format":"email","description":"From address on emails sent to your users. Leave it out to keep the current value; send an empty string to clear it.","example":"social@acmecoffee.example","maxLength":320,"minLength":0},"support_url":{"type":"string","description":"Where your users get help. Leave it out to keep the current value; send an empty string to clear it.","example":"https://help.acmecoffee.example","maxLength":2000,"minLength":0}}},"Branding":{"type":"object","description":"Your white-label branding. A field never set is null.","example":{"product_name":"Acme Social","logo_url":"https://cdn.acmecoffee.example/brand/logo.png","favicon_url":"https://cdn.acmecoffee.example/brand/favicon.ico","primary_color":"#6f4e37","email_sender_name":"Acme Social","email_sender_address":"social@acmecoffee.example","support_url":"https://help.acmecoffee.example"},"properties":{"product_name":{"type":["string","null"],"description":"The product name your users see.","example":"Acme Social"},"logo_url":{"type":["string","null"],"description":"URL of your logo.","example":"https://cdn.acmecoffee.example/brand/logo.png"},"favicon_url":{"type":["string","null"],"description":"URL of your favicon.","example":"https://cdn.acmecoffee.example/brand/favicon.ico"},"primary_color":{"type":["string","null"],"description":"Primary colour as `#rrggbb`.","example":"#6f4e37"},"email_sender_name":{"type":["string","null"],"description":"Display name on emails sent to your users.","example":"Acme Social"},"email_sender_address":{"type":["string","null"],"description":"From address on emails sent to your users.","example":"social@acmecoffee.example"},"support_url":{"type":["string","null"],"description":"Where your users get help.","example":"https://help.acmecoffee.example"}},"required":["email_sender_address","email_sender_name","favicon_url","logo_url","primary_color","product_name","support_url"]},"ApiError":{"type":"object","description":"What went wrong.","example":{"code":"account_needs_reauth","message":"The Facebook Page connection has expired. Reconnect the account.","request_id":"6b1f0c2e-3d4a-4b5c-8d9e-0f1a2b3c4d5e","details":{"account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}},"properties":{"code":{"type":"string","description":"A stable machine-readable code. Each operation's description names the ones to handle there; the response lists say which status carries which.","example":"account_needs_reauth"},"message":{"type":"string","description":"A sentence for a developer. May change; do not parse it.","example":"The Facebook Page connection has expired. Reconnect the account."},"request_id":{"type":"string","description":"The request's id, also in the `X-Request-Id` header. Quote it when asking for help.","example":"6b1f0c2e-3d4a-4b5c-8d9e-0f1a2b3c4d5e"},"details":{"type":["object","null"],"additionalProperties":{},"description":"More about the error, by code: `fields` for `validation_failed`, `media_id` for `media_not_ready`, `limit`, `used` and `max` for `quota_exceeded`, `platform`, `platform_code`, `platform_subcode` and `platform_message` for `platform_rejected`. Null when there is nothing more.","example":{"account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}}},"required":["code","details","message","request_id"]},"ApiErrorResponse":{"type":"object","description":"Every error has this body. Branch on `error.code`, never on the message.","example":{"error":{"code":"account_needs_reauth","message":"The Facebook Page connection has expired. Reconnect the account.","request_id":"6b1f0c2e-3d4a-4b5c-8d9e-0f1a2b3c4d5e","details":{"account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}}},"properties":{"error":{"$ref":"#/components/schemas/ApiError","description":"The error."}},"required":["error"]},"FieldProblem":{"type":"object","description":"One field at fault; also the shape of a created resource's warnings.","example":{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"properties":{"field":{"type":"string","description":"The snake_case wire path, e.g. account_ids[1] or source_url","example":"account_ids[0]"},"code":{"type":"string","description":"A stable machine-readable reason, such as `required`, `text_too_long` or `media_required`.","example":"media_required"},"message":{"type":"string","description":"A sentence a developer can act on.","example":"Instagram posts need at least one image or video."},"account_id":{"type":["string","null"],"format":"uuid","description":"Set on per-account publish problems, otherwise null","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}},"required":["code","field","message"]},"ValidationDetails":{"type":"object","description":"The `details` of `validation_failed`: every field at fault, not just the first.","example":{"fields":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}]},"properties":{"fields":{"type":"array","description":"One entry per problem.","items":{"$ref":"#/components/schemas/FieldProblem"}}},"required":["fields"]},"ValidationErrorResponseBody":{"type":"object","description":"What went wrong with the request.","example":{"code":"account_needs_reauth","message":"The Facebook Page connection has expired. Reconnect the account.","request_id":"6b1f0c2e-3d4a-4b5c-8d9e-0f1a2b3c4d5e","details":{"fields":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}]}},"properties":{"code":{"type":"string","description":"A stable machine-readable code. Each operation's description names the ones to handle there; the response lists say which status carries which.","example":"account_needs_reauth"},"message":{"type":"string","description":"A sentence for a developer. May change; do not parse it.","example":"The Facebook Page connection has expired. Reconnect the account."},"request_id":{"type":"string","description":"The request's id, also in the `X-Request-Id` header. Quote it when asking for help.","example":"6b1f0c2e-3d4a-4b5c-8d9e-0f1a2b3c4d5e"},"details":{"$ref":"#/components/schemas/ValidationDetails","description":"For `validation_failed`, every field at fault; for `media_not_ready`, the `media_id`."}},"required":["code","details","message","request_id"]},"ValidationErrorResponse":{"type":"object","description":"A `400` error body. Branch on `error.code`.","example":{"error":{"code":"account_needs_reauth","message":"The Facebook Page connection has expired. Reconnect the account.","request_id":"6b1f0c2e-3d4a-4b5c-8d9e-0f1a2b3c4d5e","details":{"fields":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}]}}},"properties":{"error":{"$ref":"#/components/schemas/ValidationErrorResponseBody","description":"The error."}},"required":["error"]},"CreateWorkspaceRequest":{"type":"object","description":"A new workspace.","example":{"name":"Acme Coffee Rotterdam"},"properties":{"name":{"type":"string","description":"The workspace's name, usually a brand or location.","example":"Acme Coffee Rotterdam","maxLength":200,"minLength":0}},"required":["name"]},"Workspace":{"type":"object","description":"A workspace: a brand inside the org. Accounts, posts, media, comments and conversations each belong to one.","example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","name":"Acme Coffee","is_default":true,"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The workspace's id.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"name":{"type":"string","description":"The workspace's name.","example":"Acme Coffee"},"is_default":{"type":"boolean","description":"The org's default workspace, used when a request names none. It cannot be archived.","example":true},"status":{"type":"string","description":"`ACTIVE` or `ARCHIVED`.","enum":["ACTIVE","ARCHIVED"],"example":"ACTIVE"},"created_at":{"type":"string","format":"date-time","description":"When the workspace was created.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","id","is_default","name","status"]},"CreateWebhookSubscriptionRequest":{"type":"object","description":"A new webhook subscription.","example":{"url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"]},"properties":{"url":{"type":"string","description":"Where to POST the events: a public https URL.","example":"https://app.acmecoffee.example/hooks/wasparks","maxLength":2000,"minLength":0,"pattern":"https://.*"},"event_types":{"type":"array","description":"The event types to deliver. Org subscriptions: `account.*`, `post.*`, `comment.*`, `conversation.created`, `message.*`, `quota.*`, `webhook.disabled`. Partner subscriptions: `org.*`, `org.quota.*`, `usage.daily_ready`, `webhook.disabled`, plus the org types for an OPERATOR partner. Each type and its payload is listed under `webhooks`; unknown or disallowed types are `400 validation_failed`.","example":["post.published","post.failed","comment.created","message.received"],"items":{"type":"string"},"minItems":1}},"required":["event_types","url"]},"CreatedWebhookSubscription":{"type":"object","description":"A newly created subscription, with its signing secret. `secret` is in this response only: store it now.","example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","secret":"4b7d0e2f9a1c3e5f7a9b1d3f5e7c9a0b2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The subscription's id.","example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},"url":{"type":"string","description":"Where events are POSTed.","example":"https://app.acmecoffee.example/hooks/wasparks"},"event_types":{"type":"array","description":"The event types delivered.","example":["post.published","post.failed","comment.created","message.received"],"items":{"type":"string"}},"status":{"type":"string","description":"`ACTIVE` delivers; `PAUSED` holds deliveries until resumed; `DISABLED` was set by us after 20 consecutive dead deliveries.","enum":["ACTIVE","PAUSED","DISABLED"],"example":"ACTIVE"},"secret":{"type":"string","description":"The HMAC key for `X-WSS-Signature`. Returned once.","example":"4b7d0e2f9a1c3e5f7a9b1d3f5e7c9a0b2d4f6a8c0e1b3d5f7a9c1e3b5d7f9a0c"},"created_at":{"type":"string","format":"date-time","description":"When the subscription was created.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","event_types","id","secret","status","url"]},"WebhookTestResult":{"type":"object","description":"The outcome of a test delivery. Not stored, not retried.","example":{"delivered":true,"status_code":200,"error":null,"duration_ms":182},"properties":{"delivered":{"type":"boolean","description":"Whether the endpoint answered with a 2xx.","example":true},"status_code":{"type":["integer","null"],"format":"int32","description":"The endpoint's HTTP status; null if it never answered.","example":200},"error":{"type":["string","null"],"description":"Why it was not delivered, when it was not: `http_<status>`, `timeout`, `destination_not_public`, … Null on success.","example":null},"duration_ms":{"type":"integer","format":"int64","description":"How long the request took, in milliseconds.","example":182}},"required":["delivered","duration_ms","error","status_code"]},"WebhookDelivery":{"type":"object","description":"One event's delivery to a subscription, and how it went. The payload is not included.","example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101","subscription_id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","event_id":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001","event_type":"post.published","status":"DELIVERED","attempts":1,"last_status_code":200,"next_attempt_at":"2026-11-02T09:01:04Z","delivered_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The delivery's id, sent as `X-WSS-Delivery`.","example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},"subscription_id":{"type":"string","format":"uuid","description":"The subscription it was delivered to.","example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},"event_id":{"type":"string","description":"The envelope's `id`, the one to dedupe on.","example":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001"},"event_type":{"type":"string","description":"The event type.","example":"post.published"},"status":{"type":"string","description":"`PENDING` (queued or waiting to retry), `SENDING`, `DELIVERED` (a 2xx), `FAILED` (attempted, will retry) or `DEAD` (retries used up).","enum":["PENDING","SENDING","DELIVERED","FAILED","DEAD"],"example":"DELIVERED"},"attempts":{"type":"integer","format":"int32","description":"Attempts made so far.","example":1},"last_status_code":{"type":["integer","null"],"format":"int32","description":"HTTP status of the last attempt; null if there was no answer.","example":200},"next_attempt_at":{"type":["string","null"],"format":"date-time","description":"When the next attempt is due; null when none is.","example":"2026-11-02T09:01:04Z"},"delivered_at":{"type":["string","null"],"format":"date-time","description":"When a 2xx was received; null until then.","example":"2026-11-02T09:00:04Z"},"created_at":{"type":"string","format":"date-time","description":"When the delivery was queued.","example":"2026-11-02T09:00:00Z"}},"required":["attempts","created_at","delivered_at","event_id","event_type","id","last_status_code","next_attempt_at","status","subscription_id"]},"CreatePostRequest":{"type":"object","description":"A new post. Without `scheduled_at` it publishes now; with it, at that time; with `draft: true` it waits for `POST /v1/posts/{postId}/publish`.","example":{"workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media_ids":["0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"],"account_ids":["0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"],"scheduled_at":"2026-11-03T08:00:00Z","draft":false,"overrides":{"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01":{"text":"Pumpkin spice is back at Acme Coffee! #fall"}},"options":{"instagram":{"type":"FEED"},"facebook":{"type":"FEED"},"linkedin":{"visibility":"PUBLIC","reshare_of":"urn:li:share:7123456789012345678"}}},"properties":{"workspace_id":{"type":"string","format":"uuid","description":"The workspace the post belongs to. Defaults to the org's default workspace.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"text":{"type":"string","description":"The post's text. Required on every platform except Instagram media posts; length limits are per platform.","example":"Pumpkin spice season is back at Acme Coffee. Come say hi!"},"link_url":{"type":"string","description":"A link to share. Facebook shows its own preview; LinkedIn shows `link_preview` when it has a `title`, otherwise appends the URL to the text; Instagram appends it as plain text (with a warning). With media, the URL is appended to the text everywhere.","example":"https://acmecoffee.example/menu/fall","maxLength":2000,"minLength":0},"link_preview":{"$ref":"#/components/schemas/LinkPreview","description":"The link card on LinkedIn; ignored elsewhere. Only with `link_url`."},"media_ids":{"type":"array","description":"`READY` media to attach, in order. Instagram needs at least one.","example":["0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"],"items":{"type":"string","format":"uuid"}},"account_ids":{"type":"array","description":"The connected accounts to publish to; each becomes one target. At least one.","example":["0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"],"items":{"type":"string","format":"uuid"},"minItems":1},"scheduled_at":{"type":"string","format":"date-time","description":"When to publish (UTC, in the future). Omit to publish now.","example":"2026-11-03T08:00:00Z"},"draft":{"type":"boolean","description":"`true` to save without publishing or scheduling.","example":false},"overrides":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PostOverride"},"description":"Per-account text and options, keyed by account id. Each replaces the post's own `text` or `options` for that account only.","example":{"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01":{"text":"Pumpkin spice is back at Acme Coffee! #fall"}}},"options":{"$ref":"#/components/schemas/PostOptions","description":"Per-platform options."}},"required":["account_ids"]},"FacebookPostOptions":{"type":"object","description":"Facebook options.","example":{"type":"FEED"},"properties":{"type":{"type":"string","description":"`FEED` (default) or `REEL` (one video).","example":"FEED"}}},"InstagramPostOptions":{"type":"object","description":"Instagram options.","example":{"type":"FEED"},"properties":{"type":{"type":"string","description":"`FEED` (default), `REEL` (one video), `STORY` or `CAROUSEL` (2 to 10 items).","example":"FEED"}}},"LinkPreview":{"type":"object","description":"The link card LinkedIn shows for `link_url`. Without `title`, LinkedIn gets the URL as plain text.","example":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"properties":{"title":{"type":"string","description":"The card's title.","example":"Our fall menu"},"description":{"type":"string","description":"The card's description.","example":"Pumpkin spice, maple oat and more."},"thumbnail_media_id":{"type":"string","format":"uuid","description":"A `READY` image to use as the card's thumbnail.","example":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"}}},"LinkedInPostOptions":{"type":"object","description":"LinkedIn options.","example":{"visibility":"PUBLIC","reshare_of":"urn:li:share:7123456789012345678"},"properties":{"visibility":{"type":"string","description":"`PUBLIC` (default) or `CONNECTIONS` (member profiles only).","example":"PUBLIC"},"reshare_of":{"type":"string","description":"The URN of a post to reshare instead of a new post.","example":"urn:li:share:7123456789012345678"}}},"PostOptions":{"type":"object","description":"Options per platform; each applies to the targets on that platform.","example":{"instagram":{"type":"FEED"},"facebook":{"type":"FEED"},"linkedin":{"visibility":"PUBLIC","reshare_of":"urn:li:share:7123456789012345678"}},"properties":{"instagram":{"$ref":"#/components/schemas/InstagramPostOptions","description":"Instagram options."},"facebook":{"$ref":"#/components/schemas/FacebookPostOptions","description":"Facebook options."},"linkedin":{"$ref":"#/components/schemas/LinkedInPostOptions","description":"LinkedIn options."}}},"PostOverride":{"type":"object","description":"One account's own text or options.","example":{"text":"Pumpkin spice is back at Acme Coffee! #fall","options":{"instagram":{"type":"FEED"},"facebook":{"type":"FEED"},"linkedin":{"visibility":"PUBLIC","reshare_of":"urn:li:share:7123456789012345678"}}},"properties":{"text":{"type":"string","description":"Text for this account instead of the post's.","example":"Pumpkin spice is back at Acme Coffee! #fall"},"options":{"$ref":"#/components/schemas/PostOptions","description":"Options for this account instead of the post's."}}},"Media":{"type":"object","description":"An image, video or document to attach to posts, with its checks against each platform's rules.","example":{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The media's id; use it in `media_ids` when posting.","example":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"workspace_id":{"type":"string","format":"uuid","description":"The workspace the media belongs to.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"type":{"type":"string","description":"`IMAGE`, `VIDEO` or `DOCUMENT` (PDF), from the MIME type.","enum":["IMAGE","VIDEO","DOCUMENT"],"example":"IMAGE"},"mime_type":{"type":"string","description":"The file's MIME type.","example":"image/jpeg"},"size_bytes":{"type":["integer","null"],"format":"int64","description":"Size in bytes; null for an upload not completed yet.","example":482113},"width":{"type":["integer","null"],"format":"int32","description":"Width in pixels, when known.","example":1080},"height":{"type":["integer","null"],"format":"int32","description":"Height in pixels, when known.","example":1350},"duration_ms":{"type":["integer","null"],"format":"int32","description":"Duration in milliseconds for video, when known; otherwise null.","example":null},"status":{"type":"string","description":"`UPLOADING` (waiting for the bytes and `POST /v1/media/{mediaId}/complete`), `READY` (can be posted) or `FAILED`.","enum":["UPLOADING","READY","FAILED"],"example":"READY"},"url":{"type":["string","null"],"description":"A short-lived signed URL to view the file; null until `READY`. Do not store it.","example":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…"},"platform_checks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaPlatformCheck"},"description":"The media checked against each platform's rules, keyed `facebook_page`, `instagram`, `linkedin_organization`, `linkedin_profile`. Empty until `READY`.","example":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}}},"created_at":{"type":"string","format":"date-time","description":"When the media was created.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","duration_ms","height","id","mime_type","platform_checks","size_bytes","status","type","url","width","workspace_id"]},"MediaPlatformCheck":{"type":"object","description":"Whether the media can be posted to one platform.","example":{"ok":false,"problems":["aspect_ratio"]},"properties":{"ok":{"type":"boolean","description":"True when nothing stops it being posted there.","example":false},"problems":{"type":"array","description":"Machine-readable reasons it cannot, such as `aspect_ratio`; empty when `ok`.","example":["aspect_ratio"],"items":{"type":"string"}}},"required":["ok","problems"]},"Post":{"type":"object","description":"A post and its targets: one target per account it is published to.","example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The post's id.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},"workspace_id":{"type":"string","format":"uuid","description":"The workspace the post belongs to.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"status":{"type":"string","description":"`DRAFT`, `SCHEDULED`, `PUBLISHING`, then `PUBLISHED` (every target), `PARTIAL` (some) or `FAILED` (none); `CANCELLED` when cancelled before publishing.","enum":["DRAFT","SCHEDULED","PUBLISHING","PUBLISHED","PARTIAL","FAILED","CANCELLED"],"example":"PUBLISHED"},"text":{"type":["string","null"],"description":"The post's text.","example":"Pumpkin spice season is back at Acme Coffee. Come say hi!"},"link_url":{"type":["string","null"],"description":"The shared link, if any.","example":"https://acmecoffee.example/menu/fall"},"link_preview":{"$ref":"#/components/schemas/LinkPreview","description":"The LinkedIn link card; null when none was given."},"media":{"type":"array","description":"The attached media, in order.","items":{"$ref":"#/components/schemas/Media"}},"scheduled_at":{"type":["string","null"],"format":"date-time","description":"When it is or was scheduled; null when published now.","example":null},"targets":{"type":"array","description":"One per account, each with its own status.","items":{"$ref":"#/components/schemas/PostTarget"}},"warnings":{"type":"array","description":"Non-blocking problems found when the post was created, such as a link Instagram cannot make clickable. Usually empty.","items":{"$ref":"#/components/schemas/FieldProblem"}},"created_at":{"type":"string","format":"date-time","description":"When the post was created.","example":"2026-11-02T09:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"When the post last changed.","example":"2026-11-02T09:00:04Z"}},"required":["created_at","id","link_preview","link_url","media","scheduled_at","status","targets","text","updated_at","warnings","workspace_id"]},"PostTarget":{"type":"object","description":"One account's copy of a post.","example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}},"properties":{"id":{"type":"string","format":"uuid","description":"The target's id.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11"},"account_id":{"type":"string","format":"uuid","description":"The account it publishes to.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"platform":{"type":"string","description":"The account's platform.","enum":["FACEBOOK_PAGE","INSTAGRAM","LINKEDIN_ORGANIZATION","LINKEDIN_PROFILE"],"example":"FACEBOOK_PAGE"},"status":{"type":"string","description":"`PENDING` (waiting for its time), `PUBLISHING`, `PUBLISHED` or `FAILED` (see `error`; can be retried).","enum":["PENDING","PUBLISHING","PUBLISHED","FAILED"],"example":"PUBLISHED"},"text":{"type":["string","null"],"description":"The text this account gets: its override, or the post's.","example":"Pumpkin spice season is back at Acme Coffee. Come say hi!"},"external_post_id":{"type":["string","null"],"description":"The platform's id for the published post; null until published.","example":"104857600123456_998877665544332"},"permalink":{"type":["string","null"],"description":"Link to the published post; null until published.","example":"https://www.facebook.com/104857600123456/posts/998877665544332"},"published_at":{"type":["string","null"],"format":"date-time","description":"When it was published; null until then.","example":"2026-11-02T09:00:04Z"},"attempts":{"type":"integer","format":"int32","description":"Publish attempts so far.","example":1},"error":{"$ref":"#/components/schemas/PostTargetError","description":"Why the last attempt failed; null unless `status` is `FAILED` (or a retry is pending)."}},"required":["account_id","attempts","error","external_post_id","id","permalink","platform","published_at","status","text"]},"PostTargetError":{"type":"object","description":"Why a target failed.","example":{"code":"platform_rejected","message":"The image aspect ratio is not supported."},"properties":{"code":{"type":"string","description":"A machine-readable code, such as `platform_rejected`, `account_needs_reauth` or `publish_outcome_unknown` (the outcome was never learned; a retry may publish twice).","example":"platform_rejected"},"message":{"type":["string","null"],"description":"A sentence for a developer.","example":"The image aspect ratio is not supported."}},"required":["code","message"]},"CommentTextRequest":{"type":"object","description":"The text of a reply or a new comment.","example":{"text":"Yes! Every latte comes with oat milk on request."},"properties":{"text":{"type":"string","description":"The text, posted as the account.","example":"Yes! Every latte comes with oat milk on request.","maxLength":8000,"minLength":0}},"required":["text"]},"Comment":{"type":"object","description":"A comment on one of the org's posts, or a reply to one.","example":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The comment's id.","example":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001"},"account_id":{"type":"string","format":"uuid","description":"The account whose post it is on.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"workspace_id":{"type":"string","format":"uuid","description":"The account's workspace.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"platform":{"type":"string","description":"The account's platform.","enum":["FACEBOOK_PAGE","INSTAGRAM","LINKEDIN_ORGANIZATION","LINKEDIN_PROFILE"],"example":"FACEBOOK_PAGE"},"post_id":{"type":["string","null"],"format":"uuid","description":"Our post, when it was published through us; otherwise null.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},"target_id":{"type":["string","null"],"format":"uuid","description":"The post's target on this account, when published through us; otherwise null.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11"},"external_post_id":{"type":"string","description":"The platform's id for the post the comment is on.","example":"104857600123456_998877665544332"},"external_id":{"type":"string","description":"The platform's id for the comment.","example":"998877665544332_112233445566"},"parent_id":{"type":["string","null"],"format":"uuid","description":"The comment this replies to; null for a top-level comment.","example":null},"author":{"$ref":"#/components/schemas/CommentAuthor","description":"Who wrote it."},"text":{"type":"string","description":"The comment's text.","example":"Is the pumpkin latte available with oat milk?"},"permalink":{"type":["string","null"],"description":"Link to the comment on the platform, where a person can see its author; null when the platform gives none.","example":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566"},"is_own":{"type":"boolean","description":"Written by the account itself (a reply or comment sent through the API, or from the platform).","example":false},"status":{"type":"string","description":"`VISIBLE`, `HIDDEN` (hidden from everyone but the author and the page) or `DELETED`.","enum":["VISIBLE","HIDDEN","DELETED"],"example":"VISIBLE"},"replies_count":{"type":"integer","format":"int64","description":"Replies we hold, visible and hidden; deleted ones are not counted.","example":2},"created_at":{"type":"string","format":"date-time","description":"When it was written, by the platform's clock where it says; otherwise when we first saw it.","example":"2026-11-02T09:00:00Z"},"synced_at":{"type":"string","format":"date-time","description":"When we last stored a change to it.","example":"2026-11-02T09:00:04Z"}},"required":["account_id","author","created_at","external_id","external_post_id","id","is_own","parent_id","permalink","platform","post_id","replies_count","status","synced_at","target_id","text","workspace_id"]},"CommentAuthor":{"type":"object","description":"A comment's author. `name` and `avatar_url` can be null: always for a LinkedIn member (LinkedIn's terms forbid storing other members' profiles, so show a fallback such as \"LinkedIn member\" and link to `permalink`), and until resolved for a LinkedIn organization.","example":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"properties":{"external_id":{"type":["string","null"],"description":"The platform's id for the author.","example":"7744558899001122"},"type":{"type":"string","description":"`PERSON`, `ORGANIZATION` (a page or company) or `UNKNOWN`.","enum":["PERSON","ORGANIZATION","UNKNOWN"],"example":"PERSON"},"name":{"type":["string","null"],"description":"The author's display name, when we may show it.","example":"Jane Doe"},"avatar_url":{"type":["string","null"],"description":"The author's picture, when we may show it.","example":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"}},"required":["avatar_url","external_id","name","type"]},"CreateRedirectUriRequest":{"type":"object","description":"A URI to allow as a connect session's `redirect_uri`.","example":{"uri":"https://app.acmecoffee.example/social/connected"},"properties":{"uri":{"type":"string","description":"The exact URI, https only (`http://localhost` is accepted for test keys). Matched character for character.","example":"https://app.acmecoffee.example/social/connected","maxLength":2000,"minLength":0}},"required":["uri"]},"RedirectUri":{"type":"object","description":"An allowed `redirect_uri`.","example":{"id":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001","uri":"https://app.acmecoffee.example/social/connected","owner_scope":"PARTNER","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The entry's id.","example":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001"},"uri":{"type":"string","description":"The allowed URI.","example":"https://app.acmecoffee.example/social/connected"},"owner_scope":{"type":"string","description":"`PARTNER`: registered by the partner, valid for all of its orgs. `ORG`: registered by this org only.","enum":["PARTNER","ORG"],"example":"PARTNER"},"created_at":{"type":"string","format":"date-time","description":"When the entry was added.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","id","owner_scope","uri"]},"CreatePlanRequest":{"type":"object","description":"A new plan.","example":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3}},"properties":{"code":{"type":"string","description":"The plan's code, how you refer to it from then on: lowercase letters, digits, `-` and `_`, unique among your plans.","example":"growth","maxLength":80,"minLength":0,"pattern":"[a-z0-9][a-z0-9_-]*"},"name":{"type":"string","description":"A display name.","example":"Growth","maxLength":200,"minLength":0},"limits":{"$ref":"#/components/schemas/PlanLimits","description":"The plan's limits. A limit left out is unlimited."}},"required":["code","limits","name"]},"PlanLimits":{"type":"object","description":"Plan limits. Each is optional: a limit left out is unlimited, never zero. More limits may be added later.","example":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3},"properties":{"social_accounts":{"type":"integer","format":"int64","description":"Connected social accounts at one time.","example":10},"posts_per_month":{"type":"integer","format":"int64","description":"Posts published per calendar month (UTC).","example":500},"members":{"type":"integer","format":"int64","description":"Members of the org.","example":5},"workspaces":{"type":"integer","format":"int64","description":"Workspaces, including the default one.","example":3}}},"Plan":{"type":"object","description":"A plan you may put orgs on: one of your own, or a platform plan.","example":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3},"status":"ACTIVE"},"properties":{"code":{"type":"string","description":"The plan's code, used in `plan_code` when creating an org.","example":"growth"},"name":{"type":"string","description":"A display name.","example":"Growth"},"limits":{"$ref":"#/components/schemas/PlanLimits","description":"The plan's limits. A limit left out is unlimited."},"status":{"type":"string","description":"`ACTIVE`, or `ARCHIVED` (no longer assignable).","enum":["ACTIVE","ARCHIVED"],"example":"ACTIVE"}},"required":["code","limits","name","status"]},"CreateOrgRequest":{"type":"object","description":"A new org.","example":{"name":"Acme Coffee","external_ref":"acme-coffee-42","plan_code":"growth","timezone":"Europe/Amsterdam"},"properties":{"name":{"type":"string","description":"The client's business name.","example":"Acme Coffee","maxLength":200,"minLength":0},"external_ref":{"type":"string","description":"Your own id for this client, unique among your orgs. It is what an OPERATOR partner sends as `X-Tenant-Id`. Optional.","example":"acme-coffee-42","maxLength":200,"minLength":0},"plan_code":{"type":"string","description":"The plan to put the org on: one of your plans or a platform plan you may assign (`GET /v1/partner/plans`).","example":"growth","maxLength":80,"minLength":0},"timezone":{"type":"string","description":"IANA time zone the org works in. Defaults to `UTC`.","example":"Europe/Amsterdam","maxLength":64,"minLength":0}},"required":["name","plan_code"]},"Org":{"type":"object","description":"One of your orgs, as a partner sees it: who it is, its plan and counts. Never its accounts or content.","example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2},"properties":{"id":{"type":"string","format":"uuid","description":"The org's id.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"},"name":{"type":"string","description":"The client's business name.","example":"Acme Coffee"},"external_ref":{"type":["string","null"],"description":"Your own id for this client, unique among your orgs. It is what an OPERATOR partner sends as `X-Tenant-Id`. Null if you never set one.","example":"acme-coffee-42"},"status":{"type":"string","description":"`ACTIVE`; `SUSPENDED` (Content API answers `403 org_suspended`, scheduled posts wait); `CLOSED` for good.","enum":["ACTIVE","SUSPENDED","CLOSED"],"example":"ACTIVE"},"plan_code":{"type":["string","null"],"description":"The org's plan; null if it has none.","example":"growth"},"timezone":{"type":"string","description":"IANA time zone the org works in.","example":"Europe/Amsterdam"},"created_at":{"type":"string","format":"date-time","description":"When the org was created.","example":"2026-11-02T09:00:00Z"},"connected_accounts":{"type":"integer","format":"int64","description":"How many social accounts the org has connected now.","example":3},"members":{"type":"integer","format":"int64","description":"How many members the org has.","example":2}},"required":["connected_accounts","created_at","external_ref","id","members","name","plan_code","status","timezone"]},"OrgStatusChangeRequest":{"type":"object","description":"Why the org is being suspended or closed. Optional; audit-logged.","example":{"reason":"Invoice 2026-10 unpaid"},"properties":{"reason":{"type":"string","description":"A short reason, kept in the audit log.","example":"Invoice 2026-10 unpaid","maxLength":500,"minLength":0}}},"CreateApiKeyRequest":{"type":"object","description":"A new org key.","example":{"name":"Acme Coffee production","permissions":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"environment":"LIVE","expires_at":"2027-11-02T00:00:00Z"},"properties":{"name":{"type":"string","description":"A label for the key, shown in listings.","example":"Acme Coffee production","maxLength":200,"minLength":0},"permissions":{"type":"array","description":"What the key may do. Org permissions: `accounts:read`, `accounts:write`, `media:write`, `posts:read`, `posts:write`, `comments:read`, `comments:write`, `messages:read`, `messages:write`, `webhooks:write`, `usage:read`, `workspaces:write`.","example":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"items":{"type":"string"},"minItems":1},"environment":{"type":"string","description":"`LIVE` keys act on the real platforms; `TEST` keys are reserved for sandbox behaviour. Defaults to `LIVE`.","enum":["LIVE","TEST"],"example":"LIVE"},"expires_at":{"type":"string","format":"date-time","description":"When the key stops working. Omit for a key that never expires.","example":"2027-11-02T00:00:00Z"}},"required":["name","permissions"]},"CreatedApiKey":{"type":"object","description":"A newly created org key, with its secret. `key` is in this response only: store it now, it cannot be shown again.","example":{"id":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001","key":"wsk_live_org_3fa9c1d2e4b5a6c7d8_8d2e5f0a1b3c4d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6","name":"Acme Coffee production","key_prefix":"3fa9c1d2e4b5a6c7d8","environment":"LIVE","permissions":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"status":"ACTIVE","expires_at":"2027-11-02T00:00:00Z","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The key's id, used to revoke it.","example":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001"},"key":{"type":"string","description":"The key itself, to send as `Authorization: Bearer <key>`. Returned once.","example":"wsk_live_org_3fa9c1d2e4b5a6c7d8_8d2e5f0a1b3c4d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6"},"name":{"type":"string","description":"The key's label.","example":"Acme Coffee production"},"key_prefix":{"type":"string","description":"The key's public prefix, the only part of the key ever shown again. Use it to tell keys apart.","example":"3fa9c1d2e4b5a6c7d8"},"environment":{"type":"string","description":"`LIVE` keys act on the real platforms; `TEST` keys are reserved for sandbox behaviour.","enum":["LIVE","TEST"],"example":"LIVE"},"permissions":{"type":"array","description":"What the key may do. Org permissions: `accounts:read`, `accounts:write`, `media:write`, `posts:read`, `posts:write`, `comments:read`, `comments:write`, `messages:read`, `messages:write`, `webhooks:write`, `usage:read`, `workspaces:write`.","example":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"items":{"type":"string"}},"status":{"type":"string","description":"Always `ACTIVE`.","enum":["ACTIVE","REVOKED"],"example":"ACTIVE"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the key stops working; null if it never expires.","example":"2027-11-02T00:00:00Z"},"created_at":{"type":"string","format":"date-time","description":"When the key was created.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","environment","expires_at","id","key","key_prefix","name","permissions","status"]},"CreateDomainRequest":{"type":"object","description":"A hostname to serve your white-label app on.","example":{"hostname":"social.acmecoffee.example"},"properties":{"hostname":{"type":"string","description":"The hostname, without scheme or path. Stored lowercase; one hostname belongs to one partner.","example":"social.acmecoffee.example","maxLength":253,"minLength":0,"pattern":"[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+"}},"required":["hostname"]},"Domain":{"type":"object","description":"A custom hostname for your white-label app.","example":{"id":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001","hostname":"social.acmecoffee.example","status":"PENDING","verification_token":"wasparks-verify-q8Zt3nV1mXc5LkP0aR7sWd2eYf9uBh4j","verified_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The domain's id.","example":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001"},"hostname":{"type":"string","description":"The hostname, lowercase.","example":"social.acmecoffee.example"},"status":{"type":"string","description":"`PENDING` until verified; `VERIFIED` after `POST …/verify`; `ACTIVE` once we serve it; `DISABLED` when switched off by us.","enum":["PENDING","VERIFIED","ACTIVE","DISABLED"],"example":"PENDING"},"verification_token":{"type":["string","null"],"description":"A token identifying your claim on the hostname.","example":"wasparks-verify-q8Zt3nV1mXc5LkP0aR7sWd2eYf9uBh4j"},"verified_at":{"type":["string","null"],"format":"date-time","description":"When the domain was verified; null until then.","example":"2026-11-02T09:00:04Z"},"created_at":{"type":"string","format":"date-time","description":"When the domain was added.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","hostname","id","status","verification_token","verified_at"]},"CreateMediaRequest":{"type":"object","description":"New media: either `source_url` for us to fetch, or `upload: true` with `mime_type` (and `size_bytes`) to upload the bytes yourself. Exactly one of the two.","example":{"workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","source_url":"https://cdn.acmecoffee.example/posts/pumpkin-latte.jpg","upload":false,"mime_type":"image/jpeg","size_bytes":482113,"alt_text":"A pumpkin spice latte on the counter"},"properties":{"workspace_id":{"type":"string","format":"uuid","description":"The workspace the media belongs to. Defaults to the org's default workspace.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"source_url":{"type":"string","description":"A public http(s) URL we download now. Private and internal addresses are refused.","example":"https://cdn.acmecoffee.example/posts/pumpkin-latte.jpg","maxLength":2000,"minLength":0},"upload":{"type":"boolean","description":"`true` to upload the bytes yourself to the returned `upload_url`.","example":false},"mime_type":{"type":"string","description":"The file's type, required with `upload: true`: an image, video or PDF type such as `image/jpeg`, `image/png`, `video/mp4` or `application/pdf`.","example":"image/jpeg","maxLength":200,"minLength":0},"size_bytes":{"type":"integer","format":"int64","description":"The file's size in bytes, with `upload: true`. Checked again when the upload is completed.","example":482113},"alt_text":{"type":"string","description":"Alternative text. Accepted, not yet stored or sent to the platforms.","example":"A pumpkin spice latte on the counter","maxLength":1000,"minLength":0}}},"MediaUpload":{"type":"object","description":"What `POST /v1/media` answers. With `upload: true`, PUT the bytes to `upload_url` with the declared `Content-Type`, then call `POST /v1/media/{mediaId}/complete`. With `source_url` the media is already `READY` and both upload fields are null.","example":{"media":{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"},"upload_url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","upload_expires_at":"2026-11-02T09:15:00Z"},"properties":{"media":{"$ref":"#/components/schemas/Media","description":"The new media."},"upload_url":{"type":["string","null"],"description":"Signed URL to PUT the bytes to; null for `source_url`.","example":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…"},"upload_expires_at":{"type":["string","null"],"format":"date-time","description":"When `upload_url` stops working; null for `source_url`.","example":"2026-11-02T09:15:00Z"}},"required":["media","upload_expires_at","upload_url"]},"Conversation":{"type":"object","description":"A Messenger or Instagram DM thread between one of the org's accounts and one person.","example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The conversation's id.","example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},"account_id":{"type":"string","format":"uuid","description":"The account the person wrote to.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"workspace_id":{"type":"string","format":"uuid","description":"The account's workspace.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"channel":{"type":"string","description":"`MESSENGER` (Facebook Page) or `INSTAGRAM_DM`.","enum":["MESSENGER","INSTAGRAM_DM"],"example":"MESSENGER"},"participant":{"$ref":"#/components/schemas/ConversationParticipant","description":"The person on the other side."},"status":{"type":"string","description":"`OPEN` or `CLOSED`, as set with `…/close` and `…/reopen`; an inbox state on our side only.","enum":["OPEN","CLOSED"],"example":"OPEN"},"unread_count":{"type":"integer","format":"int32","description":"Incoming messages since it was last marked read.","example":1},"last_message_at":{"type":["string","null"],"format":"date-time","description":"When the last message, either way, was sent.","example":"2026-11-02T09:00:00Z"},"last_message_preview":{"type":["string","null"],"description":"The start of the last message's text.","example":"Do you have oat milk?"},"reply_window":{"$ref":"#/components/schemas/ReplyWindow","description":"Whether, and until when, you may send."},"created_at":{"type":"string","format":"date-time","description":"When we first saw the conversation.","example":"2026-11-02T09:00:00Z"}},"required":["account_id","channel","created_at","id","last_message_at","last_message_preview","participant","reply_window","status","unread_count","workspace_id"]},"ConversationParticipant":{"type":"object","description":"The person in a conversation. Name and picture are what the platform shares, and may be null.","example":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"properties":{"external_id":{"type":"string","description":"The platform's id for the person, scoped to the account.","example":"6543210987654321"},"name":{"type":["string","null"],"description":"The person's name, when the platform shares it.","example":"Jane Doe"},"avatar_url":{"type":["string","null"],"description":"The person's picture, when the platform shares it.","example":"https://platform-lookaside.fbsbx.com/…/profile.jpg"}},"required":["avatar_url","external_id","name"]},"ReplyWindow":{"type":"object","description":"Meta's messaging window: a plain message within 24 hours of the person's last message; with `tag: HUMAN_AGENT`, within 7 days.","example":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"properties":{"open":{"type":"boolean","description":"A plain message may be sent now.","example":true},"closes_at":{"type":["string","null"],"format":"date-time","description":"When the 24-hour window closes; null if the person never wrote.","example":"2026-11-03T09:00:00Z"},"human_agent_until":{"type":["string","null"],"format":"date-time","description":"Until when a `HUMAN_AGENT` message may be sent; null if the person never wrote or the tag is not available to this app.","example":"2026-11-09T09:00:00Z"}},"required":["closes_at","human_agent_until","open"]},"SendMessageRequest":{"type":"object","description":"A message to send: `text`, `media_id`, or both.","example":{"text":"Yes, every latte comes with oat milk on request.","media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","tag":"HUMAN_AGENT"},"properties":{"text":{"type":"string","description":"The text.","example":"Yes, every latte comes with oat milk on request.","maxLength":2000,"minLength":0},"media_id":{"type":"string","format":"uuid","description":"A `READY` media item to attach.","example":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"tag":{"type":"string","description":"`HUMAN_AGENT` to answer a person 24 hours to 7 days after their last message (needs Meta's Human Agent permission). Omit otherwise.","example":"HUMAN_AGENT"}}},"Message":{"type":"object","description":"One message in a conversation.","example":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c101","conversation_id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","direction":"OUT","text":"Yes, every latte comes with oat milk on request.","attachments":[{"type":"IMAGE","url":"https://lookaside.fbsbx.com/…/image.jpg"}],"status":"SENT","error":{"code":"send_outcome_unknown","message":"The send was not confirmed in time."},"created_at":"2026-11-02T09:00:04Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The message's id.","example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c101"},"conversation_id":{"type":"string","format":"uuid","description":"The conversation it belongs to.","example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},"direction":{"type":"string","description":"`IN` from the person, `OUT` from the account.","enum":["IN","OUT"],"example":"OUT"},"text":{"type":["string","null"],"description":"The text; null for an attachment-only message.","example":"Yes, every latte comes with oat milk on request."},"attachments":{"type":"array","description":"Attached files; empty when there are none.","items":{"$ref":"#/components/schemas/MessageAttachment"}},"status":{"type":"string","description":"Incoming: `RECEIVED`. Outgoing: `QUEUED` (accepted, not sent yet), `SENT`, `DELIVERED`, `READ`, or `FAILED` (see `error`).","enum":["RECEIVED","QUEUED","SENT","DELIVERED","READ","FAILED"],"example":"SENT"},"error":{"$ref":"#/components/schemas/MessageError","description":"Why an outgoing message failed; null otherwise."},"created_at":{"type":"string","format":"date-time","description":"When it was sent, by the platform's clock where it says.","example":"2026-11-02T09:00:04Z"}},"required":["attachments","conversation_id","created_at","direction","error","id","status","text"]},"MessageAttachment":{"type":"object","description":"A file attached to a message.","example":{"type":"IMAGE","url":"https://lookaside.fbsbx.com/…/image.jpg"},"properties":{"type":{"type":["string","null"],"description":"As the platform reports it: `IMAGE`, `VIDEO`, `AUDIO`, `FILE`, `STICKER` or `SHARE`.","example":"IMAGE"},"url":{"type":["string","null"],"description":"Where the file is, on the platform; may expire.","example":"https://lookaside.fbsbx.com/…/image.jpg"}},"required":["type","url"]},"MessageError":{"type":"object","description":"Why a message failed.","example":{"code":"send_outcome_unknown","message":"The send was not confirmed in time."},"properties":{"code":{"type":"string","description":"A machine-readable code, such as `reply_window_closed`, `platform_rejected` or `send_outcome_unknown` (we never learned whether it arrived).","example":"send_outcome_unknown"},"message":{"type":["string","null"],"description":"A sentence for a developer.","example":"The send was not confirmed in time."}},"required":["code","message"]},"CreateConnectSessionRequest":{"type":"object","description":"A new connect session.","example":{"platform":"meta","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","redirect_uri":"https://app.acmecoffee.example/social/connected","features":["publishing","comments","messaging"]},"properties":{"platform":{"type":"string","description":"Which network to connect: `meta` (Facebook Pages and the Instagram business accounts linked to them) or `linkedin` (LinkedIn organizations and the member's own profile).","enum":["meta","linkedin"],"example":"meta"},"workspace_id":{"type":"string","format":"uuid","description":"The workspace the accounts will belong to. Defaults to the org's default workspace.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"redirect_uri":{"type":"string","description":"Where to send the user back, with `session_id` and `status` (`success`, `error` or `cancelled`) added to the query. Must be on the redirect allow-list, exactly.","example":"https://app.acmecoffee.example/social/connected","maxLength":2000,"minLength":0},"features":{"type":"array","description":"What the accounts will be used for, which decides the permissions asked for: `publishing`, `comments`, `messaging`. Defaults to all three.","example":["publishing","comments","messaging"],"items":{"type":"string"}}},"required":["platform","redirect_uri"]},"ConnectSessionCreated":{"type":"object","description":"A connect session, ready to send the user to.","example":{"id":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001","url":"https://www.facebook.com/v21.0/dialog/oauth?client_id=…&state=…","expires_at":"2026-11-02T09:15:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The session's id. It comes back on your `redirect_uri` as `session_id`.","example":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001"},"url":{"type":"string","description":"The platform's consent page. Redirect the user's browser here.","example":"https://www.facebook.com/v21.0/dialog/oauth?client_id=…&state=…"},"expires_at":{"type":"string","format":"date-time","description":"The user must finish consenting before this time (15 minutes).","example":"2026-11-02T09:15:00Z"}},"required":["expires_at","id","url"]},"ConnectAccountsRequest":{"type":"object","description":"The granted accounts to connect.","example":{"external_ids":["104857600123456"]},"properties":{"external_ids":{"type":"array","description":"`external_id`s from the session's `available_accounts`.","example":["104857600123456"],"items":{"type":"string"},"minItems":1}},"required":["external_ids"]},"AccountCapabilities":{"type":"object","description":"What an account can do. Read from the permissions the user granted, so two accounts on one platform can differ: an Instagram account connected without the comments permission has `comments: false`. A `false` flag means the matching endpoints answer `400 unsupported_for_platform` for this account.","example":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"properties":{"publish":{"type":"boolean","description":"Can publish posts. Instagram needs media on every post.","example":true},"delete_post":{"type":"boolean","description":"`DELETE /v1/posts/{postId}?remote=true` can remove its posts from the platform. False on Instagram (no API); on Facebook only posts we published.","example":true},"comments":{"type":"boolean","description":"Comments are read and can be replied to. False on LinkedIn profiles, and on Instagram without the comments permission.","example":true},"comment_hide":{"type":"boolean","description":"Comments can be hidden and unhidden. Facebook and Instagram only.","example":true},"reactions":{"type":"boolean","description":"Can react (`LIKE`) to comments. Facebook Pages and LinkedIn organizations.","example":true},"messaging":{"type":"boolean","description":"Has an inbox: Messenger for Facebook Pages, DMs for Instagram. Never on LinkedIn.","example":true},"reshare":{"type":"boolean","description":"Can reshare an existing post (`options.linkedin.reshare_of`). LinkedIn only.","example":false}},"required":["comment_hide","comments","delete_post","messaging","publish","reactions","reshare"]},"SocialAccount":{"type":"object","description":"A connected social account: a Facebook Page, an Instagram business account, a LinkedIn organization or a LinkedIn member profile.","example":{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The account's id; use it in `account_ids` when posting.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"workspace_id":{"type":"string","format":"uuid","description":"The workspace the account belongs to.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"platform":{"type":"string","description":"`FACEBOOK_PAGE`, `INSTAGRAM`, `LINKEDIN_ORGANIZATION` or `LINKEDIN_PROFILE`.","enum":["FACEBOOK_PAGE","INSTAGRAM","LINKEDIN_ORGANIZATION","LINKEDIN_PROFILE"],"example":"FACEBOOK_PAGE"},"external_id":{"type":"string","description":"The platform's id for the account.","example":"104857600123456"},"display_name":{"type":"string","description":"The account's name on the platform.","example":"Acme Coffee"},"username":{"type":["string","null"],"description":"The account's handle, where the platform has one.","example":"acmecoffee"},"avatar_url":{"type":["string","null"],"description":"The account's picture, where the platform gives one.","example":"https://cdn.acmecoffee.example/social/avatar.jpg"},"status":{"type":"string","description":"`CONNECTED`; `NEEDS_REAUTH` (the credential stopped working: reconnect it with a new connect session); `DISCONNECTED` (tokens deleted, history kept).","enum":["CONNECTED","NEEDS_REAUTH","DISCONNECTED"],"example":"CONNECTED"},"capabilities":{"$ref":"#/components/schemas/AccountCapabilities","description":"What this account can do, from the permissions granted when it was connected."},"connected_at":{"type":"string","format":"date-time","description":"When the account was (last) connected.","example":"2026-11-02T09:00:00Z"},"last_health_check_at":{"type":["string","null"],"format":"date-time","description":"When we last checked the credential; null if never.","example":"2026-11-02T12:00:00Z"}},"required":["avatar_url","capabilities","connected_at","display_name","external_id","id","last_health_check_at","platform","status","username","workspace_id"]},"ReactionRequest":{"type":"object","description":"A reaction. The body may be left out.","example":{"type":"LIKE"},"properties":{"type":{"type":"string","description":"`LIKE`, the default and only type for now.","example":"LIKE"}}},"CommentSyncResult":{"type":"object","description":"What an on-demand comment sync found.","example":{"account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","posts_seen":20,"comments_created":3,"comments_updated":1},"properties":{"account_id":{"type":"string","format":"uuid","description":"The account synced.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"posts_seen":{"type":"integer","format":"int32","description":"Recent posts looked at.","example":20},"comments_created":{"type":"integer","format":"int32","description":"Comments we had not seen before.","example":3},"comments_updated":{"type":"integer","format":"int32","description":"Comments that had changed.","example":1}},"required":["account_id","comments_created","comments_updated","posts_seen"]},"AccountHealth":{"type":"object","description":"The result of a credential check, and the account as it now stands.","example":{"account":{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"},"valid":true,"missing_scopes":[],"problems":[],"token_expires_at":"2027-01-01T09:00:00Z","publishing_quota_remaining":null},"properties":{"account":{"$ref":"#/components/schemas/SocialAccount","description":"The account after the check: an invalid credential has moved it to `NEEDS_REAUTH`."},"valid":{"type":"boolean","description":"Whether the platform still honours the credential.","example":true},"missing_scopes":{"type":"array","description":"Permissions the account needs but was not granted. Reconnect and grant them.","example":[],"items":{"type":"string"}},"problems":{"type":"array","description":"What else the platform reported, as machine-readable codes.","example":[],"items":{"type":"string"}},"token_expires_at":{"type":["string","null"],"format":"date-time","description":"When the token expires; null if it does not, or the platform does not say.","example":"2027-01-01T09:00:00Z"},"publishing_quota_remaining":{"type":["integer","null"],"format":"int32","description":"Posts the platform still allows today (Instagram's publishing limit); null where there is none.","example":null}},"required":["account","missing_scopes","problems","publishing_quota_remaining","token_expires_at","valid"]},"UpdateWorkspaceRequest":{"type":"object","description":"Workspace changes. Only the fields you send change.","example":{"name":"Acme Coffee Rotterdam Centraal"},"properties":{"name":{"type":"string","description":"The new name.","example":"Acme Coffee Rotterdam Centraal","maxLength":200,"minLength":0}}},"UpdateWebhookSubscriptionRequest":{"type":"object","description":"Subscription changes. Only the fields you send change.","example":{"event_types":["post.published","post.failed","comment.created","message.received"],"status":"PAUSED"},"properties":{"event_types":{"type":"array","description":"The event types to deliver. Org subscriptions: `account.*`, `post.*`, `comment.*`, `conversation.created`, `message.*`, `quota.*`, `webhook.disabled`. Partner subscriptions: `org.*`, `org.quota.*`, `usage.daily_ready`, `webhook.disabled`, plus the org types for an OPERATOR partner. Each type and its payload is listed under `webhooks`; unknown or disallowed types are `400 validation_failed`. Replaces the list.","example":["post.published","post.failed","comment.created","message.received"],"items":{"type":"string"}},"status":{"type":"string","description":"`ACTIVE` to resume (also re-enables a `DISABLED` subscription), `PAUSED` to hold deliveries. `DISABLED` is refused.","enum":["ACTIVE","PAUSED","DISABLED"],"example":"PAUSED"}}},"WebhookSubscription":{"type":"object","description":"A webhook subscription, without its secret.","example":{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The subscription's id.","example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},"url":{"type":"string","description":"Where events are POSTed.","example":"https://app.acmecoffee.example/hooks/wasparks"},"event_types":{"type":"array","description":"The event types delivered.","example":["post.published","post.failed","comment.created","message.received"],"items":{"type":"string"}},"status":{"type":"string","description":"`ACTIVE` delivers; `PAUSED` holds deliveries until resumed; `DISABLED` was set by us after 20 consecutive dead deliveries.","enum":["ACTIVE","PAUSED","DISABLED"],"example":"ACTIVE"},"created_at":{"type":"string","format":"date-time","description":"When the subscription was created.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","event_types","id","status","url"]},"UpdatePostRequest":{"type":"object","description":"Changes to a `DRAFT` or `SCHEDULED` post. Only the fields you send change; a new `scheduled_at` on a draft schedules it.","example":{"text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media_ids":["0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"],"account_ids":["0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"],"scheduled_at":"2026-11-03T08:00:00Z","overrides":{"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01":{"text":"Pumpkin spice is back at Acme Coffee! #fall"}},"options":{"instagram":{"type":"FEED"},"facebook":{"type":"FEED"},"linkedin":{"visibility":"PUBLIC","reshare_of":"urn:li:share:7123456789012345678"}}},"properties":{"text":{"type":"string","description":"The post's text. Required on every platform except Instagram media posts; length limits are per platform.","example":"Pumpkin spice season is back at Acme Coffee. Come say hi!"},"link_url":{"type":"string","description":"A link to share. Facebook shows its own preview; LinkedIn shows `link_preview` when it has a `title`, otherwise appends the URL to the text; Instagram appends it as plain text (with a warning). With media, the URL is appended to the text everywhere.","example":"https://acmecoffee.example/menu/fall","maxLength":2000,"minLength":0},"link_preview":{"$ref":"#/components/schemas/LinkPreview","description":"The link card on LinkedIn; ignored elsewhere."},"media_ids":{"type":"array","description":"`READY` media to attach, in order. Instagram needs at least one. Replaces the list.","example":["0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"],"items":{"type":"string","format":"uuid"}},"account_ids":{"type":"array","description":"The accounts to publish to. Replaces the targets.","example":["0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"],"items":{"type":"string","format":"uuid"}},"scheduled_at":{"type":"string","format":"date-time","description":"When to publish (UTC, in the future).","example":"2026-11-03T08:00:00Z"},"overrides":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PostOverride"},"description":"Per-account text and options, keyed by account id. Each replaces the post's own `text` or `options` for that account only.","example":{"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01":{"text":"Pumpkin spice is back at Acme Coffee! #fall"}}},"options":{"$ref":"#/components/schemas/PostOptions","description":"Per-platform options."}}},"UpdatePlanRequest":{"type":"object","description":"Plan changes. Only the fields you send change.","example":{"name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3}},"properties":{"name":{"type":"string","description":"A display name.","example":"Growth","maxLength":200,"minLength":0},"limits":{"$ref":"#/components/schemas/PlanLimits","description":"The plan's new limits, replacing the old ones. A limit left out is unlimited."}}},"UpdateOrgRequest":{"type":"object","description":"Org changes. Only the fields you send change.","example":{"name":"Acme Coffee","external_ref":"acme-coffee-42","plan_code":"scale","timezone":"Europe/Amsterdam"},"properties":{"name":{"type":"string","description":"The client's business name.","example":"Acme Coffee","maxLength":200,"minLength":0},"external_ref":{"type":"string","description":"Your own id for this client, unique among your orgs. It is what an OPERATOR partner sends as `X-Tenant-Id`.","example":"acme-coffee-42","maxLength":200,"minLength":0},"plan_code":{"type":"string","description":"Move the org to another plan.","example":"scale","maxLength":80,"minLength":0},"timezone":{"type":"string","description":"IANA time zone the org works in.","example":"Europe/Amsterdam","maxLength":64,"minLength":0}}},"WorkspaceList":{"type":"object","example":{"data":[{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","name":"Acme Coffee","is_default":true,"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Workspace"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"WebhookSubscriptionList":{"type":"object","example":{"data":[{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","url":"https://app.acmecoffee.example/hooks/wasparks","event_types":["post.published","post.failed","comment.created","message.received"],"status":"ACTIVE","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/WebhookSubscription"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"WebhookDeliveryList":{"type":"object","example":{"data":[{"id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101","subscription_id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","event_id":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001","event_type":"post.published","status":"DELIVERED","attempts":1,"last_status_code":200,"next_attempt_at":"2026-11-02T09:01:04Z","delivered_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"LimitUsage":{"type":"object","description":"One plan limit and current use against it.","example":{"limit":"social_accounts","used":3,"max":10},"properties":{"limit":{"type":"string","description":"`social_accounts` (connected now), `posts_per_month` (this calendar month, UTC), `members` or `workspaces`.","example":"social_accounts"},"used":{"type":"integer","format":"int64","description":"Current use.","example":3},"max":{"type":["integer","null"],"format":"int64","description":"The limit; null means unlimited, never zero.","example":10}},"required":["limit","max","used"]},"UsageRow":{"type":"object","description":"One group of counts. With `group_by=org` only `org_id` is set, with `day` only `day`, with `event_type` neither.","example":{"org_id":null,"day":"2026-11-01","totals":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904}},"properties":{"org_id":{"type":["string","null"],"format":"uuid","description":"The org, when grouped by org; otherwise null.","example":null},"day":{"type":["string","null"],"format":"date","description":"The day (UTC), when grouped by day; otherwise null.","example":"2026-11-01"},"totals":{"$ref":"#/components/schemas/UsageTotals","description":"Count per usage event type, every type present."}},"required":["day","org_id","totals"]},"UsageSummary":{"type":"object","description":"Usage counts for a date range, grouped one way. Today's numbers trail by a few minutes.","example":{"from":"2026-10-03","to":"2026-11-01","group_by":"day","data":[{"org_id":null,"day":"2026-11-01","totals":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904}}],"limits":[{"limit":"social_accounts","used":3,"max":10}]},"properties":{"from":{"type":"string","format":"date","description":"First day counted (UTC), inclusive.","example":"2026-10-03"},"to":{"type":"string","format":"date","description":"Last day counted (UTC), inclusive.","example":"2026-11-01"},"group_by":{"type":"string","description":"The grouping used.","enum":["org","event_type","day"],"example":"day"},"data":{"type":"array","description":"One row per group. Days and orgs without activity are left out.","items":{"$ref":"#/components/schemas/UsageRow"}},"limits":{"type":"array","description":"The org's plan limits against current use. Present on single-org views (`GET /v1/usage`, `GET /v1/partner/orgs/{orgId}/usage`); absent partner-wide.","items":{"$ref":"#/components/schemas/LimitUsage"}}},"required":["data","from","group_by","to"]},"UsageTotals":{"type":"object","description":"Counts per usage event type. Every type is present, zero included; new types may be added.","example":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904},"properties":{"POST_PUBLISHED":{"type":"integer","format":"int64","description":"Posts settled with at least one target published; counts towards `posts_per_month`.","example":12},"TARGET_PUBLISHED":{"type":"integer","format":"int64","description":"Targets (one post on one account) published.","example":20},"COMMENT_RECEIVED":{"type":"integer","format":"int64","description":"Comments received.","example":40},"COMMENT_SENT":{"type":"integer","format":"int64","description":"Comments and replies posted through the API.","example":3},"MESSAGE_RECEIVED":{"type":"integer","format":"int64","description":"Messages received.","example":8},"MESSAGE_SENT":{"type":"integer","format":"int64","description":"Messages sent through the API.","example":5},"ACCOUNT_CONNECTED":{"type":"integer","format":"int64","description":"Accounts connected.","example":0},"API_CALL":{"type":"integer","format":"int64","description":"Authenticated Content API requests (Partner API calls are not counted).","example":1904}},"required":["ACCOUNT_CONNECTED","API_CALL","COMMENT_RECEIVED","COMMENT_SENT","MESSAGE_RECEIVED","MESSAGE_SENT","POST_PUBLISHED","TARGET_PUBLISHED"]},"PostList":{"type":"object","example":{"data":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","link_url":"https://acmecoffee.example/menu/fall","link_preview":{"title":"Our fall menu","description":"Pumpkin spice, maple oat and more.","thumbnail_media_id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001"},"media":[{"id":"0192a7c2-0e00-7d44-8b55-6c7d8e9fa001","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","type":"IMAGE","mime_type":"image/jpeg","size_bytes":482113,"width":1080,"height":1350,"duration_ms":null,"status":"READY","url":"https://storage.googleapis.com/wasparks-media/…?X-Goog-Signature=…","platform_checks":{"facebook_page":{"ok":true,"problems":[]},"instagram":{"ok":false,"problems":["aspect_ratio"]},"linkedin_organization":{"ok":true,"problems":[]},"linkedin_profile":{"ok":true,"problems":[]}},"created_at":"2026-11-02T09:00:00Z"}],"scheduled_at":null,"targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}],"warnings":[{"field":"account_ids[0]","code":"media_required","message":"Instagram posts need at least one image or video.","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"}],"created_at":"2026-11-02T09:00:00Z","updated_at":"2026-11-02T09:00:04Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Post"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"RedirectUriList":{"type":"object","example":{"data":[{"id":"0192a7c5-8000-7e11-9c22-d3e4f5a6b001","uri":"https://app.acmecoffee.example/social/connected","owner_scope":"PARTNER","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/RedirectUri"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"PlanList":{"type":"object","example":{"data":[{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3},"status":"ACTIVE"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Plan"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"OrgList":{"type":"object","example":{"data":[{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Org"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"ApiKey":{"type":"object","description":"An org key, without its secret.","example":{"id":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001","name":"Acme Coffee production","key_prefix":"3fa9c1d2e4b5a6c7d8","environment":"LIVE","permissions":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"status":"ACTIVE","last_used_at":"2026-11-02T09:00:04Z","expires_at":"2027-11-02T00:00:00Z","created_at":"2026-11-02T09:00:00Z"},"properties":{"id":{"type":"string","format":"uuid","description":"The key's id, used to revoke it.","example":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001"},"name":{"type":"string","description":"The key's label.","example":"Acme Coffee production"},"key_prefix":{"type":"string","description":"The key's public prefix, the only part of the key ever shown again. Use it to tell keys apart.","example":"3fa9c1d2e4b5a6c7d8"},"environment":{"type":"string","description":"`LIVE` keys act on the real platforms; `TEST` keys are reserved for sandbox behaviour.","enum":["LIVE","TEST"],"example":"LIVE"},"permissions":{"type":"array","description":"What the key may do. Org permissions: `accounts:read`, `accounts:write`, `media:write`, `posts:read`, `posts:write`, `comments:read`, `comments:write`, `messages:read`, `messages:write`, `webhooks:write`, `usage:read`, `workspaces:write`.","example":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"items":{"type":"string"}},"status":{"type":"string","description":"`ACTIVE`, or `REVOKED` once deleted.","enum":["ACTIVE","REVOKED"],"example":"ACTIVE"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When the key last authenticated a request; null if never.","example":"2026-11-02T09:00:04Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the key stops working; null if it never expires.","example":"2027-11-02T00:00:00Z"},"created_at":{"type":"string","format":"date-time","description":"When the key was created.","example":"2026-11-02T09:00:00Z"}},"required":["created_at","environment","expires_at","id","key_prefix","last_used_at","name","permissions","status"]},"ApiKeyList":{"type":"object","example":{"data":[{"id":"0192a7c5-6e00-7c99-9a00-b1c2d3e4f001","name":"Acme Coffee production","key_prefix":"3fa9c1d2e4b5a6c7d8","environment":"LIVE","permissions":["accounts:read","accounts:write","media:write","posts:read","posts:write"],"status":"ACTIVE","last_used_at":"2026-11-02T09:00:04Z","expires_at":"2027-11-02T00:00:00Z","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/ApiKey"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"DomainList":{"type":"object","example":{"data":[{"id":"0192a7c5-7f00-7d00-8b11-c2d3e4f5a001","hostname":"social.acmecoffee.example","status":"PENDING","verification_token":"wasparks-verify-q8Zt3nV1mXc5LkP0aR7sWd2eYf9uBh4j","verified_at":"2026-11-02T09:00:04Z","created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Domain"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"CurrentOrg":{"type":"object","description":"The org the key belongs to (or the one `X-Tenant-Id` names), its plan and its use of each plan limit.","example":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","status":"ACTIVE","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","plan":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3}},"usage":[{"limit":"social_accounts","used":3,"max":10}]},"properties":{"id":{"type":"string","format":"uuid","description":"The org's id.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"},"name":{"type":"string","description":"The org's name.","example":"Acme Coffee"},"status":{"type":"string","description":"Always `ACTIVE` here: a suspended or closed org's calls are refused with `403 org_suspended` or `403 org_closed`.","enum":["ACTIVE","SUSPENDED","CLOSED"],"example":"ACTIVE"},"timezone":{"type":"string","description":"IANA time zone the org works in.","example":"Europe/Amsterdam"},"created_at":{"type":"string","format":"date-time","description":"When the org was created.","example":"2026-11-02T09:00:00Z"},"plan":{"$ref":"#/components/schemas/OrgPlan","description":"The org's plan."},"usage":{"type":"array","description":"Each plan limit against current use, always in the order `social_accounts`, `posts_per_month`, `members`, `workspaces`.","items":{"$ref":"#/components/schemas/LimitUsage"}}},"required":["created_at","id","name","plan","status","timezone","usage"]},"OrgPlan":{"type":"object","description":"The org's plan. `code` and `name` are null, and `limits` empty, when the org has no plan.","example":{"code":"growth","name":"Growth","limits":{"social_accounts":10,"posts_per_month":500,"members":5,"workspaces":3}},"properties":{"code":{"type":["string","null"],"description":"The plan's code.","example":"growth"},"name":{"type":["string","null"],"description":"The plan's display name.","example":"Growth"},"limits":{"$ref":"#/components/schemas/PlanLimits","description":"The plan's limits. A limit left out is unlimited."}},"required":["code","limits","name"]},"ConversationList":{"type":"object","example":{"data":[{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Conversation"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"MessageList":{"type":"object","example":{"data":[{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c101","conversation_id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","direction":"OUT","text":"Yes, every latte comes with oat milk on request.","attachments":[{"type":"IMAGE","url":"https://lookaside.fbsbx.com/…/image.jpg"}],"status":"SENT","error":{"code":"send_outcome_unknown","message":"The send was not confirmed in time."},"created_at":"2026-11-02T09:00:04Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Message"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"AvailableAccount":{"type":"object","description":"An account the user granted in a connect session, not connected yet.","example":{"platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"already_connected":false},"properties":{"platform":{"type":"string","description":"`FACEBOOK_PAGE`, `INSTAGRAM`, `LINKEDIN_ORGANIZATION` or `LINKEDIN_PROFILE`.","enum":["FACEBOOK_PAGE","INSTAGRAM","LINKEDIN_ORGANIZATION","LINKEDIN_PROFILE"],"example":"FACEBOOK_PAGE"},"external_id":{"type":"string","description":"The platform's id for the account. Send it in `external_ids` to connect it.","example":"104857600123456"},"display_name":{"type":"string","description":"The account's name on the platform.","example":"Acme Coffee"},"username":{"type":["string","null"],"description":"The account's handle, where the platform has one.","example":"acmecoffee"},"avatar_url":{"type":["string","null"],"description":"The account's picture, where the platform gives one.","example":"https://cdn.acmecoffee.example/social/avatar.jpg"},"capabilities":{"$ref":"#/components/schemas/AccountCapabilities","description":"What the account will be able to do once connected, from the permissions the user actually granted."},"already_connected":{"type":"boolean","description":"The org already has this account. Connecting it again refreshes it instead of adding a second.","example":false}},"required":["already_connected","avatar_url","capabilities","display_name","external_id","platform","username"]},"ConnectSession":{"type":"object","description":"A connect session and, once the user has consented, the accounts they granted.","example":{"id":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001","platform":"meta","status":"READY","error":null,"expires_at":"2026-11-02T09:15:00Z","available_accounts":[{"platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"already_connected":false}]},"properties":{"id":{"type":"string","format":"uuid","description":"The session's id.","example":"0192a7c6-9100-7f22-8d33-e4f5a6b7c001"},"platform":{"type":"string","description":"Which network to connect: `meta` (Facebook Pages and the Instagram business accounts linked to them) or `linkedin` (LinkedIn organizations and the member's own profile).","enum":["meta","linkedin"],"example":"meta"},"status":{"type":"string","description":"`PENDING` (user not back yet), `READY` (pick accounts from `available_accounts`), `CANCELLED` (user declined), `ERROR` (see `error`) or `COMPLETED` (accounts connected; the session is spent).","enum":["PENDING","READY","CANCELLED","ERROR","COMPLETED"],"example":"READY"},"error":{"type":["string","null"],"description":"Why the session failed, when `status` is `ERROR`; otherwise null.","example":null},"expires_at":{"type":"string","format":"date-time","description":"When the session expires.","example":"2026-11-02T09:15:00Z"},"available_accounts":{"type":"array","description":"What the user granted: Pages, Instagram business accounts, LinkedIn organizations and the member profile. Empty until `READY`.","items":{"$ref":"#/components/schemas/AvailableAccount"}}},"required":["available_accounts","error","expires_at","id","platform","status"]},"CommentList":{"type":"object","example":{"data":[{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/Comment"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"SocialAccountList":{"type":"object","example":{"data":[{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"}],"next_cursor":null},"properties":{"data":{"type":"array","description":"This page's items.","items":{"$ref":"#/components/schemas/SocialAccount"}},"next_cursor":{"type":["string","null"],"description":"Pass as `cursor` to get the next page; null on the last page.","example":null}},"required":["data","next_cursor"]},"DeletedPost":{"type":"object","description":"A deleted post. It is gone on our side whatever the platforms said.","example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","status":"PUBLISHED","remote_results":[{"target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"DELETED","code":null,"message":null}]},"properties":{"id":{"type":"string","format":"uuid","description":"The deleted post's id.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},"status":{"type":"string","description":"The status the post had when it was deleted.","enum":["DRAFT","SCHEDULED","PUBLISHING","PUBLISHED","PARTIAL","FAILED","CANCELLED"],"example":"PUBLISHED"},"remote_results":{"type":"array","description":"One entry per target with `remote=true`; empty otherwise.","items":{"$ref":"#/components/schemas/RemoteDeleteResult"}}},"required":["id","remote_results","status"]},"RemoteDeleteResult":{"type":"object","description":"What happened on the platform to one target when the post was deleted with `remote=true`.","example":{"target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"DELETED","code":null,"message":null},"properties":{"target_id":{"type":"string","format":"uuid","description":"The target.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11"},"account_id":{"type":"string","format":"uuid","description":"The target's account.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"platform":{"type":"string","description":"The account's platform.","enum":["FACEBOOK_PAGE","INSTAGRAM","LINKEDIN_ORGANIZATION","LINKEDIN_PROFILE"],"example":"FACEBOOK_PAGE"},"status":{"type":"string","description":"`DELETED` on the platform; `SKIPPED` (see `code`); `FAILED` (the platform refused; see `code` and `message`).","enum":["DELETED","SKIPPED","FAILED"],"example":"DELETED"},"code":{"type":["string","null"],"description":"Null when `DELETED`. When `SKIPPED`: `not_published`, `already_deleted` or `unsupported_for_platform` (no delete on that platform, such as Instagram). When `FAILED`: the platform error's code.","example":null},"message":{"type":["string","null"],"description":"A sentence for a developer; null when `DELETED`.","example":null}},"required":["account_id","code","message","platform","status","target_id"]},"WebhookEnvelope":{"type":"object","description":"The body of every webhook delivery. Deliveries are at-least-once and unordered: dedupe on `id`, and ignore event types you do not know. Verify `X-WSS-Signature` before trusting the body.","example":{"id":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001","type":"comment.created","created_at":"2026-11-02T09:00:00Z","org_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","data":{}},"properties":{"id":{"type":"string","description":"The event's id, `evt_` followed by a UUID. The same on every retry and redelivery of the event: dedupe on it.","example":"evt_0192a7c4-5d00-7b88-8f99-a0b1c2d3e001"},"type":{"type":"string","description":"The event type, which decides the shape of `data`. See the `webhooks` section for each type.","example":"comment.created"},"created_at":{"type":"string","format":"date-time","description":"When the event happened (UTC).","example":"2026-11-02T09:00:00Z"},"org_id":{"type":["string","null"],"format":"uuid","description":"The org the event is about. Null on partner-level events (`usage.daily_ready`, and `webhook.disabled` for a partner subscription).","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"},"workspace_id":{"type":["string","null"],"format":"uuid","description":"The workspace of the account, post, comment or conversation the event is about. Null on org- and partner-level events.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"data":{"type":"object","additionalProperties":{},"description":"The payload. Its shape depends on `type`: one of the `*EventData` schemas."}},"required":["created_at","data","id","org_id","type","workspace_id"]},"AccountEventData":{"type":"object","description":"`data` of `account.*` events.","example":{"account":{"id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","external_id":"104857600123456","display_name":"Acme Coffee","username":"acmecoffee","avatar_url":"https://cdn.acmecoffee.example/social/avatar.jpg","status":"CONNECTED","capabilities":{"publish":true,"delete_post":true,"comments":true,"comment_hide":true,"reactions":true,"messaging":true,"reshare":false},"connected_at":"2026-11-02T09:00:00Z","last_health_check_at":"2026-11-02T12:00:00Z"}},"properties":{"account":{"$ref":"#/components/schemas/SocialAccount","description":"The account as it now stands."}},"required":["account"]},"PostEventData":{"type":"object","description":"`data` of `post.published`, `post.partially_published` and `post.failed`.","example":{"post":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","status":"PUBLISHED","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332"}]}},"properties":{"post":{"$ref":"#/components/schemas/PostEventSummary","description":"A summary of the settled post."}},"required":["post"]},"PostEventSummary":{"type":"object","description":"The post as `post.*` events carry it: ids, status and each target's outcome. Fetch the post for its text, media and errors.","example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","status":"PUBLISHED","targets":[{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","status":"PUBLISHED","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332"}]},"properties":{"id":{"type":"string","format":"uuid","description":"The post's id.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},"workspace_id":{"type":"string","format":"uuid","description":"The post's workspace.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02"},"status":{"type":"string","description":"`PUBLISHED`, `PARTIAL` or `FAILED`.","enum":["DRAFT","SCHEDULED","PUBLISHING","PUBLISHED","PARTIAL","FAILED","CANCELLED"],"example":"PUBLISHED"},"targets":{"type":"array","description":"One entry per target account.","items":{"$ref":"#/components/schemas/PostEventTarget"}}},"required":["id","status","targets","workspace_id"]},"PostEventTarget":{"type":"object","description":"One target in a `post.*` event.","example":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","status":"PUBLISHED","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332"},"properties":{"id":{"type":"string","format":"uuid","description":"The target's id.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11"},"account_id":{"type":"string","format":"uuid","description":"The account this target publishes to.","example":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01"},"status":{"type":"string","description":"`PUBLISHED` or `FAILED`.","enum":["PENDING","PUBLISHING","PUBLISHED","FAILED"],"example":"PUBLISHED"},"external_post_id":{"type":"string","description":"The platform's id for the published post; an empty string, not null, when the target was not published.","example":"104857600123456_998877665544332"},"permalink":{"type":"string","description":"Link to the post on the platform; an empty string, not null, when there is none.","example":"https://www.facebook.com/104857600123456/posts/998877665544332"}},"required":["account_id","external_post_id","id","permalink","status"]},"PostTargetEventData":{"type":"object","description":"`data` of `post.target.published` and `post.target.failed`.","example":{"post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target":{"id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","platform":"FACEBOOK_PAGE","status":"PUBLISHED","text":"Pumpkin spice season is back at Acme Coffee. Come say hi!","external_post_id":"104857600123456_998877665544332","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332","published_at":"2026-11-02T09:00:04Z","attempts":1,"error":{"code":"platform_rejected","message":"The image aspect ratio is not supported."}}},"properties":{"post_id":{"type":"string","format":"uuid","description":"The post the target belongs to.","example":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01"},"target":{"$ref":"#/components/schemas/PostTarget","description":"The target as it now stands."}},"required":["post_id","target"]},"CommentEventData":{"type":"object","description":"`data` of `comment.*` events.","example":{"comment":{"id":"0192a7c3-2a00-7e55-9c66-7d8e9fa0b001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","platform":"FACEBOOK_PAGE","post_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f01","target_id":"0192a7c2-1f00-7c33-9a44-5b6c7d8e9f11","external_post_id":"104857600123456_998877665544332","external_id":"998877665544332_112233445566","parent_id":null,"author":{"external_id":"7744558899001122","type":"PERSON","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/avatar.jpg"},"text":"Is the pumpkin latte available with oat milk?","permalink":"https://www.facebook.com/104857600123456/posts/998877665544332?comment_id=112233445566","is_own":false,"status":"VISIBLE","replies_count":2,"created_at":"2026-11-02T09:00:00Z","synced_at":"2026-11-02T09:00:04Z"}},"properties":{"comment":{"$ref":"#/components/schemas/Comment","description":"The comment as it now stands."}},"required":["comment"]},"ConversationEventData":{"type":"object","description":"`data` of `conversation.created`.","example":{"conversation":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","account_id":"0192a7c1-6a10-7b22-8e31-4c5d6e7f8a01","workspace_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b02","channel":"MESSENGER","participant":{"external_id":"6543210987654321","name":"Jane Doe","avatar_url":"https://platform-lookaside.fbsbx.com/…/profile.jpg"},"status":"OPEN","unread_count":1,"last_message_at":"2026-11-02T09:00:00Z","last_message_preview":"Do you have oat milk?","reply_window":{"open":true,"closes_at":"2026-11-03T09:00:00Z","human_agent_until":"2026-11-09T09:00:00Z"},"created_at":"2026-11-02T09:00:00Z"}},"properties":{"conversation":{"$ref":"#/components/schemas/Conversation","description":"The new conversation."}},"required":["conversation"]},"MessageEventData":{"type":"object","description":"`data` of `message.*` events.","example":{"conversation_id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","message":{"id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c101","conversation_id":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001","direction":"OUT","text":"Yes, every latte comes with oat milk on request.","attachments":[{"type":"IMAGE","url":"https://lookaside.fbsbx.com/…/image.jpg"}],"status":"SENT","error":{"code":"send_outcome_unknown","message":"The send was not confirmed in time."},"created_at":"2026-11-02T09:00:04Z"}},"properties":{"conversation_id":{"type":"string","format":"uuid","description":"The conversation the message belongs to.","example":"0192a7c3-3b00-7f66-8d77-8e9fa0b1c001"},"message":{"$ref":"#/components/schemas/Message","description":"The message as it now stands."}},"required":["conversation_id","message"]},"QuotaEventData":{"type":"object","description":"`data` of `quota.warning` and `quota.exceeded` (reserved).","example":{"limit":"posts_per_month","used":400,"max":500},"properties":{"limit":{"type":"string","description":"The plan limit: `social_accounts`, `posts_per_month`, `members` or `workspaces`.","example":"posts_per_month"},"used":{"type":"integer","format":"int64","description":"Current use.","example":400},"max":{"type":"integer","format":"int64","description":"The limit.","example":500}},"required":["limit","max","used"]},"OrgEventData":{"type":"object","description":"`data` of `org.*` events.","example":{"org":{"id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","name":"Acme Coffee","external_ref":"acme-coffee-42","status":"ACTIVE","plan_code":"growth","timezone":"Europe/Amsterdam","created_at":"2026-11-02T09:00:00Z","connected_accounts":3,"members":2}},"properties":{"org":{"$ref":"#/components/schemas/Org","description":"The org as `GET /v1/partner/orgs/{orgId}` returns it: counts only."}},"required":["org"]},"OrgQuotaEventData":{"type":"object","description":"`data` of `org.quota.warning` and `org.quota.exceeded` (reserved).","example":{"org_id":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01","limit":"posts_per_month","used":400,"max":500},"properties":{"org_id":{"type":"string","format":"uuid","description":"The org whose limit it is.","example":"0192a7c1-5d2e-7a10-9c4b-2f6e8d1a3b01"},"limit":{"type":"string","description":"The plan limit: `social_accounts`, `posts_per_month`, `members` or `workspaces`.","example":"posts_per_month"},"used":{"type":"integer","format":"int64","description":"Current use.","example":400},"max":{"type":"integer","format":"int64","description":"The limit.","example":500}},"required":["limit","max","org_id","used"]},"UsageDailyReadyEventData":{"type":"object","description":"`data` of `usage.daily_ready`.","example":{"day":"2026-11-01","totals":{"POST_PUBLISHED":12,"TARGET_PUBLISHED":20,"COMMENT_RECEIVED":40,"COMMENT_SENT":3,"MESSAGE_RECEIVED":8,"MESSAGE_SENT":5,"ACCOUNT_CONNECTED":0,"API_CALL":1904}},"properties":{"day":{"type":"string","format":"date","description":"The UTC day the totals are for.","example":"2026-11-01"},"totals":{"$ref":"#/components/schemas/UsageTotals","description":"Your totals across all your orgs that day, every event type present, zeros included."}},"required":["day","totals"]},"WebhookDisabledEventData":{"type":"object","description":"`data` of `webhook.disabled`.","example":{"subscription_id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","reason":"consecutive_dead_deliveries"},"properties":{"subscription_id":{"type":"string","format":"uuid","description":"The subscription that was disabled.","example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},"reason":{"type":"string","description":"Why: `consecutive_dead_deliveries` (20 in a row).","example":"consecutive_dead_deliveries"}},"required":["reason","subscription_id"]},"WebhookTestEventData":{"type":"object","description":"`data` of `webhook.test`.","example":{"subscription_id":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001","message":"This is a test delivery from WaSparks Social."},"properties":{"subscription_id":{"type":"string","format":"uuid","description":"The subscription being tested.","example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d001"},"message":{"type":"string","description":"A fixed sentence.","example":"This is a test delivery from WaSparks Social."}},"required":["message","subscription_id"]}},"parameters":{"TenantId":{"name":"X-Tenant-Id","in":"header","description":"With a partner key, send `X-Tenant-Id` (the org's `external_ref`). Required for an OPERATOR partner's key on the Content API (`400 tenant_required` without it); org keys never send it.","required":false,"schema":{"type":"string"},"example":"acme-coffee-42"},"Limit":{"name":"limit","in":"query","description":"Items per page, 1 to 100. Keep the same value while following `next_cursor`.","required":false,"schema":{"type":"integer","format":"int32","default":25,"maximum":100,"minimum":1},"example":25},"Cursor":{"name":"cursor","in":"query","description":"Where the page starts: the `next_cursor` of the previous page. Omit for the first page; a null `next_cursor` means there are no more.","required":false,"schema":{"type":"string"},"example":"eyJvIjoyNX0"},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Any unique string of up to 255 characters, such as a UUID. Sending the same key again within 24 hours replays the original response instead of acting twice; the same key with a different body is `409 idempotency_conflict`. Scoped to the org.","required":false,"schema":{"type":"string","maxLength":255},"example":"5f0c1d2e-launch-day-post"}},"securitySchemes":{"ApiKey":{"type":"http","description":"Send the key as `Authorization: Bearer <key>`. Keys look like `wsk_<env>_<scope>_<prefix>_<secret>`: `env` is `live` or `test`, `scope` is `partner` or `org`, and `prefix` is the part shown back to you as `key_prefix`. A **partner key** calls `/v1/partner/**` only; an **org key** calls the rest of `/v1/**`. A key on the wrong surface is refused with `403 partner_key_not_allowed` or `403 org_key_not_allowed`, unless the partner is in OPERATOR mode: then its key may call the Content API too, and must name the org in `X-Tenant-Id` (`400 tenant_required` without it). Every key also needs the permission an operation names in brackets, such as `[posts:write]` (`403 insufficient_permission`).","scheme":"bearer","bearerFormat":"wsk_<env>_<scope>_<prefix>_<secret>"}}},"webhooks":{"account.connected":{"post":{"summary":"An account was connected","description":"A user finished a connect session and the account was connected, or a reconnect refreshed an existing one. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"accountConnectedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"account.connected"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["account.connected"]},"data":{"$ref":"#/components/schemas/AccountEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"account.needs_reauth":{"post":{"summary":"An account needs to be reconnected","description":"The platform stopped honouring the account's credential (expired, revoked or missing a permission). Send the user through a new connect session; until then publishing and replies fail with `account_needs_reauth`. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"accountNeedsReauthEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"account.needs_reauth"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["account.needs_reauth"]},"data":{"$ref":"#/components/schemas/AccountEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"account.disconnected":{"post":{"summary":"An account was disconnected","description":"The account was disconnected through the API, or the user removed the app on the platform. Its tokens are deleted; its history is kept. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"accountDisconnectedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"account.disconnected"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["account.disconnected"]},"data":{"$ref":"#/components/schemas/AccountEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"post.published":{"post":{"summary":"A post was published to every target","description":"Every target of the post is published. `data.post` is a summary: fetch `GET /v1/posts/{postId}` for the whole post. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"postPublishedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"post.published"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["post.published"]},"data":{"$ref":"#/components/schemas/PostEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"post.partially_published":{"post":{"summary":"A post was published to some targets","description":"The post settled with some targets published and some failed (status `PARTIAL`). Failed targets can be retried. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"postPartiallyPublishedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"post.partially_published"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["post.partially_published"]},"data":{"$ref":"#/components/schemas/PostEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"post.failed":{"post":{"summary":"A post failed on every target","description":"No target of the post could be published. Each target's `error` is on `GET /v1/posts/{postId}`. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"postFailedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"post.failed"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["post.failed"]},"data":{"$ref":"#/components/schemas/PostEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"post.target.published":{"post":{"summary":"One target of a post was published","description":"One account's copy of the post is live; `target.permalink` links to it. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"postTargetPublishedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"post.target.published"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["post.target.published"]},"data":{"$ref":"#/components/schemas/PostTargetEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"post.target.failed":{"post":{"summary":"One target of a post failed","description":"One account's copy of the post failed; `target.error` says why. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"postTargetFailedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"post.target.failed"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["post.target.failed"]},"data":{"$ref":"#/components/schemas/PostTargetEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"comment.created":{"post":{"summary":"A comment arrived or was posted","description":"A new comment on one of the org's posts, including replies and comments posted through the API (`is_own: true`). Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"commentCreatedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"comment.created"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["comment.created"]},"data":{"$ref":"#/components/schemas/CommentEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"comment.updated":{"post":{"summary":"A comment changed","description":"The comment's text changed, it was unhidden, or a LinkedIn organization commenter's name was resolved. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"commentUpdatedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"comment.updated"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["comment.updated"]},"data":{"$ref":"#/components/schemas/CommentEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"comment.hidden":{"post":{"summary":"A comment was hidden","description":"The comment was hidden on the platform. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"commentHiddenEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"comment.hidden"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["comment.hidden"]},"data":{"$ref":"#/components/schemas/CommentEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"comment.deleted":{"post":{"summary":"A comment was deleted","description":"The comment was deleted on the platform, by its author, the page or the API. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"commentDeletedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"comment.deleted"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["comment.deleted"]},"data":{"$ref":"#/components/schemas/CommentEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"conversation.created":{"post":{"summary":"A conversation started","description":"Someone wrote to one of the org's accounts for the first time. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"conversationCreatedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"conversation.created"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["conversation.created"]},"data":{"$ref":"#/components/schemas/ConversationEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"message.received":{"post":{"summary":"A message arrived","description":"An incoming message in a conversation. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"messageReceivedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"message.received"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["message.received"]},"data":{"$ref":"#/components/schemas/MessageEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"message.sent":{"post":{"summary":"A message was sent","description":"An outgoing message reached the platform, whether sent through the API or from the platform's own inbox. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"messageSentEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"message.sent"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["message.sent"]},"data":{"$ref":"#/components/schemas/MessageEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"message.delivered":{"post":{"summary":"A message was delivered","description":"The platform reports the outgoing message delivered to the participant. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"messageDeliveredEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"message.delivered"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["message.delivered"]},"data":{"$ref":"#/components/schemas/MessageEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"message.read":{"post":{"summary":"A message was read","description":"The participant read the outgoing message. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"messageReadEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"message.read"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["message.read"]},"data":{"$ref":"#/components/schemas/MessageEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"message.failed":{"post":{"summary":"A message could not be sent","description":"The outgoing message failed; `message.error.code` says why. `send_outcome_unknown` means the outcome was never learned and the message may or may not have arrived. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"messageFailedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"message.failed"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["message.failed"]},"data":{"$ref":"#/components/schemas/MessageEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"quota.warning":{"post":{"summary":"A plan limit is at 80%","description":"Reserved: subscribable now, not yet emitted. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"quotaWarningEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"quota.warning"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["quota.warning"]},"data":{"$ref":"#/components/schemas/QuotaEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"quota.exceeded":{"post":{"summary":"A plan limit is reached","description":"Reserved: subscribable now, not yet emitted. Calls that would go over the limit already answer `402 quota_exceeded`. Org subscriptions; also OPERATOR partner subscriptions, for all of the partner's orgs.","operationId":"quotaExceededEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"quota.exceeded"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["quota.exceeded"]},"data":{"$ref":"#/components/schemas/QuotaEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.created":{"post":{"summary":"An org was created","description":"One of your orgs was created. Partner subscriptions only.","operationId":"orgCreatedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.created"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.created"]},"data":{"$ref":"#/components/schemas/OrgEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.updated":{"post":{"summary":"An org was updated","description":"Its name, plan, timezone or `external_ref` changed. Partner subscriptions only.","operationId":"orgUpdatedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.updated"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.updated"]},"data":{"$ref":"#/components/schemas/OrgEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.suspended":{"post":{"summary":"An org was suspended","description":"Its Content API calls now answer `403 org_suspended`. Partner subscriptions only.","operationId":"orgSuspendedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.suspended"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.suspended"]},"data":{"$ref":"#/components/schemas/OrgEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.resumed":{"post":{"summary":"An org was resumed","description":"The org is active again. Partner subscriptions only.","operationId":"orgResumedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.resumed"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.resumed"]},"data":{"$ref":"#/components/schemas/OrgEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.closed":{"post":{"summary":"An org was closed","description":"The org is closed for good. Partner subscriptions only.","operationId":"orgClosedEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.closed"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.closed"]},"data":{"$ref":"#/components/schemas/OrgEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.transferred_out":{"post":{"summary":"An org moved to another partner","description":"The org was transferred away from you; this is the last event you receive about it. Partner subscriptions only.","operationId":"orgTransferredOutEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.transferred_out"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.transferred_out"]},"data":{"$ref":"#/components/schemas/OrgEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.quota.warning":{"post":{"summary":"An org's plan limit is at 80%","description":"Reserved: subscribable now, not yet emitted. Partner subscriptions only.","operationId":"orgQuotaWarningEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.quota.warning"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.quota.warning"]},"data":{"$ref":"#/components/schemas/OrgQuotaEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"org.quota.exceeded":{"post":{"summary":"An org's plan limit is reached","description":"Reserved: subscribable now, not yet emitted. Partner subscriptions only.","operationId":"orgQuotaExceededEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"org.quota.exceeded"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["org.quota.exceeded"]},"data":{"$ref":"#/components/schemas/OrgQuotaEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"usage.daily_ready":{"post":{"summary":"Yesterday's usage is final","description":"Your totals across all your orgs for one UTC day, once per day, after the day's rollup. `org_id` is null. Partner subscriptions only.","operationId":"usageDailyReadyEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"usage.daily_ready"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["usage.daily_ready"]},"data":{"$ref":"#/components/schemas/UsageDailyReadyEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"webhook.disabled":{"post":{"summary":"A subscription was disabled","description":"One of your subscriptions was disabled after 20 consecutive dead deliveries. Sent to the same owner's other active subscriptions; re-enable it with `PATCH` and `status: ACTIVE`. Org and partner subscriptions.","operationId":"webhookDisabledEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"webhook.disabled"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["webhook.disabled"]},"data":{"$ref":"#/components/schemas/WebhookDisabledEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}},"webhook.test":{"post":{"summary":"A test delivery","description":"Sent by `POST …/webhook-subscriptions/{subscriptionId}/test` only. Not subscribable, not stored and not retried. Not subscribable.","operationId":"webhookTestEvent","parameters":[{"name":"X-WSS-Event","in":"header","description":"The event type, the same as the body's `type`.","required":true,"schema":{"type":"string"},"example":"webhook.test"},{"name":"X-WSS-Delivery","in":"header","description":"This delivery's id, as `GET …/deliveries` lists it. Retries and redeliveries keep it.","required":true,"schema":{"type":"string"},"example":"0192a7c4-4c00-7a77-9e88-9fa0b1c2d101"},{"name":"X-WSS-Signature","in":"header","description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body, keyed with the subscription's secret>`. Recompute it over the raw bytes and reject the delivery if it differs or `t` is more than 5 minutes old.","required":true,"schema":{"type":"string"},"example":"t=1793610000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEnvelope"},{"type":"object","properties":{"type":{"type":"string","enum":["webhook.test"]},"data":{"$ref":"#/components/schemas/WebhookTestEventData"}}}]}}},"required":true},"responses":{"2XX":{"description":"Received. Answer with any 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, then the delivery is dead; 20 dead deliveries in a row disable the subscription."}}}}}}