{"openapi":"3.1.0","info":{"title":"relay API","version":"1.0.0","description":"Send and receive WhatsApp messages on your organization's numbers from your own code: the same numbers, chats and\nmessages as the web inbox, plus outgoing webhooks for everything that happens on them.\n\n## Quickstart\n\n1. Create an API key in the dashboard (**Settings → Developers → API keys**) with the `send` scope. It is shown once.\n2. Send a message:\n\n```bash\ncurl https://api.relayhelpdesk.com/v1/messages \\\n  -H \"Authorization: Bearer rl_live_…\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"number_id\": \"num_…\", \"to\": \"+212612345678\", \"type\": \"text\", \"text\": \"Hello!\"}'\n```\n\n`202 { \"id\": \"msg_…\", \"status\": \"pending\", \"chat_id\": \"chat_…\" }` — the message is recorded and leaves WhatsApp within\nseconds; follow it with the `message.sent` and `message.status` webhooks or `GET /messages/{id}`.\n\n## Authentication and scopes\n\nSend the key as a bearer token: `Authorization: Bearer rl_live_…`. A key acts for the whole organization; we store only\nits hash. A missing, unknown, revoked or expired key answers `401 unauthorized`.\n\n| Scope | Grants |\n|---|---|\n| `read` | every `GET`: numbers, chats, messages, groups, contacts, media downloads, conversations and their notes, customers, tags, members |\n| `send` | sending, reactions, edits, revokes, chat state (archive, pin, mute, read), groups, uploads, number checks; conversation work (assign, status, snooze, priority, tags, notes, mode, handoff), customer upserts and changes, tag creation; help progress, preferences, feedback and spots |\n| `admin` | connecting, pairing, logging out and deleting numbers; webhook endpoints and the delivery log |\n\nScopes are not cumulative: give a key every scope it needs. `GET /operations/{id}` accepts any key. A call outside the\nkey's scopes answers `403 insufficient_scope`.\n\n## Conventions\n\n- **Ids** are prefixed by resource: `num_` number, `chat_` chat (and group), `msg_` message, `ct_` contact,\n  `upl_` upload, `media_` attachment, `whk_` webhook endpoint, `dlv_` delivery, `evt_` event, `op_` operation,\n  `cnv_` conversation, `cus_` customer, `mem_` member, `team_` team, `tag_` tag, `note_` note, `csat_` CSAT answer.\n  An id of another organization, malformed, or with the wrong prefix answers `404 <resource>_not_found`.\n- **Phones** are E.164 (`+212612345678`). `jid` fields are WhatsApp's own ids, given for matching only.\n- **Timestamps** are ISO 8601 in UTC. Field names are `snake_case`. Bodies are JSON (1 MB max; files go through uploads).\n\n## Pagination\n\nLists are keyset-paged: `?limit=` and `?cursor=`. Each page answers `{ data, has_more, next_cursor }`; pass\n`next_cursor` as `cursor` for the next page until it is `null`. Pages stay stable while new rows arrive. A cursor this\nlist did not issue answers `400 invalid_cursor`.\n\n## Idempotency\n\nEvery write (`POST`, `PUT`, `PATCH`, `DELETE`) requires an `Idempotency-Key` header: a unique string per logical request\n(1–150 visible ASCII characters; a UUID is ideal). Retry a failed or timed-out call with the\n**same key and the same body**: within 24 h you get the original answer (header `Idempotent-Replayed: true`) and\nnothing happens twice. The same key with a different method, path or body answers `422 idempotency_key_reused`; a retry\nwhile the first call is still running answers `409 idempotency_key_in_use`. Only successful answers are kept: after an\nerror, retrying the same key runs the request again. For sends, the key is also the message's `client_key`: a retry\nof `POST /messages` (even past 24 h) answers the same message with its current status, and queues again a message that\nfailed before it left WhatsApp. One exception: `POST /numbers/{id}/pairing-code` takes no key (its code is\nnever stored).\n\n## Long operations\n\nRequests that wait on WhatsApp (connecting or deleting a number, group commands, number checks) answer `202` with\n`{ operation_id, operation }` and a `Location` header. Poll `GET /operations/{id}` (every 1–2 s) until `status` is\n`succeeded` (read `result`) or `failed` (read `error.code`), then re-read the resource. An operation that does not\nsettle within an hour reads `failed` with `expired`.\n\n## Sending files\n\n1. `POST /media/uploads` with `mime_type` and `size_bytes` → an `upl_` id and a presigned `upload.url`.\n2. `PUT` the raw bytes to `upload.url` with exactly `upload.headers` (no Authorization header) within 15 minutes.\n3. `POST /media/uploads/{id}/finalize` → `state: ready`.\n4. `POST /messages` with `type` (`image`, `video`, `audio`, `voice` or `document`), `upload_id` and an optional\n   `text` caption, within 24 h.\n\nReceived attachments are downloaded with `GET /media/{media.id}`, which answers a signed URL valid 5 minutes.\n\n## Rate limits and quotas\n\n| Limit | Value | Answer |\n|---|---|---|\n| Burst, per key | 20 requests / second | `429 rate_limited` |\n| Sustained, per key | the plan's per-minute limit below (or the key's own) | `429 rate_limited` |\n| Per number | 30 send requests / minute (sends, reactions, edits, revokes, group commands) | `429 rate_limited` |\n| Monthly API requests, per organization | the plan's quota below; resets on the 1st (UTC) | `429 quota_exceeded` |\n| Monthly messages sent, per organization | the plan's send quota below | `429 quota_exceeded` |\n| Daily sends, per number | ramps up over a new number's first two weeks (`daily_send_cap` on the number) | `429 send_cap_reached` |\n| New conversations, per number per day | capped (people who never wrote to the number first) | `429 recipient_never_wrote` |\n\n| Plan | Requests / minute / key | API requests / month | Messages sent / month |\n|---|---|---|---|\n| Free | 30 | 100,000 | 1,000 |\n| Starter | 60 | 10,000 | 10,000 |\n| Growth | 300 | 100,000 | 60,000 |\n| Business | 1200 | 1,000,000 | 300,000 |\n\nEvery authenticated answer carries `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` (seconds) for the tightest window\nand `RateLimit-Policy`; a `429` adds `Retry-After` (seconds). An organization without a paid subscription is on the Free plan.\n\n## Responsible sending\n\nNumbers are linked as unofficial WhatsApp devices, which breaks WhatsApp's terms: WhatsApp may restrict or ban a\nnumber without notice, and automated or bulk sending is the most common trigger. There is **no bulk or broadcast\nendpoint** — one request sends one message to one conversation — and sends leave each number paced a few seconds\napart. Message people who expect it, keep volumes human, and watch `number.status` for `failed`. Connecting a number\nrequires `tos_acknowledged: true`.\n\n## Errors\n\nEvery non-2xx answer is an RFC 9457 problem (`application/problem+json`):\n\n```json\n{ \"type\": \"urn:relay:problem:number_not_working\", \"title\": \"Conflict\", \"status\": 409, \"code\": \"number_not_working\",\n  \"detail\": \"This number is not connected: sending is paused\", \"errors\": { \"field\": \"message\" } }\n```\n\nBranch on `code` (codes are never renamed or removed; new ones may appear). `errors` lists per-field messages.\n\n| Status | Codes |\n|---|---|\n| 400 | `invalid_json` · `invalid_cursor` · `idempotency_key_required` · `idempotency_key_invalid` |\n| 401 | `unauthorized` |\n| 403 | `insufficient_scope` · `sends_blocked` (sending paused for the organization) |\n| 404 | `not_found` · `number_not_found` · `chat_not_found` · `message_not_found` · `contact_not_found` · `media_not_found` · `upload_not_found` · `operation_not_found` · `webhook_endpoint_not_found` · `webhook_delivery_not_found` · `conversation_not_found` · `customer_not_found` · `member_not_found` · `team_not_found` · `tag_not_found` · `note_not_found` · `board_not_found` · `post_not_found` · `app_not_found` · `news_not_found` · `help_center_off` (the app's help center is off) · `help_item_not_found` |\n| 409 | `number_not_working` · `number_already_linked` · `number_already_logged_out` · `number_not_pairing` · `number_not_awaiting_passkey` · `session_not_ready` · `number_allowance_reached` · `message_not_sent` · `message_revoked` · `not_own_message` · `edit_window_passed` · `revoke_window_passed` · `group_left` · `webhook_endpoint_limit_reached` · `webhook_delivery_pending` · `idempotency_key_in_use` · `assignee_changed` · `team_changed` · `status_changed` · `priority_changed` · `mode_changed` · `live_conversation_exists` · `conversation_resolved` · `ai_not_enabled` · `automated_replies_not_enabled` · `automated_send_not_allowed` · `autopilot_not_enabled` · `messenger_ai_off` · `visitor_ai_cap_reached` · `tag_exists` · `too_many_tags` |\n| 413 | `payload_too_large` |\n| 422 | `validation_failed` · `invalid_phone` · `invalid_recipient` · `tos_not_acknowledged` · `unsupported_type` · `too_large` · `upload_failed` · `invalid_webhook_url` · `idempotency_key_reused` · `assignee_not_allowed` · `invalid_status` · `invalid_priority` · `invalid_mode` · `snooze_in_past` · `snooze_too_far` · `empty_body` · `body_too_long` · `invalid_attributes` · `invalid_name` · `invalid_color` · `author_not_allowed` · `post_deleted` · `post_merged` · `invalid_option` · `too_many` · `too_long` |\n| 429 | `rate_limited` · `quota_exceeded` · `send_cap_reached` · `recipient_never_wrote` |\n| 500 | `internal_error` |\n| 502 | `gateway_<reason>` (WhatsApp's side did not answer an in-request call: retry) |\n| 503 | `enqueue_failed` (saved but not queued: retry with the same Idempotency-Key) |\n\n## Your own bot\n\nRun your own bot on a number instead of relay's AI: set a conversation's mode to `bot`\n(`POST /conversations/{id}/mode`). Its customer messages keep arriving as `message.received` (each carries\n`conversation_id`), your bot replies with `POST /messages` (with `automated: true`, so a reply only leaves within 24 h of the customer's message), and `POST /conversations/{id}/handoff` hands the\ncustomer to the team: the conversation goes back to `human` mode, the routing rules pick a team and an agent, and\n`conversation.handoff` fires — the same contract relay's AI follows.\n\n## Webhooks\n\nAdd an endpoint (`POST /webhooks/endpoints`, or in the dashboard) and we `POST` events to it: `number.status` · `message.received` · `message.sent` · `message.status` · `message.reaction` · `message.edited` · `message.revoked` · `chat.updated` · `group.updated` · `group.participants` · `conversation.opened` · `conversation.assigned` · `conversation.status` · `conversation.note` · `conversation.handoff` · `csat.received` · `customer.updated` · `media.ready` · `media.failed` · `chat.merged` · `message.transcribed` · `call.missed` · `board.post.created` · `board.post.status` · `board.comment.created` · `messenger.conversation.created` · `messenger.message.created` · `news.published`.\nFilter per endpoint by event and by number; empty filters receive everything. Each event's payload is documented under\n**Webhooks** in this reference. Events describe live activity: messages imported from a number's history when it is\nlinked, or recovered after an outage, are readable through this API but are not sent as events. To catch up after an\noutage, list `GET /chats?last_message_after=…` and each chat's `GET /chats/{id}/messages?sent_after=…`.\n\nA WhatsApp call to a number is a `system` message whose `call` object moves once from `ringing` to `answered` (picked\nup on the phone), `missed` or `declined` (the number's call handling rejected it); `call.missed` reports the unanswered\nones. Calls are seen, never carried: they are answered on the phone.\n\n```json\n{ \"id\": \"evt_…\", \"event\": \"message.received\", \"created_at\": \"2026-11-11T09:12:44.120Z\", \"data\": { \"id\": \"msg_…\" } }\n```\n\n**Headers:** `X-Relay-Event` (the event), `X-Relay-Delivery` (`dlv_…`), `X-Relay-Timestamp` (unix seconds) and\n`X-Relay-Signature: v1=<hex>`. Deduplicate on the body's `id`: it stays the same across retries and redeliveries.\n\n**Verify the signature** before parsing: HMAC-SHA256 of `<X-Relay-Timestamp>.<raw body>` with the endpoint's secret\n(`whsec_…`, shown on create and rotate), compared in constant time; reject a timestamp more than\n5 minutes old.\n\n```js\nconst expected = \"v1=\" + crypto.createHmac(\"sha256\", secret).update(`${req.headers[\"x-relay-timestamp\"]}.${rawBody}`).digest(\"hex\");\nconst given = req.headers[\"x-relay-signature\"] ?? \"\";\nconst ok = given.length === expected.length && crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));\n```\n\n**Retries:** answer any 2xx within 10 s. Timeouts, network errors, 408, 429 and 5xx are\nretried with backoff (30 s, 2 min, 10 min, 30 min, 1 h, 2 h, 4 h, 6 h, 8 h, …) for 24 h; any other status is final and\nredirects are not followed. After 10 deliveries in a row end failed, the endpoint is\ndisabled: fix it, then `PATCH` it with `enabled: true`. Deliveries are at least once and may arrive out of order:\ncompare timestamps or re-read the resource before overwriting. `POST /webhooks/endpoints/{id}/test` sends a\n`webhook.test` event; the delivery log (`GET /webhooks/deliveries`) shows each attempt and redelivers any finished one."},"servers":[{"url":"https://api.relayhelpdesk.com/v1"}],"tags":[{"name":"numbers","description":"Your WhatsApp numbers: connect (QR or pairing code), status, logout, delete."},{"name":"chats","description":"Conversations of a number: list, read state, archive, pin, mute."},{"name":"messages","description":"Send, read, react to, edit and revoke messages."},{"name":"groups","description":"Create and administer WhatsApp groups."},{"name":"contacts","description":"The people your numbers talk to, and « is this phone on WhatsApp »."},{"name":"media","description":"Upload files to send, and download attachments."},{"name":"webhooks","description":"Endpoints we POST events to, and their delivery log."},{"name":"operations","description":"The handle of every long request (202 answers)."},{"name":"conversations","description":"Support episodes over a chat: owner, status, priority, tags, notes, and the handoff between your bot, relay's AI and the team."},{"name":"customers","description":"One profile per person across your numbers: custom attributes, tags, opt-out."},{"name":"tags","description":"The organization's labels for conversations and customers."},{"name":"members","description":"The organization's team, for assignment and note authorship (read-only)."},{"name":"account","description":"The calling key and the organization's usage against its plan."},{"name":"boards","description":"Feedback boards: your app's users' bugs and feature requests, their status and the team's answers."},{"name":"apps","description":"Your apps (the products your users sign in to, where the Messenger and the board run): their companies, and erasing a person your app deleted."},{"name":"news","description":"Your apps' News: the announcements their Messenger shows, readable so your own app can show them too."},{"name":"help","description":"Your apps' help centers: the published catalog your app shows, search, the screens and spots it mounts, and each person's progress, preferences and feedback."}],"security":[{"ApiKey":[]}],"paths":{"/numbers":{"get":{"operationId":"listNumbers","summary":"List numbers","description":"The organization's numbers, oldest first.\n\n**Scope:** `read`","tags":["numbers"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–200 (default 50).","type":"integer","minimum":1,"maximum":200},"description":"Page size, 1–200 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"status","schema":{"description":"Comma-separated statuses to keep (pairing, passkey, working, disconnected, failed, logged_out).","example":"working,disconnected","type":"string"},"description":"Comma-separated statuses to keep (pairing, passkey, working, disconnected, failed, logged_out)."},{"in":"query","name":"search","schema":{"description":"Matches the label or the phone digits.","type":"string","maxLength":100},"description":"Matches the label or the phone digits."}],"responses":{"200":{"description":"A page of numbers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"connectNumber","summary":"Connect a new number","description":"Adds a number in `pairing` and starts its WhatsApp session in the background. Poll the operation; once it succeeds, show `GET /numbers/{id}/pairing`'s QR code to the phone's owner (WhatsApp → Linked devices → Link a device), or request a pairing code. **Terms of Service:** linking a number this way is an unofficial WhatsApp device and breaks WhatsApp's terms; WhatsApp may restrict or ban the number without notice — `tos_acknowledged: true` records that you were told. Refused with `number_allowance_reached` when every number of the plan is in use.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tos_acknowledged":{"type":"boolean","description":"Must be `true`: you acknowledge that this links the number as an unofficial WhatsApp device, which breaks WhatsApp's terms — WhatsApp may restrict or ban the number without notice, and automated sending is the most common trigger."},"label":{"description":"Your name for the number (max 60 characters).","type":"string","maxLength":60}},"required":["tos_acknowledged"],"additionalProperties":false}}}},"responses":{"202":{"description":"The number is recorded and its session is starting","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberConnectAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/numbers/{id}":{"get":{"operationId":"getNumber","summary":"Get a number","description":"One number with its status, send capacity and history import progress.\n\n**Scope:** `read`","tags":["numbers"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number id (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number id (`num_…`)."}],"responses":{"200":{"description":"The number","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"delete":{"operationId":"deleteNumber","summary":"Delete a number","description":"The number reads as gone at once; in the background its WhatsApp session is removed and its chats, messages, contacts and media are deleted. This cannot be undone.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number to delete (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number to delete (`num_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The deletion is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/numbers/{id}/connect":{"post":{"operationId":"relinkNumber","summary":"Link a number again","description":"Starts a new pairing for a number that is `failed`, `logged_out` or still pairing. We never re-pair a number on our own: a ban is not lifted by linking again. Refused with `number_already_linked` for a working or reconnecting number. Same Terms-of-Service acknowledgement as a new connect.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number to link again (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number to link again (`num_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tos_acknowledged":{"type":"boolean","description":"Must be `true`: you acknowledge that this links the number as an unofficial WhatsApp device, which breaks WhatsApp's terms — WhatsApp may restrict or ban the number without notice, and automated sending is the most common trigger."},"label":{"description":"Your name for the number (max 60 characters).","type":"string","maxLength":60}},"required":["tos_acknowledged"],"additionalProperties":false}}}},"responses":{"202":{"description":"The number is back in pairing and its session is starting","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberConnectAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/numbers/{id}/pairing":{"get":{"operationId":"getNumberPairing","summary":"Get the pairing QR code","description":"The live QR code (status `pairing`) or passkey code (status `passkey`) of a number being linked. Poll every 2–5 s until `status` is `working`. Any other status answers with `qr` and `passkey_code` null.\n\n**Scope:** `admin`","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number being linked (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number being linked (`num_…`)."}],"responses":{"200":{"description":"The pairing state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberPairing"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/numbers/{id}/pairing-code":{"post":{"operationId":"requestNumberPairingCode","summary":"Request a pairing code","description":"Links with a phone number instead of a QR scan: answers an 8-character code to type on the phone. Only while the number is `pairing` and its session is placed (`session_not_ready` otherwise: retry in a moment). This endpoint takes no `Idempotency-Key`: its code is never stored, a retry asks for a new one.\n\n**Scope:** `admin`","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number being linked (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number being linked (`num_…`)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":3,"maxLength":32,"description":"The phone being linked, in international format.","example":"+212612345678"}},"required":["phone"],"additionalProperties":false}}}},"responses":{"200":{"description":"The pairing code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberPairingCode"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/numbers/{id}/passkey/confirm":{"post":{"operationId":"confirmNumberPasskey","summary":"Confirm the passkey","description":"Confirms that the code on the phone matches `passkey_code` (status `passkey`); the link then completes by itself — poll `GET /numbers/{id}` until `working`.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number waiting for a passkey confirmation (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number waiting for a passkey confirmation (`num_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"Confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberPasskeyConfirmed"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/numbers/{id}/logout":{"post":{"operationId":"logoutNumber","summary":"Log a number out","description":"Unlinks the device from the phone in the background; the number becomes `logged_out` and its chats and messages stay until the plan's retention purges them. Link it again with `POST /numbers/{id}/connect`.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["numbers"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The number to unlink (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number to unlink (`num_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The logout is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats":{"get":{"operationId":"listChats","summary":"List chats","description":"Newest activity first (pinned: most recently pinned first), keyset-paged. A chat appears once it holds a message.\n\n**Scope:** `read`","tags":["chats"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":30,"description":"Page size, 1–100 (default 30).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 30)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"number_id","schema":{"type":"string","description":"One number's chats; omitted = every number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"view","schema":{"default":"all","description":"all (not archived) · unread · groups · archived · pinned (most recently pinned first).","type":"string","enum":["all","unread","groups","archived","pinned"]},"description":"all (not archived) · unread · groups · archived · pinned (most recently pinned first)."},{"in":"query","name":"search","schema":{"description":"Matches the chat's name, its contact's names or its phone digits.","type":"string","maxLength":100},"description":"Matches the chat's name, its contact's names or its phone digits."},{"in":"query","name":"last_message_after","schema":{"description":"Only chats whose last message is newer than this time (ISO 8601): reconcile after an outage, a disabled webhook endpoint or a reconnect.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Only chats whose last message is newer than this time (ISO 8601): reconcile after an outage, a disabled webhook endpoint or a reconnect."}],"responses":{"200":{"description":"A page of chats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/chats/{id}":{"get":{"operationId":"getChat","summary":"Get a chat","description":"One conversation with its unread count and inbox state. Its messages: `GET /chats/{id}/messages`.\n\n**Scope:** `read`","tags":["chats"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."}],"responses":{"200":{"description":"The chat","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/chats/{id}/archive":{"post":{"operationId":"archiveChat","summary":"Archive a chat","description":"Moves the chat out of the main list (view `archived`). Inbox state only: nothing is sent to WhatsApp. Archiving an archived chat changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/unarchive":{"post":{"operationId":"unarchiveChat","summary":"Unarchive a chat","description":"Brings the chat back to the main list. Inbox state only.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/pin":{"post":{"operationId":"pinChat","summary":"Pin a chat","description":"Pins the chat (view `pinned`). Inbox state only.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/unpin":{"post":{"operationId":"unpinChat","summary":"Unpin a chat","description":"Unpins the chat. Inbox state only.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/mute":{"post":{"operationId":"muteChat","summary":"Mute a chat","description":"Silences the chat's notifications until `until`, or always. Inbox state only.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"until":{"description":"Mute until this instant (ISO 8601); omitted = always.","example":"2026-12-01T08:00:00Z","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/unmute":{"post":{"operationId":"unmuteChat","summary":"Unmute a chat","description":"Turns the chat's notifications back on. Inbox state only.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/read":{"post":{"operationId":"markChatRead","summary":"Mark a chat read","description":"Clears the unread count and sends WhatsApp read receipts for the chat's unread messages (in the background, coalesced). A chat with nothing unread changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["chats"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The chat after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/chats/{id}/messages":{"get":{"operationId":"listChatMessages","summary":"List a chat's messages","description":"Newest first, keyset-paged: pass `next_cursor` back as `cursor` to read older messages. Pages stay stable while new messages arrive.\n\n**Scope:** `read`","tags":["messages"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation (`chat_…`)."},{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–100 (default 50).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"sent_after","schema":{"description":"Only messages sent after this time (ISO 8601), still newest first: walk the pages until `has_more` is false to catch up a chat.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"description":"Only messages sent after this time (ISO 8601), still newest first: walk the pages until `has_more` is false to catch up a chat."}],"responses":{"200":{"description":"A page of messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/messages/{id}":{"get":{"operationId":"getMessage","summary":"Get a message","description":"One message with its current status, sender and attachment. Download the attachment with `GET /media/{media.id}`.\n\n**Scope:** `read`","tags":["messages"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The message id (`msg_…`)."}],"responses":{"200":{"description":"The message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/messages":{"post":{"operationId":"sendMessage","summary":"Send a message","description":"Records the message `pending` under your `Idempotency-Key` and queues it; it leaves WhatsApp paced per number (a few seconds apart). Address an existing conversation with `chat_id`, or a phone with `number_id` + `to`. Media: upload the file first (`POST /media/uploads`), then pass its `upload_id`. A retry with the same key and body answers the same message with its current status and never sends twice (a message that failed before leaving WhatsApp is queued again). There is no bulk or broadcast endpoint: one request sends one message to one conversation.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["messages"],"x-relay-scope":"send","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number_id":{"type":"string","description":"With `to`: the number that sends (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"to":{"description":"With `number_id`: the recipient's phone in international format. Opens the conversation if needed.","example":"+212612345678","type":"string","minLength":3,"maxLength":32},"chat_id":{"type":"string","description":"Instead of `number_id` + `to`: an existing conversation (direct or group) (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"type":{"type":"string","enum":["text","image","video","audio","voice","document"],"description":"`text`, or the kind of the uploaded file: `image` / `video` / `audio` are read from its type, any other file is a `document`; `voice` sends an audio file as a voice note."},"text":{"description":"The text (required for `text`), or the caption of a media message.","type":"string","maxLength":65536},"upload_id":{"type":"string","description":"A finalized upload (`POST /media/uploads` → PUT → finalize); required for media types (`upl_…`).","example":"upl_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"reply_to":{"type":"string","description":"A sent message of the same chat to quote (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"mentions":{"description":"Phones (international format) to mention in a group; put `@<digits>` in `text` where each should appear.","maxItems":50,"type":"array","items":{"type":"string","maxLength":32}},"automated":{"description":"`true` for a message nobody pressed send on (your bot or autopilot): it is recorded with `source` `api_automated` and only leaves as a reply in a 1:1 chat whose customer wrote within the last 24 hours, once per customer message; otherwise `409 automated_send_not_allowed`. Leave it out for messages a person writes.","type":"boolean"}},"required":["type"],"additionalProperties":false}}}},"responses":{"202":{"description":"The message is recorded and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/messages/{id}/react":{"post":{"operationId":"reactToMessage","summary":"React to a message","description":"Sets our number's reaction on a sent or received message (one per message: a new emoji replaces it, an empty one removes it). Queued, then confirmed by the `message.reaction` webhook.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["messages"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The message id (`msg_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emoji":{"type":"string","maxLength":16,"description":"One emoji; an empty string removes our reaction.","example":"👍"}},"required":["emoji"],"additionalProperties":false}}}},"responses":{"202":{"description":"The action is queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageActionAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/messages/{id}/edit":{"post":{"operationId":"editMessage","summary":"Edit a message","description":"Replaces the text (or caption) of one of our own sent messages, within 15 minutes of sending (`edit_window_passed` after). Queued; the message changes once WhatsApp confirms (`message.edited` webhook).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["messages"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The message id (`msg_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":65536,"description":"The new text."}},"required":["text"],"additionalProperties":false}}}},"responses":{"202":{"description":"The action is queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageActionAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/messages/{id}/revoke":{"post":{"operationId":"revokeMessage","summary":"Delete a message for everyone","description":"Deletes one of our own sent messages for everyone, within about 60 hours of sending (`revoke_window_passed` after). Queued; the message changes once WhatsApp confirms (`message.revoked` webhook).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["messages"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The message id (`msg_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The action is queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageActionAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups":{"post":{"operationId":"createGroup","summary":"Create a group","description":"Creates a WhatsApp group from one of your numbers with the given participants, in the background. On success the operation's `result.chat_id` is the new group's chat id.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":32},"description":"1 to 50 phones in international format.","example":["+212612345678"]},"number_id":{"type":"string","description":"The number that creates the group (it becomes its admin) (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"subject":{"type":"string","minLength":1,"maxLength":100,"description":"The group name (1–100 characters)."}},"required":["participants","number_id","subject"],"additionalProperties":false}}}},"responses":{"202":{"description":"The group is being created","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}":{"get":{"operationId":"getGroup","summary":"Get a group","description":"The group's subject, settings and participants as last synced from WhatsApp. A direct chat's id answers 404 `chat_not_found`.\n\n**Scope:** `read`","tags":["groups"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."}],"responses":{"200":{"description":"The group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"updateGroup","summary":"Update a group","description":"Changes the subject, description, picture and / or settings. Send only what changes: each field is its own WhatsApp command and answers its own operation. Our number must be an admin.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"description":"The new group name.","type":"string","minLength":1,"maxLength":100},"description":{"description":"The new description (empty clears it).","type":"string","maxLength":2048},"upload_id":{"type":"string","description":"A finalized image upload for the group picture (`upl_…`).","example":"upl_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"only_admins_send":{"description":"Only admins can send messages.","type":"boolean"},"only_admins_edit":{"description":"Only admins can edit the group's info.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"202":{"description":"The changes are running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupUpdateAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/participants/add":{"post":{"operationId":"addGroupParticipants","summary":"Add participants","description":"Adds people to the group by phone. Our number must be an admin. The operation's `result.results` lists each participant's outcome (`ok`, `error_code`).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":32},"description":"1 to 50 phones in international format.","example":["+212612345678"]}},"required":["participants"],"additionalProperties":false}}}},"responses":{"202":{"description":"The change is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/participants/remove":{"post":{"operationId":"removeGroupParticipants","summary":"Remove participants","description":"Removes people from the group. Our number must be an admin. The operation's `result.results` lists each participant's outcome (`ok`, `error_code`).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":128},"description":"1 to 50 current participants: a phone in international format, or the participant's `jid` from `GET /groups/{id}` (the only way to name one WhatsApp shows without a phone).","example":["+212612345678"]}},"required":["participants"],"additionalProperties":false}}}},"responses":{"202":{"description":"The change is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/participants/promote":{"post":{"operationId":"promoteGroupParticipants","summary":"Promote participants","description":"Makes participants group admins. Our number must be an admin. The operation's `result.results` lists each participant's outcome (`ok`, `error_code`).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":128},"description":"1 to 50 current participants: a phone in international format, or the participant's `jid` from `GET /groups/{id}` (the only way to name one WhatsApp shows without a phone).","example":["+212612345678"]}},"required":["participants"],"additionalProperties":false}}}},"responses":{"202":{"description":"The change is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/participants/demote":{"post":{"operationId":"demoteGroupParticipants","summary":"Demote participants","description":"Removes participants' admin rights. Our number must be an admin. The operation's `result.results` lists each participant's outcome (`ok`, `error_code`).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","maxLength":128},"description":"1 to 50 current participants: a phone in international format, or the participant's `jid` from `GET /groups/{id}` (the only way to name one WhatsApp shows without a phone).","example":["+212612345678"]}},"required":["participants"],"additionalProperties":false}}}},"responses":{"202":{"description":"The change is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/invite-link":{"post":{"operationId":"getGroupInviteLink","summary":"Get the invite link","description":"Asks WhatsApp for the group's invite link (our number must be an admin); the operation's `result.invite_link` carries it.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The command is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/invite-link/revoke":{"post":{"operationId":"revokeGroupInviteLink","summary":"Revoke the invite link","description":"Invalidates the current invite link; the operation's `result.invite_link` carries the new one.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The command is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/groups/{id}/leave":{"post":{"operationId":"leaveGroup","summary":"Leave a group","description":"Our number leaves the group; its history stays readable (the group's `left_at` is set).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["groups"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The group's chat id (`chat_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The command is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/contacts":{"get":{"operationId":"listContacts","summary":"List contacts","description":"One number's contacts, newest first, keyset-paged.\n\n**Scope:** `read`","tags":["contacts"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–200 (default 50).","type":"integer","minimum":1,"maximum":200},"description":"Page size, 1–200 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"number_id","schema":{"type":"string","description":"The number whose contacts to list (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The number whose contacts to list (`num_…`)."},{"in":"query","name":"search","schema":{"description":"Matches a name or the phone digits.","type":"string","maxLength":100},"description":"Matches a name or the phone digits."}],"responses":{"200":{"description":"A page of contacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/contacts/check":{"post":{"operationId":"checkWhatsAppNumber","summary":"Check a phone is on WhatsApp","description":"Asks WhatsApp, through one of your working numbers, whether a phone has an account. The operation's `result` is `{ phone, on_whatsapp }`. One phone per request: checking lists of numbers is not supported.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["contacts"],"x-relay-scope":"send","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":3,"maxLength":32,"description":"The phone to check, in international format.","example":"+212612345678"},"number_id":{"type":"string","description":"The working number that asks WhatsApp; omitted = the organization's oldest working number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"required":["phone"],"additionalProperties":false}}}},"responses":{"202":{"description":"The check is running","headers":{"Location":{"required":true,"description":"The operation to poll: `/v1/operations/{id}`.","schema":{"type":"string","description":"The operation to poll: `/v1/operations/{id}`."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/contacts/{id}":{"get":{"operationId":"getContact","summary":"Get a contact","description":"One contact with its names and phone.\n\n**Scope:** `read`","tags":["contacts"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The contact id (`ct_…`).","example":"ct_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The contact id (`ct_…`)."}],"responses":{"200":{"description":"The contact","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/media/uploads":{"post":{"operationId":"createMediaUpload","summary":"Create an upload slot","description":"Step 1 of sending a file: answers a presigned URL. Step 2: `PUT` the bytes to `upload.url` with `upload.headers`. Step 3: `POST /media/uploads/{id}/finalize`. Then send it: `POST /messages` with `upload_id`. Files never travel through this API. Refused with `unsupported_type` or `too_large` per WhatsApp's limits.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["media"],"x-relay-scope":"send","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mime_type":{"type":"string","minLength":1,"maxLength":255,"description":"The file's type, e.g. image/jpeg, video/mp4, audio/ogg, application/pdf.","example":"image/jpeg"},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The exact size in bytes (images ≤ 16 MB, video ≤ 64 MB, audio ≤ 16 MB, documents ≤ 100 MB)."},"file_name":{"description":"Shown to the recipient for documents.","type":"string","maxLength":255},"kind":{"description":"How the file will be sent, when its type alone doesn't say (voice, sticker): the size limit follows the kind.","type":"string","enum":["image","video","audio","voice","document","sticker"]}},"required":["mime_type","size_bytes"],"additionalProperties":false}}}},"responses":{"201":{"description":"The upload slot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUploadSlot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/media/uploads/{id}/finalize":{"post":{"operationId":"finalizeMediaUpload","summary":"Finalize an upload","description":"Step 3: checks the stored file against the declared type and size and marks the upload `ready`; pass its `id` as `upload_id` to `POST /messages` within 24 h. A finalized upload answers as it is. `upload_failed` = the PUT did not reach storage (upload again).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["media"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The upload id (`upl_…`).","example":"upl_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The upload id (`upl_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The upload, ready to send","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUpload"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/media/{id}":{"get":{"operationId":"getMediaDownload","summary":"Get a download URL","description":"Answers a short-lived signed URL for a message's attachment, issued per request. 404 `media_not_found` while it is not stored yet (`media.state` pending), once expired by retention, or when its message was deleted for everyone.\n\n**Scope:** `read`","tags":["media"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"A message attachment id (`media.id` on a message) (`media_…`).","example":"media_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"A message attachment id (`media.id` on a message) (`media_…`)."},{"in":"query","name":"download","schema":{"description":"`true` makes the URL download the file under its name (Content-Disposition: attachment) instead of displaying it.","type":"string","enum":["true","false"]},"description":"`true` makes the URL download the file under its name (Content-Disposition: attachment) instead of displaying it."}],"responses":{"200":{"description":"The signed download","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaDownload"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/webhooks/endpoints":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","description":"The organization's endpoints, oldest first (at most 20 exist). Secrets are never listed.\n\n**Scope:** `admin`","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"query","name":"limit","schema":{"default":20,"description":"Page size, 1–100 (default 20).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 20)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."}],"responses":{"200":{"description":"A page of endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"createWebhookEndpoint","summary":"Add a webhook endpoint","description":"Registers a URL to receive events. The answer carries the signing `secret` — store it now, it is not shown again (a retry with the same Idempotency-Key within 24 h answers it again). At most 20 endpoints (`webhook_endpoint_limit_reached`).\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"An https:// URL on the public internet (private, loopback and cluster-internal hosts are refused with `invalid_webhook_url`).","example":"https://example.com/hooks/relay"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"description":"The events to receive; empty or omitted = every event.","maxItems":28,"type":"array","items":{"type":"string","enum":["number.status","message.received","message.sent","message.status","message.reaction","message.edited","message.revoked","chat.updated","group.updated","group.participants","conversation.opened","conversation.assigned","conversation.status","conversation.note","conversation.handoff","csat.received","customer.updated","media.ready","media.failed","chat.merged","message.transcribed","call.missed","board.post.created","board.post.status","board.comment.created","messenger.conversation.created","messenger.message.created","news.published"]}},"number_ids":{"description":"Only these numbers' events; empty or omitted = every number.","maxItems":200,"type":"array","items":{"type":"string","description":"A number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"The endpoint and its signing secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/webhooks/endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","summary":"Get a webhook endpoint","description":"One endpoint and its health. The secret is never answered here: rotate it to get a new one.\n\n**Scope:** `admin`","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The endpoint id (`whk_…`)."}],"responses":{"200":{"description":"The endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"updateWebhookEndpoint","summary":"Update a webhook endpoint","description":"Changes only the fields sent. Re-enable an auto-disabled endpoint with `enabled: true` once it answers again.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The endpoint id (`whk_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"description":"An https:// URL on the public internet (private, loopback and cluster-internal hosts are refused with `invalid_webhook_url`).","example":"https://example.com/hooks/relay"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"description":"The events to receive; empty or omitted = every event.","maxItems":28,"type":"array","items":{"type":"string","enum":["number.status","message.received","message.sent","message.status","message.reaction","message.edited","message.revoked","chat.updated","group.updated","group.participants","conversation.opened","conversation.assigned","conversation.status","conversation.note","conversation.handoff","csat.received","customer.updated","media.ready","media.failed","chat.merged","message.transcribed","call.missed","board.post.created","board.post.status","board.comment.created","messenger.conversation.created","messenger.message.created","news.published"]}},"number_ids":{"description":"Only these numbers' events; empty or omitted = every number.","maxItems":200,"type":"array","items":{"type":"string","description":"A number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"enabled":{"description":"true re-enables an endpoint disabled by hand or by failures (its failure count resets); false disables it.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The endpoint after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"operationId":"deleteWebhookEndpoint","summary":"Delete a webhook endpoint","description":"Removes the endpoint and its delivery log; pending retries stop.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The endpoint id (`whk_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointDeleted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/webhooks/endpoints/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","summary":"Rotate the signing secret","description":"Replaces the endpoint's signing secret at once and answers the new one (shown this once). Deliveries signed from now on use it, retries of older events included.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The endpoint id (`whk_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The endpoint and its new secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/webhooks/endpoints/{id}/test":{"post":{"operationId":"testWebhookEndpoint","summary":"Send a test event","description":"Queues a signed `webhook.test` event to this endpoint, whatever events and numbers it listens to (even disabled). Follow it in the delivery log.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The endpoint id (`whk_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The test delivery is queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/webhooks/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"List deliveries","description":"The delivery log, newest first, keyset-paged. Read one delivery for the exact body sent.\n\n**Scope:** `admin`","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–100 (default 50).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"endpoint_id","schema":{"type":"string","description":"One endpoint's deliveries (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","succeeded","failed"]}},{"in":"query","name":"event","schema":{"description":"One event name, e.g. `message.received`.","type":"string","maxLength":64},"description":"One event name, e.g. `message.received`."}],"responses":{"200":{"description":"A page of deliveries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/webhooks/deliveries/{id}":{"get":{"operationId":"getWebhookDelivery","summary":"Get a delivery","description":"One delivery with the exact body POSTed and your endpoint's last answer.\n\n**Scope:** `admin`","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The delivery id (`dlv_…`).","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`)."}],"responses":{"200":{"description":"The delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/webhooks/deliveries/{id}/redeliver":{"post":{"operationId":"redeliverWebhook","summary":"Redeliver an event","description":"Sends a finished delivery again with the same body and the same `id` (your dedup key), opening a fresh 24 h retry window. Refused with `webhook_delivery_pending` while it is still being attempted.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["webhooks"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The delivery id (`dlv_…`).","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"202":{"description":"The delivery is queued again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/operations/{id}":{"get":{"operationId":"getOperation","summary":"Get an operation","description":"Poll a long request's progress: every endpoint answering 202 returns `operation_id` and a `Location` header here. Poll every 1–2 s until `status` is `succeeded` or `failed`, then re-read the resource it changed.\n\n**Scope:** any key","tags":["operations"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The operation id from a 202 answer (`op_…`).","example":"op_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The operation id from a 202 answer (`op_…`)."}],"responses":{"200":{"description":"The operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/conversations":{"get":{"operationId":"listConversations","summary":"List conversations","description":"Newest opened first, keyset-paged, every status unless filtered.\n\n**Scope:** `read`","tags":["conversations"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":30,"description":"Page size, 1–100 (default 30).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 30)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"status","schema":{"description":"Only this status; omitted = every status.","type":"string","enum":["open","pending","snoozed","resolved"]},"description":"Only this status; omitted = every status."},{"in":"query","name":"number_id","schema":{"type":"string","description":"Only this number's conversations (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"assignee_id","schema":{"description":"A member id (`mem_…`), or `none` for unassigned conversations.","type":"string","maxLength":64},"description":"A member id (`mem_…`), or `none` for unassigned conversations."},{"in":"query","name":"team_id","schema":{"type":"string","description":"Only this team's conversations (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"tag_id","schema":{"type":"string","description":"Only conversations carrying this tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"customer_id","schema":{"type":"string","description":"Only this customer's conversations (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"chat_id","schema":{"type":"string","description":"Only this chat's episodes (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"mode","schema":{"type":"string","enum":["human","ai","bot"]}},{"in":"query","name":"priority","schema":{"type":"string","enum":["low","normal","high","urgent"]}},{"in":"query","name":"waiting","schema":{"description":"true = only conversations whose customer waits on a reply.","type":"string","enum":["true","false"]},"description":"true = only conversations whose customer waits on a reply."}],"responses":{"200":{"description":"A page of conversations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/conversations/{id}":{"get":{"operationId":"getConversation","summary":"Get a conversation","description":"Its status, owner, tags and response clock. Its messages: `GET /chats/{chat_id}/messages` (each carries `conversation_id`); its notes: `GET /conversations/{id}/notes`.\n\n**Scope:** `read`","tags":["conversations"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."}],"responses":{"200":{"description":"The conversation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/conversations/{id}/assign":{"post":{"operationId":"assignConversation","summary":"Assign a conversation","description":"Sets the team, then the assignee (either may be null to clear it); a team change stands even when the assignee is then refused. The member must reach the conversation's number (`assignee_not_allowed`). The new assignee is notified and `conversation.assigned` fires. Assigning the current assignee changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assignee_id":{"anyOf":[{"type":"string","description":"The member to assign; null unassigns (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","description":"The team to hand it to; null clears the team (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/status":{"post":{"operationId":"setConversationStatus","summary":"Set a conversation's status","description":"open · pending · snoozed · resolved. Resolving may send the CSAT question; setting a resolved conversation back to open reopens it (`live_conversation_exists` when the chat has a newer open one). `conversation.status` fires. Setting the current status changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","pending","snoozed","resolved"]},"snoozed_until":{"description":"With `snoozed`: when it wakes up, an ISO 8601 instant at most 90 days ahead.","type":"string","maxLength":40}},"required":["status"],"additionalProperties":false}}}},"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/snooze":{"post":{"operationId":"snoozeConversation","summary":"Snooze a conversation","description":"Sets it aside until `until` (`snooze_in_past`, `snooze_too_far`); a customer message wakes it earlier. `conversation.status` fires.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"until":{"type":"string","maxLength":40,"description":"When it wakes up: an ISO 8601 instant in the future, at most 90 days ahead."}},"required":["until"],"additionalProperties":false}}}},"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/priority":{"post":{"operationId":"setConversationPriority","summary":"Set a conversation's priority","description":"low · normal · high · urgent; the SLA targets follow the new priority.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priority":{"type":"string","enum":["low","normal","high","urgent"]}},"required":["priority"],"additionalProperties":false}}}},"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/mode":{"post":{"operationId":"setConversationMode","summary":"Hand a conversation to the AI, your bot or a human","description":"`ai` hands it to relay's AI agent (the organization's AI on, and the number on autopilot after its automated-replies opt-in: `ai_not_enabled`, `automated_replies_not_enabled`, `autopilot_not_enabled`; a Messenger conversation needs its app's Messenger to let the AI answer the person: `messenger_ai_off`, `visitor_ai_cap_reached`, `sends_blocked`). `bot` hands it to your own bot: its customer messages keep arriving as `message.received`, you reply with `POST /messages` and hand back with `POST /conversations/{id}/handoff`. `human` is that handoff. A resolved conversation keeps its mode (`conversation_resolved`).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["human","ai","bot"]}},"required":["mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/handoff":{"post":{"operationId":"handoffConversation","summary":"Hand a conversation to the team","description":"The handoff contract relay's own AI uses: your bot (or the AI) lets go, the conversation goes to `human` mode, the routing rules pick a team and an agent, the team is notified and `conversation.handoff` fires. A conversation already with humans changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The conversation after the handoff","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/tags":{"post":{"operationId":"tagConversation","summary":"Tag a conversation","description":"Adds one of the organization's tags; adding a tag it already carries changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tag_id":{"type":"string","description":"The tag to add (`POST /tags` creates one) (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"required":["tag_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/tags/{tag_id}":{"delete":{"operationId":"untagConversation","summary":"Remove a tag from a conversation","description":"Removing a tag it does not carry changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"path","name":"tag_id","schema":{"type":"string","description":"The tag to remove (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The tag to remove (`tag_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The conversation after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/conversations/{id}/notes":{"get":{"operationId":"listConversationNotes","summary":"List a conversation's notes","description":"The team's private notes on this conversation, oldest first, in one page.\n\n**Scope:** `read`","tags":["conversations"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."}],"responses":{"200":{"description":"The notes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNoteList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"createConversationNote","summary":"Add a note to a conversation","description":"A private note of the team, never sent to WhatsApp, written as one of the organization's members, who must reach the conversation's number (`author_not_allowed`). Mentioned members who can see the conversation are notified; `conversation.note` fires.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["conversations"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The conversation id (`cnv_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"author_id":{"type":"string","description":"The member the note is written as (`GET /members`) (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"body":{"type":"string","minLength":1,"maxLength":10000,"description":"The note; mention a member with a `<@mem_…>` token."},"mentioned_member_ids":{"maxItems":20,"type":"array","items":{"type":"string","description":"A member to mention (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}}},"required":["author_id","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"The note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationNote"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers":{"get":{"operationId":"listCustomers","summary":"List customers","description":"Most recently active first (never-active customers last), keyset-paged.\n\n**Scope:** `read`","tags":["customers"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–100 (default 50).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"search","schema":{"description":"Matches the name, the e-mail or the phone digits.","type":"string","maxLength":100},"description":"Matches the name, the e-mail or the phone digits."},{"in":"query","name":"tag_id","schema":{"type":"string","description":"Only customers carrying this tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},{"in":"query","name":"lifecycle_stage","schema":{"type":"string","enum":["lead","customer"]}},{"in":"query","name":"blocked","schema":{"type":"string","enum":["true","false"]}},{"in":"query","name":"opted_out","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"A page of customers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"upsertCustomer","summary":"Create or update a customer by phone","description":"Finds the organization's customer with this phone, or creates one. A known customer takes only the fields given (tags are added, never removed). `customer.updated` fires. Answers 201 when created, 200 when updated.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":3,"maxLength":32,"description":"International format (E.164, `+212…`): the key of the upsert."},"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"language":{"description":"ISO 639-1.","anyOf":[{"type":"string","maxLength":2},{"type":"null"}]},"lifecycle_stage":{"type":"string","enum":["lead","customer"]},"attributes":{"description":"Custom attribute values by key; null clears one.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"tag_ids":{"maxItems":50,"type":"array","items":{"type":"string","description":"A tag to add (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}}},"required":["phone"],"additionalProperties":false}}}},"responses":{"200":{"description":"The updated customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"201":{"description":"The created customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers/{id}":{"get":{"operationId":"getCustomer","summary":"Get a customer","description":"The profile, custom attributes, tags and the person's contact on each number. Their conversations: `GET /conversations?customer_id=…`.\n\n**Scope:** `read`","tags":["customers"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."}],"responses":{"200":{"description":"The customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"updateCustomer","summary":"Update a customer's profile","description":"Only the fields given change; null clears a name, an e-mail or a language. Custom attributes: `PATCH /customers/{id}/attributes`. `customer.updated` fires.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"language":{"description":"ISO 639-1.","anyOf":[{"type":"string","maxLength":2},{"type":"null"}]},"lifecycle_stage":{"type":"string","enum":["lead","customer"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The customer after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers/{id}/attributes":{"patch":{"operationId":"setCustomerAttributes","summary":"Set a customer's custom attributes","description":"Each value is checked against its attribute's type: text, number, date (YYYY-MM-DD), select (one of its options) or boolean. A refusal lists the keys as `key:code` in `errors.attributes`. `customer.updated` fires.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"description":"Values by attribute key (defined in the app's settings); keys left out keep their value, null clears one."}},"required":["attributes"],"additionalProperties":false}}}},"responses":{"200":{"description":"The customer after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers/{id}/tags":{"post":{"operationId":"tagCustomer","summary":"Tag a customer","description":"Adds the organization's tags to the customer (a VIP tag is just a tag named VIP); tags it already carries are kept.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tag_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","description":"A tag to add (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}}},"required":["tag_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"The customer after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers/{id}/tags/{tag_id}":{"delete":{"operationId":"untagCustomer","summary":"Remove a tag from a customer","description":"Removing a tag the customer does not carry changes nothing.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."},{"in":"path","name":"tag_id","schema":{"type":"string","description":"The tag to remove (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The tag to remove (`tag_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The customer after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers/{id}/opt-out":{"post":{"operationId":"optOutCustomer","summary":"Record a customer's marketing opt-out","description":"Stamps `opted_out_at` for your own records; replies inside a conversation the customer started are not marketing and still go. Opting out twice changes nothing. `customer.updated` fires.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The customer after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/customers/{id}/opt-in":{"post":{"operationId":"optInCustomer","summary":"Clear a customer's marketing opt-out","description":"Clears `opted_out_at`. `customer.updated` fires when it was set.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["customers"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The customer id (`cus_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"The customer after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/tags":{"get":{"operationId":"listTags","summary":"List tags","description":"The organization's tags, newest first (at most 500 exist).\n\n**Scope:** `read`","tags":["tags"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":100,"description":"Page size, 1–500 (default 100).","type":"integer","minimum":1,"maximum":500},"description":"Page size, 1–500 (default 100)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."}],"responses":{"200":{"description":"A page of tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"createTag","summary":"Create a tag","description":"Names are unique per organization, case-insensitive (`tag_exists`); at most 500 tags (`too_many_tags`).\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["tags"],"x-relay-scope":"send","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40},"color":{"description":"#rrggbb.","anyOf":[{"type":"string","maxLength":7},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"The tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/members":{"get":{"operationId":"listMembers","summary":"List members","description":"The organization's team, oldest first: the ids to assign conversations to and to write notes as. Read-only.\n\n**Scope:** `read`","tags":["members"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":100,"description":"Page size, 1–200 (default 100).","type":"integer","minimum":1,"maximum":200},"description":"Page size, 1–200 (default 100)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."}],"responses":{"200":{"description":"A page of members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/key":{"get":{"operationId":"getApiKey","summary":"Get the calling key","description":"The key in the `Authorization` header: its scopes, expiry, organization and plan. Use it to check a key someone pasted into your product before you rely on it.\n\n**Scope:** any key","tags":["account"],"responses":{"200":{"description":"The calling key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInfo"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/usage":{"get":{"operationId":"getUsage","summary":"Get usage","description":"This month's API requests and messages sent against the plan, and each live number's sends today against its daily cap and its first-contact cap. Counts settle within seconds.\n\n**Scope:** `read`","tags":["account"],"x-relay-scope":"read","responses":{"200":{"description":"The organization's usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/boards":{"get":{"operationId":"listBoards","summary":"List boards","description":"The organization's feedback boards, newest first.\n\n**Scope:** `read`","tags":["boards"],"x-relay-scope":"read","parameters":[{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–100 (default 50).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."}],"responses":{"200":{"description":"A page of boards","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/boards/{id}/posts":{"get":{"operationId":"listBoardPosts","summary":"List a board's posts","description":"Newest first; merged and deleted posts are left out.\n\n**Scope:** `read`","tags":["boards"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The board (`brd_…`).","example":"brd_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The board (`brd_…`)."},{"in":"query","name":"limit","schema":{"default":50,"description":"Page size, 1–100 (default 50).","type":"integer","minimum":1,"maximum":100},"description":"Page size, 1–100 (default 50)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"status","schema":{"description":"Only posts in this status.","type":"string","enum":["under_review","planned","in_progress","completed","closed"]},"description":"Only posts in this status."}],"responses":{"200":{"description":"A page of posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardPostList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/boards/{id}/users/{subject}":{"delete":{"operationId":"eraseBoardUser","summary":"Erase a person from a board","description":"For a user your app deleted: the same as `DELETE /apps/{id}/users/{subject}` on the board's app (their posts' and comments' words wiped, their votes removed, their Messenger conversations deleted). Posts keep their place for their other voters.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["boards"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The board (`brd_…`).","example":"brd_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The board (`brd_…`)."},{"in":"path","name":"subject","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own user id (the token's `sub`)."},"required":true,"description":"Your app's own user id (the token's `sub`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardUserErased"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/board-posts/{id}":{"get":{"operationId":"getBoardPost","summary":"Get a board post","description":"Its status, votes and the conversation the team answers it in.\n\n**Scope:** `read`","tags":["boards"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The post id (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The post id (`bpost_…`)."}],"responses":{"200":{"description":"The post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardPostOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"operationId":"updateBoardPost","summary":"Change a post's status","description":"Its followers get one e-mail about it, and `board.post.status` fires.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["boards"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The post id (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The post id (`bpost_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["under_review","planned","in_progress","completed","closed"]},"author_id":{"type":"string","description":"The member (`mem_…`) the change is recorded for."}},"required":["status","author_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardPostOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/board-posts/{id}/comments":{"post":{"operationId":"createBoardPostComment","summary":"Answer a post for the team","description":"Posted on the board as the team's pinned answer: its followers get an e-mail and its conversation counts it as a reply.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["boards"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The post id (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The post id (`bpost_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":5000},"author_id":{"type":"string","description":"The member (`mem_…`) who answers for the team."},"status":{"description":"Moves the post's status in the same step.","type":"string","enum":["under_review","planned","in_progress","completed","closed"]}},"required":["body","author_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"The comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardCommentOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/companies/{external_id}":{"post":{"operationId":"upsertCompany","summary":"Create or update a company","description":"The same company your app's token names in its `company` claim: what you send overwrites what relay knows, a field you leave out stays. Members join through the token's claim when they sign in.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["apps"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"external_id","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own id for the company."},"required":true,"description":"Your app's own id for the company."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"plan":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"currency":{"description":"ISO 4217.","anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}]},"country":{"description":"ISO 3166-1 alpha-2.","anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"created_at":{"description":"When your app created it.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"description":"Up to 50 snake_case keys; values are strings, numbers, booleans or string lists. Any other key or value is dropped."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The company after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/users/{subject}":{"delete":{"operationId":"eraseAppUser","summary":"Erase a person from an app","description":"For a user your app deleted: their Messenger conversations and sessions are deleted, their board posts' and comments' words wiped and their votes removed. Their customer profile stays when another channel knows them; erase it with `DELETE /customers/{id}`.\n\n**Scope:** `admin` · **Idempotency-Key:** required","tags":["apps"],"x-relay-scope":"admin","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"subject","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own user id (the token's `sub`)."},"required":true,"description":"Your app's own user id (the token's `sub`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"responses":{"200":{"description":"Done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppUserErased"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/news":{"get":{"operationId":"listNews","summary":"List an app's News","description":"Newest first. Each item carries every language it was written in and who it is for, so your own app can show the same News.\n\n**Scope:** `read`","tags":["news"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"query","name":"limit","schema":{"default":20,"description":"Page size, 1–50 (default 20).","type":"integer","minimum":1,"maximum":50},"description":"Page size, 1–50 (default 20)."},{"in":"query","name":"cursor","schema":{"description":"The `next_cursor` of the previous page; omit for the first page.","type":"string","maxLength":512},"description":"The `next_cursor` of the previous page; omit for the first page."},{"in":"query","name":"state","schema":{"description":"Defaults to `published`.","type":"string","enum":["draft","scheduled","published","archived"]},"description":"Defaults to `published`."}],"responses":{"200":{"description":"A page of news items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsItemList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/news/{id}":{"get":{"operationId":"getNewsItem","summary":"Get a news item","description":"Its words in every language, its audience and its state.\n\n**Scope:** `read`","tags":["news"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The news item id (`news_…`).","example":"news_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The news item id (`news_…`)."}],"responses":{"200":{"description":"The news item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsItemRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/apps/{id}/help/catalog":{"get":{"operationId":"getHelpCatalog","summary":"Get an app's help catalog","description":"Every published item with all its complete languages, the platform's renders (the web one standing in for a missing mobile render) and its placements on that platform, plus the topics, groups and courses. Send the last `ETag` as `If-None-Match`: an unchanged catalog answers `304` with no body. The version is the same for every platform and tag filter, so keep one per variant. A help center that is off answers `404 help_center_off`.\n\n**Scope:** `read`","tags":["help"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"query","name":"platform","schema":{"default":"web","type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."}},{"in":"query","name":"tags","schema":{"description":"Comma-separated viewer tags: only untagged items and items carrying one of them. Left out = every published item.","type":"string","maxLength":4000},"description":"Comma-separated viewer tags: only untagged items and items carrying one of them. Left out = every published item."}],"responses":{"200":{"description":"The catalog","headers":{"ETag":{"required":true,"description":"The catalog version, quoted (`\"12\"`).","schema":{"type":"string","description":"The catalog version, quoted (`\"12\"`)."}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpCatalog"}}}},"304":{"description":"Unchanged since the version in `If-None-Match`.","headers":{"ETag":{"required":true,"description":"The catalog version, quoted (`\"12\"`).","schema":{"type":"string","description":"The catalog version, quoted (`\"12\"`)."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/apps/{id}/help/search":{"get":{"operationId":"searchHelp","summary":"Search an app's help center","description":"Every word first, then any word. A search that finds nothing is counted (the folded words and a daily count, never who asked) for the team's no-answer list.\n\n**Scope:** `read`","tags":["help"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"query","name":"q","schema":{"type":"string","maxLength":200,"description":"What the viewer typed."},"required":true,"description":"What the viewer typed."},{"in":"query","name":"locale","schema":{"description":"Defaults to the help center's default language.","type":"string","enum":["fr","en","ar"]},"description":"Defaults to the help center's default language."},{"in":"query","name":"platform","schema":{"default":"web","type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."}},{"in":"query","name":"tags","schema":{"description":"Comma-separated viewer tags; left out = every published item.","type":"string","maxLength":4000},"description":"Comma-separated viewer tags; left out = every published item."},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"The matches, best first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpSearchResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/apps/{id}/help/spots":{"put":{"operationId":"putHelpSpots","summary":"Replace a platform's help spots","description":"The screens and spots your app mounts on one platform, pushed by your CI: the platform's whole registry is replaced. The team places help items on them; a placement whose spot is no longer registered shows as stale. Accepted while the help center is off.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["help"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."},"spots":{"maxItems":3000,"type":"array","items":{"type":"object","properties":{"surface":{"type":"string","minLength":1,"maxLength":200,"description":"A route pattern your app mounts (`/properties/[slug]`); `*` = any screen (then `spot` is required)."},"spot":{"description":"`card-<name>` or `<kind>:<name>`; null = the screen itself.","anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["surface"],"additionalProperties":false}}},"required":["platform","spots"],"additionalProperties":false}}}},"responses":{"200":{"description":"The registry was replaced","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpSpotsReplaced"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/help/feedback":{"post":{"operationId":"sendHelpFeedback","summary":"Send feedback on a help item","description":"Anonymous: the feedback names the item, the language, the answer and its reasons, never the person.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["help"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string","minLength":1,"maxLength":120,"description":"The item's key."},"locale":{"type":"string","enum":["fr","en","ar"]},"helpful":{"type":"boolean","description":"« C'était clair ? » yes or no."},"reasons":{"maxItems":10,"type":"array","items":{"type":"string","enum":["too_fast","screen_different","step_missing","not_my_question"]}},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"source":{"type":"string","enum":["web","app_web","app_mobile","messenger"],"description":"`app_web` or `app_mobile` from your app."},"screen":{"description":"The route the viewer was on.","anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["item","locale","helpful","source"],"additionalProperties":false}}}},"responses":{"201":{"description":"Recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpFeedbackRecorded"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/help/users/{subject}/progress":{"get":{"operationId":"listHelpProgress","summary":"Get a person's help progress","description":"What one of your users watched, last played first.\n\n**Scope:** `read`","tags":["help"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"subject","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own user id (the token's `sub`)."},"required":true,"description":"Your app's own user id (the token's `sub`)."},{"in":"query","name":"item","schema":{"description":"One item's key: only its row.","type":"string","minLength":1,"maxLength":120},"description":"One item's key: only its row."}],"responses":{"200":{"description":"Their progress rows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpProgressList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"put":{"operationId":"putHelpProgress","summary":"Record a person's progress on an item","description":"Merged, never rewound: `max_pct` keeps its highest value, the first `watched_at` stays (90 % stamps it), `last_seen_at` keeps the latest. Answers the stored row.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["help"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"subject","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own user id (the token's `sub`)."},"required":true,"description":"Your app's own user id (the token's `sub`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"string","minLength":1,"maxLength":120,"description":"The item's key."},"position_s":{"type":"number","minimum":0,"description":"Where the viewer stopped, in seconds."},"max_pct":{"type":"number","minimum":0,"maximum":100,"description":"The furthest share watched."},"watched_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["item","position_s","max_pct"],"additionalProperties":false}}}},"responses":{"200":{"description":"The stored progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpProgress"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/help/users/{subject}/preferences":{"get":{"operationId":"getHelpPreferences","summary":"Get a person's help preferences","description":"Both on until the person turns one off.\n\n**Scope:** `read`","tags":["help"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"subject","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own user id (the token's `sub`)."},"required":true,"description":"Your app's own user id (the token's `sub`)."}],"responses":{"200":{"description":"Their preferences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpPreferences"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"put":{"operationId":"putHelpPreferences","summary":"Set a person's help preferences","description":"A field left out keeps its value.\n\n**Scope:** `send` · **Idempotency-Key:** required","tags":["help"],"x-relay-scope":"send","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"subject","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Your app's own user id (the token's `sub`)."},"required":true,"description":"Your app's own user id (the token's `sub`)."},{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":1,"maxLength":150,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`.","example":"3f1c9a52-7d43-4bb8-9a3e-1e2f5c6d7a80"},"required":true,"description":"A unique key per logical request (a UUID is ideal), 1–150 visible ASCII characters. A retry with the same key and the same request answers the stored response for 24 h and changes nothing; the same key with a different request answers 422 `idempotency_key_reused`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chips":{"type":"boolean"},"empty_videos":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Their preferences after the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpPreferences"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/GatewayError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/apps/{id}/help/items/{key}":{"get":{"operationId":"getHelpItem","summary":"Get a help item","description":"One published item in its catalog shape; its image blocks carry a signed `image_url` valid for 5 minutes.\n\n**Scope:** `read`","tags":["help"],"x-relay-scope":"read","parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The app (`app_…`)."},{"in":"path","name":"key","schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item's key."},"required":true,"description":"The item's key."},{"in":"query","name":"platform","schema":{"default":"web","type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."}}],"responses":{"200":{"description":"The item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HelpItem"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}},"webhooks":{"number.status":{"post":{"operationId":"webhook_number_status","summary":"number.status","description":"A number's status changed: linked (`working`), reconnecting, `failed` (often a ban) or `logged_out` from the phone.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"number.status"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/NumberStatusEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.received":{"post":{"operationId":"webhook_message_received","summary":"message.received","description":"A message arrived on one of your numbers (1:1 or group).","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.received"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.sent":{"post":{"operationId":"webhook_message_sent","summary":"message.sent","description":"A message left one of your numbers: one you sent through this API or the inbox once WhatsApp accepted it, or one typed on the phone itself.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.sent"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.status":{"post":{"operationId":"webhook_message_status","summary":"message.status","description":"An outbound message was delivered, read, or failed.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.status"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/MessageStatusEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.reaction":{"post":{"operationId":"webhook_message_reaction","summary":"message.reaction","description":"A reaction on a message was added, changed or removed (by anyone, us included).","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.reaction"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/MessageReactionEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.edited":{"post":{"operationId":"webhook_message_edited","summary":"message.edited","description":"A message's text or caption was edited.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.edited"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.revoked":{"post":{"operationId":"webhook_message_revoked","summary":"message.revoked","description":"A message was deleted for everyone.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.revoked"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/MessageRevokedEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"chat.updated":{"post":{"operationId":"webhook_chat_updated","summary":"chat.updated","description":"A chat's name, unread count or inbox state (archived, pinned, muted) changed.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"chat.updated"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/ChatUpdatedEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"group.updated":{"post":{"operationId":"webhook_group_updated","summary":"group.updated","description":"A group's subject, description or settings changed, or our number left it.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"group.updated"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/GroupUpdatedEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"group.participants":{"post":{"operationId":"webhook_group_participants","summary":"group.participants","description":"A group's participants or their roles changed.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"group.participants"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/GroupParticipantsEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"conversation.opened":{"post":{"operationId":"webhook_conversation_opened","summary":"conversation.opened","description":"A conversation opened (or reopened) on a customer's message, or when an agent wrote first.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"conversation.opened"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Conversation"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"conversation.assigned":{"post":{"operationId":"webhook_conversation_assigned","summary":"conversation.assigned","description":"A conversation's assignee changed (assigned, reassigned or unassigned).","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"conversation.assigned"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Conversation"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"conversation.status":{"post":{"operationId":"webhook_conversation_status","summary":"conversation.status","description":"A conversation's status changed: open, pending, snoozed or resolved.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"conversation.status"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Conversation"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"conversation.note":{"post":{"operationId":"webhook_conversation_note","summary":"conversation.note","description":"A private note was added to a conversation or edited.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"conversation.note"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/ConversationNoteEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"conversation.handoff":{"post":{"operationId":"webhook_conversation_handoff","summary":"conversation.handoff","description":"The AI or your bot handed a conversation to the team.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"conversation.handoff"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/ConversationHandoffEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"csat.received":{"post":{"operationId":"webhook_csat_received","summary":"csat.received","description":"A customer answered the satisfaction question.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"csat.received"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/CsatReceivedEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"customer.updated":{"post":{"operationId":"webhook_customer_updated","summary":"customer.updated","description":"A customer's profile, attributes, tags, block or opt-out changed. Sent only to endpoints without a number filter.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"customer.updated"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Customer"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"media.ready":{"post":{"operationId":"webhook_media_ready","summary":"media.ready","description":"A received attachment finished downloading: `media.state` is `stored`, `GET /media/{media.id}` now answers. Not sent for history imports.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"media.ready"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"media.failed":{"post":{"operationId":"webhook_media_failed","summary":"media.failed","description":"A received attachment could not be downloaded (`media.state` `expired` or `failed`). Not sent for history imports.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"media.failed"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"chat.merged":{"post":{"operationId":"webhook_chat_merged","summary":"chat.merged","description":"WhatsApp revealed the phone behind a privacy id (LID): the chat now carries the phone, and a duplicate chat may have been folded into it. Sent in every mode, catch-up and history included.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"chat.merged"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/ChatMergedEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"message.transcribed":{"post":{"operationId":"webhook_message_transcribed","summary":"message.transcribed","description":"A voice note's transcript settled on a number with AI on: `transcript_status` is `done` (with `transcript`), `failed`, `too_long` or `no_allowance`. Sent once per note: for an inbound live note on its own, and for any other one (an older, imported, outgoing or group note) only once someone transcribes it from the inbox.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"message.transcribed"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"call.missed":{"post":{"operationId":"webhook_call_missed","summary":"call.missed","description":"A 1:1 call to one of your numbers went unanswered: `call.status` is `missed` (nobody picked up) or `declined` (the number's call handling rejected it). The call itself arrived as a `system` message in `message.received` while it rang. Sent once per call.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"call.missed"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/Message"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"board.post.created":{"post":{"operationId":"webhook_board_post.created","summary":"board.post.created","description":"One of your app's users posted on a board. Sent only to endpoints without a number filter.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"board.post.created"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/BoardPost"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"board.post.status":{"post":{"operationId":"webhook_board_post.status","summary":"board.post.status","description":"A post's status changed (from the inbox, the Feedback module, a merge or `PATCH /board-posts/{id}`).","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"board.post.status"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/BoardPost"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"board.comment.created":{"post":{"operationId":"webhook_board_comment.created","summary":"board.comment.created","description":"A comment was added to a post: by one of your app's users, or by a member for the team (`is_team`).","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"board.comment.created"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/BoardComment"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"messenger.conversation.created":{"post":{"operationId":"webhook_messenger_conversation.created","summary":"messenger.conversation.created","description":"Someone opened a conversation in your app's Messenger (its first message also sends `messenger.message.created`). Sent only to endpoints without a number filter.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"messenger.conversation.created"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/MessengerConversationEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"messenger.message.created":{"post":{"operationId":"webhook_messenger_message.created","summary":"messenger.message.created","description":"A message was written in a Messenger conversation: by the person, a member, the AI or the system. Ids and kinds only. Sent only to endpoints without a number filter.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"messenger.message.created"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/MessengerMessageEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"news.published":{"post":{"operationId":"webhook_news_published","summary":"news.published","description":"A news item was published in your app's Messenger, at once or at its scheduled instant. Sent once per item, only to endpoints without a number filter.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"news.published"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/NewsItem"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}},"webhook.test":{"post":{"operationId":"webhook_webhook_test","summary":"webhook.test","description":"Sent by `POST /webhooks/endpoints/{id}/test`; never by a real change.","tags":["webhooks"],"parameters":[{"in":"header","name":"X-Relay-Event","schema":{"type":"string","description":"The event name (same as `event` in the body).","example":"message.received"},"required":true,"description":"The event name (same as `event` in the body)."},{"in":"header","name":"X-Relay-Timestamp","schema":{"type":"string","description":"Unix seconds when this attempt was signed.","example":"1794440000"},"required":true,"description":"Unix seconds when this attempt was signed."},{"in":"header","name":"X-Relay-Signature","schema":{"type":"string","description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`.","example":"v1=5f2b…"},"required":true,"description":"`v1=<hex HMAC-SHA256(secret, \"<X-Relay-Timestamp>.<raw body>\")>`."},{"in":"header","name":"X-Relay-Delivery","schema":{"type":"string","description":"The delivery id (`dlv_…`), as in the delivery log.","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"required":true,"description":"The delivery id (`dlv_…`), as in the delivery log."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event id: stable across retries and redeliveries, deduplicate on it (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","const":"webhook.test"},"created_at":{"type":"string","description":"When the event was emitted. ISO 8601, UTC."},"data":{"$ref":"#/components/schemas/WebhookTestEvent"}},"required":["id","event","created_at","data"]}}}},"responses":{"200":{"description":"Any 2xx within 10 s acknowledges the delivery. 408, 429, 5xx and network errors are retried; any other status is final."}}}}},"components":{"schemas":{"NumberStatusEvent":{"type":"object","properties":{"id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"label":{"type":["string","null"]},"phone":{"type":["string","null"]},"status":{"type":"string","enum":["pairing","passkey","working","disconnected","failed","logged_out"]},"status_reason":{"type":["string","null"]},"status_changed_at":{"description":"When the status changed. ISO 8601, UTC.","type":["string","null"]},"connected_at":{"description":"When the current link started. ISO 8601, UTC.","type":["string","null"]}},"required":["id","label","phone","status","status_reason","status_changed_at","connected_at"],"description":"The number's status after the change. Full detail: `GET /numbers/{id}`."},"Message":{"type":"object","properties":{"id":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number that sent or received it (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_type":{"type":"string","enum":["dm","group"]},"chat_jid":{"type":"string","description":"WhatsApp's id of the conversation."},"wa_message_id":{"description":"WhatsApp's own message id (unique within its chat), set once the message left; null while `pending`. A call entry carries WhatsApp's call id.","type":["string","null"]},"from_me":{"type":"boolean"},"sender":{"anyOf":[{"$ref":"#/components/schemas/MessageSender"},{"type":"null"}]},"type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contact","poll","system","unsupported"]},"body":{"description":"The text, or a media caption; null once revoked.","type":["string","null"]},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Type-specific fields (location, contact card, poll options); null once revoked and for a call entry. A `text` message whose sender's phone attached a link preview carries `link`: `{ url, matched_text, title, description }` (an http(s) `url`; the others may be null; no thumbnail). An edit drops the preview."},"call":{"anyOf":[{"$ref":"#/components/schemas/MessageCall"},{"type":"null"}],"description":"Set on a `system` message that records a call; null on every other message."},"media":{"anyOf":[{"$ref":"#/components/schemas/MessageMedia"},{"type":"null"}]},"transcript":{"description":"A voice note's words, in the language spoken; null until `transcript_status` is `done`, when nothing intelligible was said, and once revoked.","type":["string","null"]},"transcript_language":{"description":"The spoken language of `transcript` (ISO 639 code, `ary` for Moroccan Darija).","type":["string","null"]},"transcript_status":{"anyOf":[{"type":"string","enum":["pending","done","failed","too_long","no_allowance"]},{"type":"null"}],"description":"null when the message is not transcribed (not a voice note, AI off on the number, or an outgoing, group or imported note no one transcribed from the inbox) · pending (being transcribed) · done · failed · too_long (over 5 minutes or 12 MB) · no_allowance (the plan's AI replies are used up)."},"quoted_message_id":{"anyOf":[{"type":"string","description":"The message replied to (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"quoted_wa_message_id":{"type":["string","null"]},"mentioned_jids":{"type":"array","items":{"type":"string"}},"is_forwarded":{"type":"boolean"},"is_view_once":{"type":"boolean"},"status":{"type":"string","enum":["pending","sent","delivered","read","failed"],"description":"pending → sent → delivered → read, or failed. Only moves forward."},"error_code":{"description":"Why a send failed (status `failed`).","type":["string","null"]},"source":{"type":"string","enum":["inbox","api","live","catch_up","history","ai","automation","api_automated"],"description":"api (sent with this API) · inbox (sent from the web inbox) · live / catch_up / history (received or synced from the phone)."},"client_key":{"description":"The `Idempotency-Key` the message was sent with.","type":["string","null"]},"conversation_id":{"anyOf":[{"type":"string","description":"The support conversation it belongs to; null for history imports and messages outside one (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"sent_at":{"description":"When it was sent or received. ISO 8601, UTC.","type":["string","null"]},"edited_at":{"description":"When it was last edited. ISO 8601, UTC.","type":["string","null"]},"revoked_at":{"description":"When it was deleted for everyone. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","chat_id","chat_type","chat_jid","wa_message_id","from_me","sender","type","body","content","call","media","transcript","transcript_language","transcript_status","quoted_message_id","quoted_wa_message_id","mentioned_jids","is_forwarded","is_view_once","status","error_code","source","client_key","conversation_id","sent_at","edited_at","revoked_at"],"description":"A message, sent or received. The same object is the `data` of the `message.received`, `message.sent`, `message.edited`, `message.transcribed` and `call.missed` webhooks."},"MessageSender":{"type":"object","properties":{"jid":{"type":"string","description":"WhatsApp's id of the author (canonical form)."},"phone":{"description":"E.164, when WhatsApp exposes it (null for a privacy id).","type":["string","null"]},"name":{"description":"The saved name, else the author's own profile name.","type":["string","null"]},"contact_id":{"anyOf":[{"type":"string","description":"The author's contact (`ct_…`).","example":"ct_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]}},"required":["jid","phone","name","contact_id"],"description":"Who wrote the message; null for a system message."},"MessageCall":{"type":"object","properties":{"status":{"type":"string","enum":["ringing","answered","missed","declined"],"description":"ringing (it is ringing now) · answered (picked up on the phone) · missed (nobody answered) · declined (rejected by the number's call handling). ringing moves once, to one of the three others."},"is_video":{"type":"boolean"},"answered_at":{"description":"When it was picked up on the phone. ISO 8601, UTC.","type":["string","null"]},"ended_at":{"description":"When it stopped ringing or, once answered, when it ended. ISO 8601, UTC.","type":["string","null"]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long an answered call lasted, once it ended."}},"required":["status","is_video","answered_at","ended_at","duration_seconds"],"description":"A WhatsApp call to the number, recorded as a `system` message. Calls are seen, never carried: answer them on the phone."},"MessageMedia":{"type":"object","properties":{"id":{"type":"string","description":"The attachment id: download it with `GET /media/{id}` (`media_…`).","example":"media_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"state":{"type":"string","enum":["pending","stored","expired","failed"],"description":"pending (still downloading from WhatsApp) · stored (downloadable) · expired (past the plan's retention) · failed (WhatsApp no longer serves it)."},"mime":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"file_name":{"type":["string","null"]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":["string","null"]}},"required":["id","state","mime","size_bytes","file_name","duration_seconds","width","height","sha256"],"description":"A message's attachment, stored in our private bucket."},"MessageStatusEvent":{"type":"object","properties":{"id":{"type":"string","description":"The message (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"wa_message_id":{"type":["string","null"]},"from_me":{"type":"boolean"},"conversation_id":{"anyOf":[{"type":"string","description":"The support conversation it belongs to (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"client_key":{"description":"The `Idempotency-Key` the message was sent with.","type":["string","null"]},"status":{"type":"string","enum":["pending","sent","delivered","read","failed"]},"error_code":{"type":["string","null"]},"sent_at":{"description":"When it was sent. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","chat_id","wa_message_id","from_me","conversation_id","client_key","status","error_code","sent_at"],"description":"An outbound message's new status; carries no content."},"MessageReactionEvent":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"The message (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"wa_message_id":{"type":["string","null"]},"from_me":{"type":"boolean"},"conversation_id":{"anyOf":[{"type":"string","description":"The support conversation it belongs to (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]}},"required":["id","number_id","chat_id","wa_message_id","from_me","conversation_id"]},"reactions":{"type":"array","items":{"type":"object","properties":{"sender_jid":{"type":"string"},"sender_phone":{"type":["string","null"]},"from_me":{"type":"boolean"},"emoji":{"type":"string"},"reacted_at":{"description":"When the reaction was set. ISO 8601, UTC.","type":["string","null"]}},"required":["sender_jid","sender_phone","from_me","emoji","reacted_at"]}}},"required":["message","reactions"],"description":"The message's whole current reaction list (state, not a delta: a removed reaction is simply absent)."},"MessageRevokedEvent":{"type":"object","properties":{"id":{"type":"string","description":"The message (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"wa_message_id":{"type":["string","null"]},"from_me":{"type":"boolean"},"conversation_id":{"anyOf":[{"type":"string","description":"The support conversation it belongs to (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"revoked_at":{"description":"When it was deleted for everyone. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","chat_id","wa_message_id","from_me","conversation_id","revoked_at"],"description":"A message was deleted for everyone; its content is gone."},"ChatUpdatedEvent":{"type":"object","properties":{"id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"type":{"type":"string","enum":["dm","group"]},"jid":{"type":"string"},"phone":{"type":["string","null"]},"name":{"type":["string","null"]},"unread_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_message_at":{"description":"The newest message. ISO 8601, UTC.","type":["string","null"]},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"muted_until":{"description":"Muted until. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","type","jid","phone","name","unread_count","last_message_at","archived","pinned","muted_until"],"description":"The chat after the change. Full detail: `GET /chats/{id}`."},"GroupUpdatedEvent":{"type":"object","properties":{"id":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"jid":{"type":"string"},"subject":{"type":["string","null"]},"description":{"type":["string","null"]},"only_admins_send":{"type":"boolean"},"only_admins_edit":{"type":"boolean"},"created_at":{"description":"When WhatsApp created the group. ISO 8601, UTC.","type":["string","null"]},"left_at":{"description":"When our number left it. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","jid","subject","description","only_admins_send","only_admins_edit","created_at","left_at"],"description":"The group after the change. Full detail: `GET /groups/{id}`."},"GroupParticipantsEvent":{"type":"object","properties":{"id":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"jid":{"type":"string"},"participants":{"type":"array","items":{"type":"object","properties":{"jid":{"type":"string"},"phone":{"type":["string","null"]},"role":{"type":"string","enum":["member","admin","superadmin"]}},"required":["jid","phone","role"]}}},"required":["id","number_id","jid","participants"],"description":"The group's whole current participant list (state, not a delta)."},"Conversation":{"type":"object","properties":{"id":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"channel":{"type":"string","enum":["whatsapp","board","messenger"],"description":"The channel it arrived on; `whatsapp` for every conversation this API lists today."},"source":{"$ref":"#/components/schemas/ConversationSource"},"number_id":{"type":"string","description":"The number it runs on (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The WhatsApp chat it is an episode of (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"customer_id":{"anyOf":[{"type":"string","description":"The customer (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"status":{"type":"string","enum":["open","pending","snoozed","resolved"],"description":"open · pending · snoozed (until `snoozed_until`) · resolved."},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"mode":{"type":"string","enum":["human","ai","bot"],"description":"human (agents) · ai (relay's AI agent) · bot (your own bot, through this API and the webhooks)."},"assignee_id":{"anyOf":[{"type":"string","description":"The assigned member (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","description":"The team (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"tag_ids":{"type":"array","items":{"type":"string","description":"A tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"opened_at":{"description":"When the episode opened. ISO 8601, UTC.","type":["string","null"]},"reopened_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"waiting_since":{"description":"Since when the customer waits on a reply; null when not waiting. ISO 8601, UTC.","type":["string","null"]},"first_response_at":{"description":"The first reply to the customer. ISO 8601, UTC.","type":["string","null"]},"snoozed_until":{"description":"When a snoozed conversation wakes up. ISO 8601, UTC.","type":["string","null"]},"resolved_at":{"description":"When it was resolved. ISO 8601, UTC.","type":["string","null"]},"resolved_by":{"anyOf":[{"type":"string","enum":["agent","ai","automation","api"]},{"type":"null"}]},"sla_state":{"anyOf":[{"type":"string","enum":["on_time","due_soon","breached"]},{"type":"null"}],"description":"null when no SLA policy applies."}},"required":["id","channel","source","number_id","chat_id","customer_id","status","priority","mode","assignee_id","team_id","tag_ids","opened_at","reopened_count","waiting_since","first_response_at","snoozed_until","resolved_at","resolved_by","sla_state"],"description":"A support episode over a chat: at most one is open per chat at a time. The same object is the `data` of the `conversation.opened`, `conversation.assigned` and `conversation.status` webhooks."},"ConversationSource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["whatsapp_number","app"],"description":"whatsapp_number · app."},"id":{"type":"string","description":"The public id of the number (`num_…`) or the app (`app_…`) it came through."}},"required":["kind","id"]},{"type":"null"}],"description":"Where the conversation comes from: the same as `number_id` for a WhatsApp conversation."},"ConversationNoteEvent":{"type":"object","properties":{"id":{"type":"string","description":"The note (`note_…`).","example":"note_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"conversation_id":{"type":"string","description":"The conversation (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The chat (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"author_id":{"type":"string","description":"Who wrote it (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"mentioned_member_ids":{"type":"array","items":{"type":"string","description":"A mentioned member (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"created_at":{"description":"When it was written. ISO 8601, UTC.","type":["string","null"]}},"required":["id","conversation_id","number_id","chat_id","author_id","mentioned_member_ids","created_at"],"description":"A note was added or edited; read its body with `GET /conversations/{id}/notes`."},"ConversationHandoffEvent":{"type":"object","properties":{"id":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"channel":{"type":"string","enum":["whatsapp","board","messenger"],"description":"The channel it arrived on; `whatsapp` for every conversation this API lists today."},"source":{"$ref":"#/components/schemas/ConversationSource"},"number_id":{"type":"string","description":"The number it runs on (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The WhatsApp chat it is an episode of (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"customer_id":{"anyOf":[{"type":"string","description":"The customer (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"status":{"type":"string","enum":["open","pending","snoozed","resolved"],"description":"open · pending · snoozed (until `snoozed_until`) · resolved."},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"mode":{"type":"string","enum":["human","ai","bot"],"description":"human (agents) · ai (relay's AI agent) · bot (your own bot, through this API and the webhooks)."},"assignee_id":{"anyOf":[{"type":"string","description":"The assigned member (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","description":"The team (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"tag_ids":{"type":"array","items":{"type":"string","description":"A tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"opened_at":{"description":"When the episode opened. ISO 8601, UTC.","type":["string","null"]},"reopened_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"waiting_since":{"description":"Since when the customer waits on a reply; null when not waiting. ISO 8601, UTC.","type":["string","null"]},"first_response_at":{"description":"The first reply to the customer. ISO 8601, UTC.","type":["string","null"]},"snoozed_until":{"description":"When a snoozed conversation wakes up. ISO 8601, UTC.","type":["string","null"]},"resolved_at":{"description":"When it was resolved. ISO 8601, UTC.","type":["string","null"]},"resolved_by":{"anyOf":[{"type":"string","enum":["agent","ai","automation","api"]},{"type":"null"}]},"sla_state":{"anyOf":[{"type":"string","enum":["on_time","due_soon","breached"]},{"type":"null"}],"description":"null when no SLA policy applies."},"handoff":{"anyOf":[{"type":"object","properties":{"by":{"type":"string","enum":["member","ai","automation","api","system"],"description":"Who handed off: ai, automation, a member, or api (your bot)."},"reason":{"description":"A code: the AI's handoff reason (asked_for_human, no_grounded_answer, negative_sentiment, voice_note, max_turns, vip, topic, refusal, error), or agent.","type":["string","null"]},"from_mode":{"anyOf":[{"type":"string","enum":["human","ai","bot"]},{"type":"null"}]},"at":{"description":"When it was handed off. ISO 8601, UTC.","type":["string","null"]}},"required":["by","reason","from_mode","at"]},{"type":"null"}]}},"required":["id","channel","source","number_id","chat_id","customer_id","status","priority","mode","assignee_id","team_id","tag_ids","opened_at","reopened_count","waiting_since","first_response_at","snoozed_until","resolved_at","resolved_by","sla_state","handoff"],"description":"A conversation went from the AI or your bot to the team; its state plus the latest handoff's codes."},"CsatReceivedEvent":{"type":"object","properties":{"id":{"type":"string","description":"The CSAT answer (`csat_…`).","example":"csat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"conversation_id":{"type":"string","description":"The conversation rated (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The chat (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"customer_id":{"anyOf":[{"type":"string","description":"The customer (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"score":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 (bad) to 5 (great)."},"has_comment":{"type":"boolean","description":"The customer added a comment (kept in relay, not in the event)."},"assignee_id":{"anyOf":[{"type":"string","description":"Who held the conversation (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","description":"Its team (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"resolved_by":{"anyOf":[{"type":"string","enum":["agent","ai","automation","api"]},{"type":"null"}]},"created_at":{"description":"When the customer answered. ISO 8601, UTC.","type":["string","null"]}},"required":["id","conversation_id","number_id","chat_id","customer_id","score","has_comment","assignee_id","team_id","resolved_by","created_at"],"description":"A customer rated a resolved conversation."},"Customer":{"type":"object","properties":{"id":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"display_name":{"type":["string","null"]},"phone":{"description":"E.164; null while WhatsApp exposes only a privacy id.","type":["string","null"]},"email":{"type":["string","null"]},"language":{"description":"ISO 639-1.","type":["string","null"]},"lifecycle_stage":{"type":"string","enum":["lead","customer"]},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values of the organization's custom attributes, by key."},"tag_ids":{"type":"array","items":{"type":"string","description":"A tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The per-number contact (`ct_…`).","example":"ct_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"Its number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"required":["id","number_id"]},"description":"The person on each of your numbers."},"blocked_at":{"description":"Blocked: their messages open no conversation and nothing automated is sent. ISO 8601, UTC.","type":["string","null"]},"opted_out_at":{"description":"Opted out of marketing (your own records; replies inside a conversation they started are not marketing). ISO 8601, UTC.","type":["string","null"]},"last_message_at":{"description":"Their latest message on any number. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the customer was created. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When the profile last changed. ISO 8601, UTC.","type":["string","null"]}},"required":["id","display_name","phone","email","language","lifecycle_stage","attributes","tag_ids","contacts","blocked_at","opted_out_at","last_message_at","created_at","updated_at"],"description":"One person across the organization's numbers. The same object is the `data` of the `customer.updated` webhook."},"ChatMergedEvent":{"type":"object","properties":{"id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"type":{"type":"string","enum":["dm","group"]},"jid":{"type":"string"},"phone":{"type":["string","null"]},"name":{"type":["string","null"]},"unread_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_message_at":{"description":"The newest message. ISO 8601, UTC.","type":["string","null"]},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"muted_until":{"description":"Muted until. ISO 8601, UTC.","type":["string","null"]},"removed_chat_id":{"anyOf":[{"type":"string","description":"The chat folded into this one and deleted; null when this chat was re-keyed in place (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]}},"required":["id","number_id","type","jid","phone","name","unread_count","last_message_at","archived","pinned","muted_until","removed_chat_id"],"description":"The surviving chat, now under the person's phone. Re-point anything you keyed on `removed_chat_id` to `id`; its messages moved here."},"BoardPost":{"type":"object","properties":{"id":{"type":"string","description":"The post id (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"board_id":{"type":"string","description":"Its board (`brd_…`).","example":"brd_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"title":{"type":"string","description":"Empty once its author deleted it."},"body":{"type":"string"},"status":{"type":"string","enum":["under_review","planned","in_progress","completed","closed"]},"moderation":{"type":"string","enum":["visible","pending","hidden"]},"category":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["bug","feature_request"]}},"required":["name","kind"]},"vote_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comment_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"merged_into_id":{"anyOf":[{"type":"string","description":"The post it was merged into (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The author on this board (`buser_…`).","example":"buser_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"subject":{"type":"string","description":"Your app's own user id (the token's `sub`)."}},"required":["id","subject"]},{"type":"null"}],"description":"Null once your app erased its user."},"conversation_id":{"anyOf":[{"type":"string","description":"Its support conversation in the inbox (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"deleted":{"type":"boolean"},"created_at":{"description":"When it was posted. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When it last changed. ISO 8601, UTC.","type":["string","null"]}},"required":["id","board_id","title","body","status","moderation","category","vote_count","comment_count","merged_into_id","author","conversation_id","deleted","created_at","updated_at"],"description":"A post on a board. The same object is the `data` of the `board.post.created` and `board.post.status` webhooks."},"BoardComment":{"type":"object","properties":{"id":{"type":"string","description":"The comment id (`bcmt_…`).","example":"bcmt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"post_id":{"type":"string","description":"Its post (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"body":{"type":"string"},"is_team":{"type":"boolean","description":"Written by a member for the team."},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The author on this board (`buser_…`).","example":"buser_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"subject":{"type":"string"}},"required":["id","subject"]},{"type":"null"}]},"member_id":{"anyOf":[{"type":"string","description":"The member who answered for the team (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"deleted":{"type":"boolean"},"created_at":{"description":"When it was written. ISO 8601, UTC.","type":["string","null"]}},"required":["id","post_id","body","is_team","author","member_id","deleted","created_at"],"description":"A comment on a post. The same object is the `data` of the `board.comment.created` webhook."},"MessengerConversationEvent":{"type":"object","properties":{"id":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"app_id":{"type":"string","description":"The app whose Messenger it is (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"app_user_id":{"anyOf":[{"type":"string","description":"Who wrote (`auser_…`).","example":"auser_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"app_user_kind":{"anyOf":[{"type":"string","enum":["user","visitor"]},{"type":"null"}]},"subject":{"description":"Your app's own user id for a signed-in user; null for a visitor.","type":["string","null"]},"customer_id":{"anyOf":[{"type":"string","description":"Their customer profile (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"status":{"type":"string"},"opened_at":{"description":"When the first message opened it. ISO 8601, UTC.","type":["string","null"]}},"required":["id","app_id","app_user_id","app_user_kind","subject","customer_id","status","opened_at"],"description":"A conversation someone opened in your app's Messenger; ids and states only."},"MessengerMessageEvent":{"type":"object","properties":{"id":{"type":"string","description":"The message id (`mmsg_…`).","example":"mmsg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"conversation_id":{"type":"string","description":"Its conversation (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"app_id":{"type":"string","description":"Its app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"author_kind":{"type":"string","enum":["user","visitor","member","ai","system"]},"app_user_id":{"anyOf":[{"type":"string","description":"Set when the person wrote it (`auser_…`).","example":"auser_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"member_id":{"anyOf":[{"type":"string","description":"Set when a member wrote it (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"created_at":{"description":"When it was written. ISO 8601, UTC.","type":["string","null"]}},"required":["id","conversation_id","app_id","author_kind","app_user_id","member_id","created_at"],"description":"A message in a Messenger conversation; ids and kinds only, never its words."},"NewsItem":{"type":"object","properties":{"id":{"type":"string","description":"The news item id (`news_…`).","example":"news_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"app_id":{"type":"string","description":"The app whose Messenger shows it (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"state":{"type":"string","enum":["draft","scheduled","published","archived"]},"label":{"type":"string","enum":["new_feature","improvement","fix","announcement"]},"delivery":{"type":"string","enum":["feed","open_once"],"description":"`open_once` opens it by itself on each reader's next visit; `feed` only lists it."},"audience":{"type":"string","enum":["everyone","users","visitors"],"description":"Who reads it: everyone, signed-in users only or visitors only."},"company_plans":{"type":"array","items":{"type":"string"},"description":"When set, only people whose company is on one of these plans read it."},"button_url":{"description":"A path on your app or an https:// address the button opens.","type":["string","null"]},"has_cover":{"type":"boolean"},"locales":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string","enum":["fr","en","ar"]},"title":{"type":"string"},"body":{"type":"string","description":"Light Markdown: **bold**, *italic*, ## headings and links."},"button_label":{"type":["string","null"]}},"required":["locale","title","body","button_label"]},"description":"Its words per language; a reader whose language is missing gets the Messenger's default one."},"publish_at":{"anyOf":[{"description":"When a scheduled item publishes itself. ISO 8601, UTC.","type":["string","null"]},{"type":"null"}]},"published_at":{"anyOf":[{"description":"When it was published. ISO 8601, UTC.","type":["string","null"]},{"type":"null"}]},"created_at":{"description":"When it was created. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When it last changed. ISO 8601, UTC.","type":["string","null"]}},"required":["id","app_id","state","label","delivery","audience","company_plans","button_url","has_cover","locales","publish_at","published_at","created_at","updated_at"],"description":"An announcement in your app's Messenger News tab."},"WebhookTestEvent":{"type":"object","properties":{"endpoint_id":{"type":"string","description":"The endpoint tested (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"message":{"type":"string"}},"required":["endpoint_id","message"]},"NumberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Number"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of numbers, oldest first."},"Number":{"type":"object","properties":{"id":{"type":"string","description":"The number id (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"label":{"description":"Your name for the number.","type":["string","null"]},"phone":{"description":"E.164, known once paired.","type":["string","null"]},"display_name":{"description":"The WhatsApp profile name.","type":["string","null"]},"avatar_url":{"description":"The profile picture: a signed URL valid 5 minutes, issued per request.","type":["string","null"]},"status":{"type":"string","enum":["pairing","passkey","working","disconnected","failed","logged_out"],"description":"pairing (waiting for a QR scan or pairing code) · passkey (confirm on the phone) · working · disconnected (reconnecting by itself) · failed (banned or refused: link again) · logged_out (unlinked from the phone: link again)."},"status_reason":{"description":"A failure code (never free text) for failed / disconnected / logged_out.","type":["string","null"]},"status_changed_at":{"description":"When the status last changed. ISO 8601, UTC.","type":["string","null"]},"first_connected_at":{"description":"When the number was first linked. ISO 8601, UTC.","type":["string","null"]},"connected_at":{"description":"When the current link started. ISO 8601, UTC.","type":["string","null"]},"last_event_at":{"description":"The last event WhatsApp sent for this number. ISO 8601, UTC.","type":["string","null"]},"can_send":{"type":"boolean","description":"false for every status but `working`."},"daily_send_cap":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Today's send cap: it ramps up over a new number's first two weeks."},"history_import":{"type":"object","properties":{"status":{"type":"string","enum":["pending","running","completed","failed","skipped"]},"started_at":{"description":"Import start. ISO 8601, UTC.","type":["string","null"]},"finished_at":{"description":"Import end. ISO 8601, UTC.","type":["string","null"]},"chats_total":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chats_done":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error_code":{"type":["string","null"]}},"required":["status","started_at","finished_at","chats_total","chats_done","messages","error_code"],"additionalProperties":false,"description":"The import of past chats after the first link, within the plan's retention window."},"ai_mode":{"type":"string","enum":["off","copilot","autopilot"],"description":"off · copilot (the AI drafts, an agent sends) · autopilot (the AI answers by itself). The stored mode: autopilot runs only while `automated_replies_enabled` is true and your organization's AI is on."},"ai_schedule":{"type":"string","enum":["always","outside_business_hours"],"description":"When autopilot answers: always, or only outside the number's business hours."},"automated_replies_enabled":{"type":"boolean","description":"true once an admin accepted the ban risk of automated replies on this number (away and greeting replies, CSAT, rule replies, autopilot). Set in the dashboard."},"default_team_id":{"anyOf":[{"type":"string","description":"The team new conversations on this number are routed to when no routing rule matches (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"call_handling":{"type":"string","enum":["ring","decline","decline_when_closed"],"description":"What happens when someone calls the number: ring (the phone rings), decline (always rejected) or decline_when_closed (rejected outside business hours). Set in the dashboard."},"created_at":{"description":"When the number was added. ISO 8601, UTC.","type":["string","null"]}},"required":["id","label","phone","display_name","avatar_url","status","status_reason","status_changed_at","first_connected_at","connected_at","last_event_at","can_send","daily_send_cap","history_import","ai_mode","ai_schedule","automated_replies_enabled","default_team_id","call_handling","created_at"],"additionalProperties":false,"description":"A WhatsApp number linked to your organization as a device. Its `number.status` webhook carries a subset of these fields."},"Problem":{"type":"object","properties":{"type":{"type":"string","description":"`urn:relay:problem:<code>`: a stable identifier of the problem type."},"title":{"type":"string","description":"A short summary of the HTTP status."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"code":{"type":"string","description":"The machine-readable reason: branch on this (see « Errors »). Codes are never renamed or removed."},"detail":{"description":"A human explanation of this occurrence.","type":"string"},"errors":{"description":"Per-field messages, keyed by the request field (dotted for nested fields).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["type","title","status","code"],"additionalProperties":false,"description":"Every non-2xx answer: an RFC 9457 problem document (`application/problem+json`)."},"NumberConnectAccepted":{"type":"object","properties":{"operation_id":{"type":"string","description":"The operation to poll (`op_…`).","example":"op_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"operation":{"$ref":"#/components/schemas/Operation"},"number":{"$ref":"#/components/schemas/Number"}},"required":["operation_id","operation","number"],"additionalProperties":false,"description":"The number is recorded `pairing` and its session is being placed on a gateway: poll the operation, then read `GET /numbers/{id}/pairing` for the QR code."},"Operation":{"type":"object","properties":{"id":{"type":"string","description":"The operation id (`op_…`).","example":"op_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"kind":{"type":"string","enum":["number_connect","number_logout","number_delete","organization_delete","group_command","number_check","number_restart","data_export","ai_copilot","knowledge_ingest","customer_import","customer_erase","help_import"]},"status":{"type":"string","enum":["queued","running","succeeded","failed"],"description":"queued → running → succeeded | failed. A live operation past its expiry (1 h) reads `failed` with `error.code` `expired`."},"progress":{"anyOf":[{"type":"object","properties":{"done":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["done","total"],"additionalProperties":false},{"type":"null"}]},"result":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Set on success, by kind — `number_connect`: `{ number_id }` (then read `GET /numbers/{id}/pairing`); `number_logout` / `number_delete`: `{ number_id }`; `number_check`: `{ phone, on_whatsapp }`; `group_command`: `{ chat_id }` (create), `{ invite_link }` (invite link), `{ results: [{ phone, jid, ok, error_code }] }` (participants), `{}` otherwise."},"error":{"anyOf":[{"$ref":"#/components/schemas/OperationError"},{"type":"null"}]},"created_at":{"description":"When the request was accepted. ISO 8601, UTC.","type":["string","null"]},"started_at":{"description":"When a worker picked it up. ISO 8601, UTC.","type":["string","null"]},"finished_at":{"description":"When it settled. ISO 8601, UTC.","type":["string","null"]}},"required":["id","kind","status","progress","result","error","created_at","started_at","finished_at"],"additionalProperties":false,"description":"A long request's handle: every 202 answer points here. Poll `GET /operations/{id}` (1 s, then 2 s) until it settles, then re-read what it changed."},"OperationError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":["string","null"]}},"required":["code","message"],"additionalProperties":false,"description":"Why the operation failed; `code` is machine-readable (e.g. `number_not_working`, `expired`)."},"OperationAccepted":{"type":"object","properties":{"operation_id":{"type":"string","description":"The operation to poll (`op_…`).","example":"op_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"operation":{"$ref":"#/components/schemas/Operation"}},"required":["operation_id","operation"],"additionalProperties":false,"description":"The request was accepted and runs in the background."},"NumberPairing":{"type":"object","properties":{"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"status":{"type":"string","enum":["pairing","passkey","working","disconnected","failed","logged_out"]},"qr":{"description":"While `pairing`: the QR payload to render as a QR code (it rotates: read it again every few seconds). Never store or log it.","type":["string","null"]},"passkey_code":{"description":"While `passkey`: the code the phone shows; confirm with `POST /numbers/{id}/passkey/confirm` once they match.","type":["string","null"]},"waiting_for_session":{"type":"boolean","description":"true = the session is not placed yet: ask again in a moment."},"error_code":{"description":"`gateway_<reason>` when WhatsApp's side did not answer; try again.","type":["string","null"]}},"required":["number_id","status","qr","passkey_code","waiting_for_session","error_code"],"additionalProperties":false,"description":"What to show the phone's owner to link the number. Fetched live; nothing is stored."},"NumberPairingCode":{"type":"object","properties":{"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"code":{"type":"string","description":"Type it on the phone: WhatsApp → Linked devices → Link with phone number. Answered once, never stored."}},"required":["number_id","code"],"additionalProperties":false},"NumberPasskeyConfirmed":{"type":"object","properties":{"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"confirmed":{"type":"boolean","const":true}},"required":["number_id","confirmed"],"additionalProperties":false},"ChatList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chat"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of chats."},"Chat":{"type":"object","properties":{"id":{"type":"string","description":"The chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number the conversation belongs to (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"type":{"type":"string","enum":["dm","group"],"description":"dm (one person) or group."},"jid":{"type":"string","description":"WhatsApp's id of the conversation (canonical form)."},"phone":{"description":"E.164 of the other side of a direct chat, when WhatsApp exposes it.","type":["string","null"]},"name":{"description":"The group subject, or a direct chat's stored name (prefer the contact's name for a direct chat).","type":["string","null"]},"description":{"description":"The group description.","type":["string","null"]},"avatar_url":{"description":"The picture: a signed URL valid 5 minutes, issued per request.","type":["string","null"]},"unread_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_message_at":{"description":"The newest message. ISO 8601, UTC.","type":["string","null"]},"archived":{"type":"boolean"},"pinned":{"type":"boolean"},"pinned_at":{"description":"When it was pinned. ISO 8601, UTC.","type":["string","null"]},"muted":{"type":"boolean"},"muted_until":{"description":"Muted until this instant (year 9999 = always). ISO 8601, UTC.","type":["string","null"]},"left_at":{"description":"Group: when our number stopped being a participant. ISO 8601, UTC.","type":["string","null"]},"only_admins_send":{"type":"boolean"},"only_admins_edit":{"type":"boolean"},"group_created_at":{"description":"Group: when WhatsApp created it. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When we first saw the conversation. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","type","jid","phone","name","description","avatar_url","unread_count","last_message_at","archived","pinned","pinned_at","muted","muted_until","left_at","only_admins_send","only_admins_edit","group_created_at","created_at"],"additionalProperties":false,"description":"A conversation of one number. Its `chat.updated` webhook carries a subset of these fields."},"MessageList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MessageOutput"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of messages, newest first."},"MessageAccepted":{"type":"object","properties":{"id":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"status":{"type":"string","enum":["pending","sent","delivered","read","failed"],"description":"`pending` on a new send; a retried request answers the message's current status."},"chat_id":{"type":"string","description":"The conversation it was recorded in (created on a first message to `to`) (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"required":["id","status","chat_id"],"additionalProperties":false,"description":"The message is recorded and queued; follow it with the `message.sent` / `message.status` webhooks or `GET /messages/{id}`."},"MessageActionAccepted":{"type":"object","properties":{"message_id":{"type":"string","description":"The message acted on (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"kind":{"type":"string","enum":["reaction","edit","revoke"]},"status":{"type":"string","enum":["pending","sent","failed"],"description":"`pending` when accepted; a retried request answers the action's current status."}},"required":["message_id","kind","status"],"additionalProperties":false,"description":"The reaction, edit or revoke is queued; the message changes once WhatsApp confirms (`message.reaction`, `message.edited`, `message.revoked` webhooks)."},"Group":{"type":"object","properties":{"id":{"type":"string","description":"The group's chat id (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number in the group (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"jid":{"type":"string","description":"WhatsApp's id of the group."},"subject":{"type":["string","null"]},"description":{"type":["string","null"]},"avatar_url":{"description":"The group picture: a signed URL valid 5 minutes, issued per request.","type":["string","null"]},"only_admins_send":{"type":"boolean"},"only_admins_edit":{"type":"boolean"},"created_at":{"description":"When WhatsApp created the group. ISO 8601, UTC.","type":["string","null"]},"left_at":{"description":"When our number stopped being a participant (read-only from then on). ISO 8601, UTC.","type":["string","null"]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/GroupParticipant"},"description":"Admins first."}},"required":["id","number_id","jid","subject","description","avatar_url","only_admins_send","only_admins_edit","created_at","left_at","participants"],"additionalProperties":false,"description":"A WhatsApp group one of your numbers is in. Its id is the group's chat id (`chat_…`): read its messages with `GET /chats/{id}/messages`."},"GroupParticipant":{"type":"object","properties":{"jid":{"type":"string","description":"WhatsApp's id of the participant (canonical form)."},"phone":{"description":"E.164, when WhatsApp exposes it (null for a privacy id).","type":["string","null"]},"role":{"type":"string","enum":["member","admin","superadmin"]},"is_self":{"type":"boolean","description":"true for our own number."}},"required":["jid","phone","role","is_self"],"additionalProperties":false},"GroupUpdateAccepted":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/OperationAccepted"},"description":"One operation per changed field, in the order subject, description, picture, settings."}},"required":["operations"],"additionalProperties":false},"ContactList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of contacts, newest first."},"Contact":{"type":"object","properties":{"id":{"type":"string","description":"The contact id (`ct_…`).","example":"ct_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number that knows this contact (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"jid":{"type":"string","description":"WhatsApp's id of the person (canonical form)."},"phone":{"description":"E.164, when WhatsApp exposes it.","type":["string","null"]},"push_name":{"description":"The person's own profile name.","type":["string","null"]},"saved_name":{"description":"The name saved in the phone's address book.","type":["string","null"]},"business_name":{"type":["string","null"]},"display_name":{"description":"The name to show: saved, then business, then the profile's own name.","type":["string","null"]},"avatar_url":{"description":"The profile picture: a signed URL valid 5 minutes, issued per request.","type":["string","null"]},"created_at":{"description":"When we first saw the contact. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","jid","phone","push_name","saved_name","business_name","display_name","avatar_url","created_at"],"additionalProperties":false,"description":"A person one of your numbers talks to."},"MediaUploadSlot":{"type":"object","properties":{"id":{"type":"string","description":"The upload id: pass it as `upload_id` when sending (`upl_…`).","example":"upl_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"state":{"type":"string","enum":["pending","ready","consumed","expired"],"description":"pending (waiting for the PUT) · ready (finalized, sendable) · consumed (sent) · expired."},"file_name":{"type":["string","null"]},"mime_type":{"type":"string"},"declared_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"size_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The stored size, set at finalize."},"expires_at":{"description":"The upload must be sent before this instant (24 h). ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the slot was created. ISO 8601, UTC.","type":["string","null"]},"upload":{"type":"object","properties":{"method":{"type":"string","const":"PUT"},"url":{"type":"string","description":"A presigned storage URL: PUT the raw bytes to it (no Authorization header). Never log it."},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Send exactly these headers with the PUT (the declared type and size are enforced)."},"max_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expires_at":{"description":"The URL stops accepting the PUT at this instant (15 minutes). ISO 8601, UTC.","type":["string","null"]}},"required":["method","url","headers","max_bytes","expires_at"],"additionalProperties":false,"description":"How to upload the bytes."}},"required":["id","state","file_name","mime_type","declared_bytes","size_bytes","expires_at","created_at","upload"],"additionalProperties":false},"MediaUpload":{"type":"object","properties":{"id":{"type":"string","description":"The upload id: pass it as `upload_id` when sending (`upl_…`).","example":"upl_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"state":{"type":"string","enum":["pending","ready","consumed","expired"],"description":"pending (waiting for the PUT) · ready (finalized, sendable) · consumed (sent) · expired."},"file_name":{"type":["string","null"]},"mime_type":{"type":"string"},"declared_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"size_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The stored size, set at finalize."},"expires_at":{"description":"The upload must be sent before this instant (24 h). ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the slot was created. ISO 8601, UTC.","type":["string","null"]}},"required":["id","state","file_name","mime_type","declared_bytes","size_bytes","expires_at","created_at"],"additionalProperties":false,"description":"A file uploaded to send. It is consumed by the message (or group picture) that uses it."},"MediaDownload":{"type":"object","properties":{"id":{"type":"string","description":"The attachment id (`media_…`).","example":"media_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"url":{"type":"string","description":"A signed URL to GET the file (no Authorization header), valid 5 minutes. Never store or log it."},"expires_at":{"description":"The URL stops working at this instant. ISO 8601, UTC.","type":["string","null"]},"mime_type":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"file_name":{"type":["string","null"]}},"required":["id","url","expires_at","mime_type","size_bytes","file_name"],"additionalProperties":false},"WebhookEndpointList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of webhook endpoints."},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["number.status","message.received","message.sent","message.status","message.reaction","message.edited","message.revoked","chat.updated","group.updated","group.participants","conversation.opened","conversation.assigned","conversation.status","conversation.note","conversation.handoff","csat.received","customer.updated","media.ready","media.failed","chat.merged","message.transcribed","call.missed","board.post.created","board.post.status","board.comment.created","messenger.conversation.created","messenger.message.created","news.published"]},"description":"The events it receives; empty = every event."},"number_ids":{"type":"array","items":{"type":"string","description":"A number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"description":"The numbers whose events it receives; empty = every number."},"enabled":{"type":"boolean","description":"false once disabled by hand or after repeated failed deliveries."},"disabled_at":{"description":"When it was disabled. ISO 8601, UTC.","type":["string","null"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Deliveries in a row that ended failed (after their 24 h of retries)."},"last_delivery_at":{"description":"The last delivery attempt. ISO 8601, UTC.","type":["string","null"]},"last_success_at":{"description":"The last 2xx answer. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When it was added. ISO 8601, UTC.","type":["string","null"]}},"required":["id","url","description","events","number_ids","enabled","disabled_at","disabled_reason","consecutive_failures","last_delivery_at","last_success_at","created_at"],"additionalProperties":false,"description":"A URL we POST signed events to."},"WebhookEndpointWithSecret":{"type":"object","properties":{"id":{"type":"string","description":"The endpoint id (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["number.status","message.received","message.sent","message.status","message.reaction","message.edited","message.revoked","chat.updated","group.updated","group.participants","conversation.opened","conversation.assigned","conversation.status","conversation.note","conversation.handoff","csat.received","customer.updated","media.ready","media.failed","chat.merged","message.transcribed","call.missed","board.post.created","board.post.status","board.comment.created","messenger.conversation.created","messenger.message.created","news.published"]},"description":"The events it receives; empty = every event."},"number_ids":{"type":"array","items":{"type":"string","description":"A number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"description":"The numbers whose events it receives; empty = every number."},"enabled":{"type":"boolean","description":"false once disabled by hand or after repeated failed deliveries."},"disabled_at":{"description":"When it was disabled. ISO 8601, UTC.","type":["string","null"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Deliveries in a row that ended failed (after their 24 h of retries)."},"last_delivery_at":{"description":"The last delivery attempt. ISO 8601, UTC.","type":["string","null"]},"last_success_at":{"description":"The last 2xx answer. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When it was added. ISO 8601, UTC.","type":["string","null"]},"secret":{"type":"string","description":"The signing secret (`whsec_…`): shown on create and rotate only. Verify `X-Relay-Signature` with it."}},"required":["id","url","description","events","number_ids","enabled","disabled_at","disabled_reason","consecutive_failures","last_delivery_at","last_success_at","created_at","secret"],"additionalProperties":false},"WebhookEndpointDeleted":{"type":"object","properties":{"id":{"type":"string","description":"The deleted endpoint (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","description":"The delivery id, also sent as `X-Relay-Delivery` (`dlv_…`).","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event_id":{"type":"string","description":"The body's `id`: your dedup key, kept by a redelivery (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"endpoint_id":{"type":"string","description":"The endpoint (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","description":"The event name (`message.received`, …, or `webhook.test`)."},"status":{"type":"string","enum":["pending","succeeded","failed"],"description":"pending (being attempted) · succeeded · failed (24 h of retries ran out, a final 4xx, or a refused destination)."},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_attempt_at":{"description":"The next retry. ISO 8601, UTC.","type":["string","null"]},"last_attempt_at":{"description":"The last attempt. ISO 8601, UTC.","type":["string","null"]},"give_up_at":{"description":"Retries stop at this instant. ISO 8601, UTC.","type":["string","null"]},"response_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Your endpoint's last HTTP status."},"error_code":{"description":"Why the last attempt failed: `http_<status>`, `timeout`, `network_error`, `destination_not_public` (the host resolved to a private, loopback or link-local address; not retried), `invalid_url` (not retried), …","type":["string","null"]},"delivered_at":{"description":"When your endpoint answered 2xx. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the event was emitted. ISO 8601, UTC.","type":["string","null"]}},"required":["id","event_id","endpoint_id","event","status","attempts","next_attempt_at","last_attempt_at","give_up_at","response_code","error_code","delivered_at","created_at"],"additionalProperties":false,"description":"One event sent to one endpoint, with its attempts."},"WebhookDeliveryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of deliveries, newest first."},"WebhookDeliveryDetail":{"type":"object","properties":{"id":{"type":"string","description":"The delivery id, also sent as `X-Relay-Delivery` (`dlv_…`).","example":"dlv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event_id":{"type":"string","description":"The body's `id`: your dedup key, kept by a redelivery (`evt_…`).","example":"evt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"endpoint_id":{"type":"string","description":"The endpoint (`whk_…`).","example":"whk_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"event":{"type":"string","description":"The event name (`message.received`, …, or `webhook.test`)."},"status":{"type":"string","enum":["pending","succeeded","failed"],"description":"pending (being attempted) · succeeded · failed (24 h of retries ran out, a final 4xx, or a refused destination)."},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"next_attempt_at":{"description":"The next retry. ISO 8601, UTC.","type":["string","null"]},"last_attempt_at":{"description":"The last attempt. ISO 8601, UTC.","type":["string","null"]},"give_up_at":{"description":"Retries stop at this instant. ISO 8601, UTC.","type":["string","null"]},"response_code":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Your endpoint's last HTTP status."},"error_code":{"description":"Why the last attempt failed: `http_<status>`, `timeout`, `network_error`, `destination_not_public` (the host resolved to a private, loopback or link-local address; not retried), `invalid_url` (not retried), …","type":["string","null"]},"delivered_at":{"description":"When your endpoint answered 2xx. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the event was emitted. ISO 8601, UTC.","type":["string","null"]},"response_body":{"description":"Your endpoint's last answer, truncated.","type":["string","null"]},"request_body":{"type":"string","description":"The exact JSON body POSTed on every attempt."}},"required":["id","event_id","endpoint_id","event","status","attempts","next_attempt_at","last_attempt_at","give_up_at","response_code","error_code","delivered_at","created_at","response_body","request_body"],"additionalProperties":false},"ConversationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationOutput"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of conversations."},"ConversationNoteList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationNote"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"The conversation's notes."},"ConversationNote":{"type":"object","properties":{"id":{"type":"string","description":"The note id (`note_…`).","example":"note_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"conversation_id":{"type":"string","description":"The conversation (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"author_id":{"type":"string","description":"The member who wrote it (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"body":{"type":"string","description":"Internal text, never sent to WhatsApp. A mention is a `<@mem_…>` token."},"mentioned_member_ids":{"type":"array","items":{"type":"string","description":"A mentioned member (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"created_at":{"description":"When it was written. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When it was last edited. ISO 8601, UTC.","type":["string","null"]}},"required":["id","conversation_id","author_id","body","mentioned_member_ids","created_at","updated_at"],"additionalProperties":false,"description":"A private note of the team on a conversation. The `conversation.note` webhook names it; its body is read here."},"CustomerList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerOutput"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of customers."},"TagList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of tags."},"Tag":{"type":"object","properties":{"id":{"type":"string","description":"The tag id (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"name":{"type":"string","description":"Unique per organization, case-insensitive."},"color":{"description":"#rrggbb.","type":["string","null"]},"created_at":{"description":"When it was created. ISO 8601, UTC.","type":["string","null"]}},"required":["id","name","color","created_at"],"additionalProperties":false,"description":"A label for conversations and customers, shared by the whole organization."},"MemberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of members."},"Member":{"type":"object","properties":{"id":{"type":"string","description":"The member id (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","description":"owner · admin · member (an agent: reaches only the numbers granted to them or their teams)."},"availability":{"type":"string","enum":["online","away","offline"]},"team_ids":{"type":"array","items":{"type":"string","description":"A team the member belongs to (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"created_at":{"description":"When they joined. ISO 8601, UTC.","type":["string","null"]}},"required":["id","name","email","role","availability","team_ids","created_at"],"additionalProperties":false,"description":"A member of the organization's team, for assignment and note authorship."},"ApiKeyInfo":{"type":"object","properties":{"id":{"type":"string","description":"The key (`key_…`).","example":"key_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"name":{"type":"string"},"prefix":{"type":"string","description":"The key's displayable head (`rl_live_ab12…`)."},"scopes":{"type":"array","items":{"type":"string","enum":["read","send","admin"]}},"rate_limit_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"This key's sustained limit (its own, else the plan's)."},"expires_at":{"description":"When the key stops working; null = never. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the key was created. ISO 8601, UTC.","type":["string","null"]},"organization":{"type":"object","properties":{"id":{"type":"string","description":"The organization the key acts for (`org_…`).","example":"org_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"plan":{"$ref":"#/components/schemas/Plan"}},"required":["id","name","prefix","scopes","rate_limit_per_minute","expires_at","created_at","organization","plan"],"additionalProperties":false,"description":"The calling key: what it may do and the organization it belongs to."},"Plan":{"type":"object","properties":{"code":{"type":"string","description":"free · starter · growth · business."},"name":{"type":"string"},"bundled_numbers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthly_api_quota":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthly_send_quota":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"api_rate_limit_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","name","bundled_numbers","monthly_api_quota","monthly_send_quota","api_rate_limit_per_minute"],"additionalProperties":false,"description":"The organization's current plan and its limits."},"Usage":{"type":"object","properties":{"period_start":{"description":"The first instant of the month counted. ISO 8601, UTC.","type":["string","null"]},"resets_at":{"description":"When the monthly counters restart (the 1st, UTC). ISO 8601, UTC.","type":["string","null"]},"api_requests":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["used","limit"],"additionalProperties":false},"messages_sent":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["used","limit"],"additionalProperties":false},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/NumberUsage"}}},"required":["period_start","resets_at","api_requests","messages_sent","numbers"],"additionalProperties":false,"description":"The organization's usage against its plan: this month's API requests and sends, and each live number's sends today."},"NumberUsage":{"type":"object","properties":{"number_id":{"type":"string","description":"The number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"messages_sent_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daily_send_cap":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Today's cap (the new-number ramp, then the steady cap)."},"first_contacts_today":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Messages sent today to people who never wrote to the number."},"first_contact_daily_cap":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["number_id","messages_sent_today","daily_send_cap","first_contacts_today","first_contact_daily_cap"],"additionalProperties":false,"description":"One number's sends today (UTC)."},"BoardList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Board"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of boards."},"Board":{"type":"object","properties":{"id":{"type":"string","description":"The board id (`brd_…`).","example":"brd_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"name":{"type":"string"},"slug":{"type":"string","description":"Its address on the shared host: `feedback.relayhelpdesk.com/<slug>`."},"state":{"type":"string","enum":["on","off"]},"public_url":{"description":"Where people open it: the custom domain once active, else the shared address.","type":["string","null"]},"created_at":{"description":"When it was created. ISO 8601, UTC.","type":["string","null"]}},"required":["id","name","slug","state","public_url","created_at"],"additionalProperties":false,"description":"A feedback board: your app's signed-in users post bugs and feature requests, vote and comment."},"BoardPostList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BoardPostOutput"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of posts."},"BoardUserErased":{"type":"object","properties":{"erased":{"type":"boolean","description":"False when the person was already gone."}},"required":["erased"],"additionalProperties":false},"Company":{"type":"object","properties":{"id":{"type":"string","description":"The company id (`co_…`).","example":"co_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"app_id":{"type":"string","description":"Its app (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"external_id":{"type":"string","description":"Your app's own id for it."},"name":{"type":["string","null"]},"plan":{"type":["string","null"]},"currency":{"type":["string","null"]},"country":{"type":["string","null"]},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},"description":"Up to 50 snake_case keys; values are strings, numbers, booleans or string lists. Any other key or value is dropped."},"created_at":{"description":"When your app says it was created. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When relay last changed it. ISO 8601, UTC.","type":["string","null"]}},"required":["id","app_id","external_id","name","plan","currency","country","attributes","created_at","updated_at"],"additionalProperties":false,"description":"An organization of your app's own customers (a workspace, an account)."},"AppUserErased":{"type":"object","properties":{"erased":{"type":"boolean","description":"False when the person was already gone."}},"required":["erased"],"additionalProperties":false},"NewsItemList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NewsItemRead"}},"has_more":{"type":"boolean"},"next_cursor":{"description":"Pass as `cursor` to read the next page; null on the last page.","type":["string","null"]}},"required":["data","has_more","next_cursor"],"additionalProperties":false,"description":"A page of news items."},"NewsItemRead":{"type":"object","properties":{"id":{"type":"string","description":"The news item id (`news_…`).","example":"news_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"app_id":{"type":"string","description":"The app whose Messenger shows it (`app_…`).","example":"app_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"state":{"type":"string","enum":["draft","scheduled","published","archived"]},"label":{"type":"string","enum":["new_feature","improvement","fix","announcement"]},"delivery":{"type":"string","enum":["feed","open_once"],"description":"`open_once` opens it by itself on each reader's next visit; `feed` only lists it."},"audience":{"type":"string","enum":["everyone","users","visitors"],"description":"Who reads it: everyone, signed-in users only or visitors only."},"company_plans":{"type":"array","items":{"type":"string"},"description":"When set, only people whose company is on one of these plans read it."},"button_url":{"description":"A path on your app or an https:// address the button opens.","type":["string","null"]},"has_cover":{"type":"boolean"},"locales":{"type":"array","items":{"type":"object","properties":{"locale":{"type":"string","enum":["fr","en","ar"]},"title":{"type":"string"},"body":{"type":"string","description":"Light Markdown: **bold**, *italic*, ## headings and links."},"button_label":{"type":["string","null"]}},"required":["locale","title","body","button_label"],"additionalProperties":false},"description":"Its words per language; a reader whose language is missing gets the Messenger's default one."},"publish_at":{"anyOf":[{"description":"When a scheduled item publishes itself. ISO 8601, UTC.","type":["string","null"]},{"type":"null"}]},"published_at":{"anyOf":[{"description":"When it was published. ISO 8601, UTC.","type":["string","null"]},{"type":"null"}]},"created_at":{"description":"When it was created. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When it last changed. ISO 8601, UTC.","type":["string","null"]},"cover_url":{"description":"A signed address valid for 5 minutes; fetch it again rather than storing it.","type":["string","null"]}},"required":["id","app_id","state","label","delivery","audience","company_plans","button_url","has_cover","locales","publish_at","published_at","created_at","updated_at","cover_url"],"additionalProperties":false},"HelpCatalog":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The catalog version, also the `ETag`: it moves on every change that alters the catalog."},"default_locale":{"type":"string","enum":["fr","en","ar"]},"languages":{"type":"array","items":{"type":"string","enum":["fr","en","ar"]}},"topics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"labels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Words per language (`fr`, `en`, `ar`); a missing language has none."},"icon":{"type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["key","labels","icon","position"],"additionalProperties":false}},"groups":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"key":{"type":"string"},"labels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Words per language (`fr`, `en`, `ar`); a missing language has none."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["topic","key","labels","position"],"additionalProperties":false}},"items":{"type":"array","items":{"$ref":"#/components/schemas/HelpItem"}},"courses":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Words per language (`fr`, `en`, `ar`); a missing language has none."},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"type":"string"},"description":"Item keys, in order."}},"required":["key","title","position","items"],"additionalProperties":false}}},"required":["version","default_locale","languages","topics","groups","items","courses"],"additionalProperties":false,"description":"The whole published catalog of an app's help center for one platform."},"HelpItem":{"type":"object","properties":{"id":{"type":"string","description":"The help item id (`hitem_…`).","example":"hitem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"key":{"type":"string","description":"`<prefix>.<action>`, fixed once published: the public URL `/{lang}/videos/{key}`."},"topic":{"type":"string","description":"Its topic's key."},"group":{"type":"string","description":"Its group's key."},"kind":{"type":"string","enum":["video","article"]},"size":{"type":"string","enum":["micro","standard","walkthrough","course"]},"status":{"type":"string","enum":["draft","published","retired"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tags":{"type":"array","items":{"type":"string"},"description":"Empty = everyone; else a viewer carrying any of them."},"host_key":{"description":"Your app's own key for it, when set.","type":["string","null"]},"legacy_ids":{"type":"array","items":{"type":"string"}},"locales":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"title":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"at":{"type":"number","description":"Seconds into the video."},"label":{"type":"string"},"text":{"description":"The step's longer text, shown in the article.","type":["string","null"]}},"required":["at","label"],"additionalProperties":false}},"synonyms":{"type":"array","items":{"type":"string"}},"blocks":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"One article block, by `type`: `summary` {text}, `steps` (the locale's steps), `tip` {tone: info|warning, text}, `text` {markdown}, `image` {image_key, caption, image_url on single-item reads}, `video` {item_key}, `app_link` {label, path}."}}},"required":["title","steps","synonyms","blocks"],"additionalProperties":false},"description":"Every complete language the help center serves."},"renders":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."},"locale":{"type":"string","enum":["fr","en","ar"]},"provider":{"type":"string","enum":["youtube"]},"external_id":{"type":"string","description":"The YouTube video id."},"duration_s":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"check":{"anyOf":[{"type":"string","enum":["ok","not_embeddable","removed"]},{"type":"null"}],"description":"The nightly check: `ok`, `not_embeddable` or `removed`; null = not checked yet. A failed render stays listed: show its steps instead of a player."},"checked_at":{"description":"When it was last checked. ISO 8601, UTC.","type":["string","null"]},"fallback":{"type":"boolean","description":"True when the web render stands in for a missing render of the asked platform."}},"required":["platform","locale","provider","external_id","duration_s","width","height","check","checked_at","fallback"],"additionalProperties":false},"description":"Per language, the asked platform's render or the web one standing in."},"placements":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."},"surface":{"type":"string","description":"A route pattern (`/properties/[slug]/edit`); `*` = any screen."},"spot":{"description":"null = the screen's own help menu only.","type":["string","null"]},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["platform","surface","spot","position"],"additionalProperties":false},"description":"Where your app shows it on the asked platform."},"published_at":{"description":"When it was first published. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When it last changed. ISO 8601, UTC.","type":["string","null"]}},"required":["id","key","topic","group","kind","size","status","position","tags","host_key","legacy_ids","locales","renders","placements","published_at","updated_at"],"additionalProperties":false,"description":"A published help video or article with everything your app needs to show it."},"HelpSearchResult":{"type":"object","properties":{"query":{"type":"string","description":"The words as searched (folded)."},"locale":{"type":"string","enum":["fr","en","ar"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/HelpCard"}}},"required":["query","locale","data"],"additionalProperties":false},"HelpCard":{"type":"object","properties":{"id":{"type":"string","description":"The help item id (`hitem_…`).","example":"hitem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"key":{"type":"string"},"kind":{"type":"string","enum":["video","article"]},"size":{"type":"string","enum":["micro","standard","walkthrough","course"]},"topic":{"type":"string"},"group":{"type":"string"},"locale":{"type":"string","enum":["fr","en","ar"],"description":"The language its title is in."},"title":{"type":"string"},"duration_s":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"external_id":{"type":["string","null"]},"playable":{"type":"boolean","description":"False when its render failed the nightly check (show its steps instead)."},"tags":{"type":"array","items":{"type":"string"}}},"required":["id","key","kind","size","topic","group","locale","title","duration_s","external_id","playable","tags"],"additionalProperties":false,"description":"A help item as a search result."},"HelpSpotsReplaced":{"type":"object","properties":{"platform":{"type":"string","enum":["web","mobile"],"description":"`web` or `mobile`."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Distinct spots registered."}},"required":["platform","count"],"additionalProperties":false},"HelpFeedbackRecorded":{"type":"object","properties":{"id":{"type":"string","description":"The feedback id (`hfb_…`).","example":"hfb_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"required":["id"],"additionalProperties":false},"HelpProgressList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HelpProgress"}}},"required":["data"],"additionalProperties":false},"HelpProgress":{"type":"object","properties":{"item":{"type":"string","description":"The item's key."},"position_s":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Where the viewer stopped, in seconds."},"max_pct":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The furthest share watched, 0 to 100; it never goes back."},"watched_at":{"description":"When it was first watched through (90 %); null = not yet. ISO 8601, UTC.","type":["string","null"]},"last_seen_at":{"description":"When the viewer last played it. ISO 8601, UTC.","type":["string","null"]}},"required":["item","position_s","max_pct","watched_at","last_seen_at"],"additionalProperties":false},"HelpPreferences":{"type":"object","properties":{"chips":{"type":"boolean","description":"Show the help chips on screens."},"empty_videos":{"type":"boolean","description":"Show a video in empty states."}},"required":["chips","empty_videos"],"additionalProperties":false},"MessageOutput":{"type":"object","properties":{"id":{"type":"string","description":"The message id (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"The number that sent or received it (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The conversation (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_type":{"type":"string","enum":["dm","group"]},"chat_jid":{"type":"string","description":"WhatsApp's id of the conversation."},"wa_message_id":{"description":"WhatsApp's own message id (unique within its chat), set once the message left; null while `pending`. A call entry carries WhatsApp's call id.","type":["string","null"]},"from_me":{"type":"boolean"},"sender":{"anyOf":[{"$ref":"#/components/schemas/MessageSenderOutput"},{"type":"null"}]},"type":{"type":"string","enum":["text","image","video","audio","voice","document","sticker","location","contact","poll","system","unsupported"]},"body":{"description":"The text, or a media caption; null once revoked.","type":["string","null"]},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Type-specific fields (location, contact card, poll options); null once revoked and for a call entry. A `text` message whose sender's phone attached a link preview carries `link`: `{ url, matched_text, title, description }` (an http(s) `url`; the others may be null; no thumbnail). An edit drops the preview."},"call":{"anyOf":[{"$ref":"#/components/schemas/MessageCallOutput"},{"type":"null"}],"description":"Set on a `system` message that records a call; null on every other message."},"media":{"anyOf":[{"$ref":"#/components/schemas/MessageMediaOutput"},{"type":"null"}]},"transcript":{"description":"A voice note's words, in the language spoken; null until `transcript_status` is `done`, when nothing intelligible was said, and once revoked.","type":["string","null"]},"transcript_language":{"description":"The spoken language of `transcript` (ISO 639 code, `ary` for Moroccan Darija).","type":["string","null"]},"transcript_status":{"anyOf":[{"type":"string","enum":["pending","done","failed","too_long","no_allowance"]},{"type":"null"}],"description":"null when the message is not transcribed (not a voice note, AI off on the number, or an outgoing, group or imported note no one transcribed from the inbox) · pending (being transcribed) · done · failed · too_long (over 5 minutes or 12 MB) · no_allowance (the plan's AI replies are used up)."},"quoted_message_id":{"anyOf":[{"type":"string","description":"The message replied to (`msg_…`).","example":"msg_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"quoted_wa_message_id":{"type":["string","null"]},"mentioned_jids":{"type":"array","items":{"type":"string"}},"is_forwarded":{"type":"boolean"},"is_view_once":{"type":"boolean"},"status":{"type":"string","enum":["pending","sent","delivered","read","failed"],"description":"pending → sent → delivered → read, or failed. Only moves forward."},"error_code":{"description":"Why a send failed (status `failed`).","type":["string","null"]},"source":{"type":"string","enum":["inbox","api","live","catch_up","history","ai","automation","api_automated"],"description":"api (sent with this API) · inbox (sent from the web inbox) · live / catch_up / history (received or synced from the phone)."},"client_key":{"description":"The `Idempotency-Key` the message was sent with.","type":["string","null"]},"conversation_id":{"anyOf":[{"type":"string","description":"The support conversation it belongs to; null for history imports and messages outside one (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"sent_at":{"description":"When it was sent or received. ISO 8601, UTC.","type":["string","null"]},"edited_at":{"description":"When it was last edited. ISO 8601, UTC.","type":["string","null"]},"revoked_at":{"description":"When it was deleted for everyone. ISO 8601, UTC.","type":["string","null"]}},"required":["id","number_id","chat_id","chat_type","chat_jid","wa_message_id","from_me","sender","type","body","content","call","media","transcript","transcript_language","transcript_status","quoted_message_id","quoted_wa_message_id","mentioned_jids","is_forwarded","is_view_once","status","error_code","source","client_key","conversation_id","sent_at","edited_at","revoked_at"],"additionalProperties":false,"description":"A message, sent or received. The same object is the `data` of the `message.received`, `message.sent`, `message.edited`, `message.transcribed` and `call.missed` webhooks."},"MessageSenderOutput":{"type":"object","properties":{"jid":{"type":"string","description":"WhatsApp's id of the author (canonical form)."},"phone":{"description":"E.164, when WhatsApp exposes it (null for a privacy id).","type":["string","null"]},"name":{"description":"The saved name, else the author's own profile name.","type":["string","null"]},"contact_id":{"anyOf":[{"type":"string","description":"The author's contact (`ct_…`).","example":"ct_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]}},"required":["jid","phone","name","contact_id"],"additionalProperties":false,"description":"Who wrote the message; null for a system message."},"MessageCallOutput":{"type":"object","properties":{"status":{"type":"string","enum":["ringing","answered","missed","declined"],"description":"ringing (it is ringing now) · answered (picked up on the phone) · missed (nobody answered) · declined (rejected by the number's call handling). ringing moves once, to one of the three others."},"is_video":{"type":"boolean"},"answered_at":{"description":"When it was picked up on the phone. ISO 8601, UTC.","type":["string","null"]},"ended_at":{"description":"When it stopped ringing or, once answered, when it ended. ISO 8601, UTC.","type":["string","null"]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long an answered call lasted, once it ended."}},"required":["status","is_video","answered_at","ended_at","duration_seconds"],"additionalProperties":false,"description":"A WhatsApp call to the number, recorded as a `system` message. Calls are seen, never carried: answer them on the phone."},"MessageMediaOutput":{"type":"object","properties":{"id":{"type":"string","description":"The attachment id: download it with `GET /media/{id}` (`media_…`).","example":"media_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"state":{"type":"string","enum":["pending","stored","expired","failed"],"description":"pending (still downloading from WhatsApp) · stored (downloadable) · expired (past the plan's retention) · failed (WhatsApp no longer serves it)."},"mime":{"type":["string","null"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"file_name":{"type":["string","null"]},"duration_seconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":["string","null"]}},"required":["id","state","mime","size_bytes","file_name","duration_seconds","width","height","sha256"],"additionalProperties":false,"description":"A message's attachment, stored in our private bucket."},"ConversationOutput":{"type":"object","properties":{"id":{"type":"string","description":"The conversation id (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"channel":{"type":"string","enum":["whatsapp","board","messenger"],"description":"The channel it arrived on; `whatsapp` for every conversation this API lists today."},"source":{"$ref":"#/components/schemas/ConversationSourceOutput"},"number_id":{"type":"string","description":"The number it runs on (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"chat_id":{"type":"string","description":"The WhatsApp chat it is an episode of (`chat_…`).","example":"chat_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"customer_id":{"anyOf":[{"type":"string","description":"The customer (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"status":{"type":"string","enum":["open","pending","snoozed","resolved"],"description":"open · pending · snoozed (until `snoozed_until`) · resolved."},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"mode":{"type":"string","enum":["human","ai","bot"],"description":"human (agents) · ai (relay's AI agent) · bot (your own bot, through this API and the webhooks)."},"assignee_id":{"anyOf":[{"type":"string","description":"The assigned member (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"team_id":{"anyOf":[{"type":"string","description":"The team (`team_…`).","example":"team_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"tag_ids":{"type":"array","items":{"type":"string","description":"A tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"opened_at":{"description":"When the episode opened. ISO 8601, UTC.","type":["string","null"]},"reopened_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"waiting_since":{"description":"Since when the customer waits on a reply; null when not waiting. ISO 8601, UTC.","type":["string","null"]},"first_response_at":{"description":"The first reply to the customer. ISO 8601, UTC.","type":["string","null"]},"snoozed_until":{"description":"When a snoozed conversation wakes up. ISO 8601, UTC.","type":["string","null"]},"resolved_at":{"description":"When it was resolved. ISO 8601, UTC.","type":["string","null"]},"resolved_by":{"anyOf":[{"type":"string","enum":["agent","ai","automation","api"]},{"type":"null"}]},"sla_state":{"anyOf":[{"type":"string","enum":["on_time","due_soon","breached"]},{"type":"null"}],"description":"null when no SLA policy applies."}},"required":["id","channel","source","number_id","chat_id","customer_id","status","priority","mode","assignee_id","team_id","tag_ids","opened_at","reopened_count","waiting_since","first_response_at","snoozed_until","resolved_at","resolved_by","sla_state"],"additionalProperties":false,"description":"A support episode over a chat: at most one is open per chat at a time. The same object is the `data` of the `conversation.opened`, `conversation.assigned` and `conversation.status` webhooks."},"ConversationSourceOutput":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["whatsapp_number","app"],"description":"whatsapp_number · app."},"id":{"type":"string","description":"The public id of the number (`num_…`) or the app (`app_…`) it came through."}},"required":["kind","id"],"additionalProperties":false},{"type":"null"}],"description":"Where the conversation comes from: the same as `number_id` for a WhatsApp conversation."},"CustomerOutput":{"type":"object","properties":{"id":{"type":"string","description":"The customer id (`cus_…`).","example":"cus_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"display_name":{"type":["string","null"]},"phone":{"description":"E.164; null while WhatsApp exposes only a privacy id.","type":["string","null"]},"email":{"type":["string","null"]},"language":{"description":"ISO 639-1.","type":["string","null"]},"lifecycle_stage":{"type":"string","enum":["lead","customer"]},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values of the organization's custom attributes, by key."},"tag_ids":{"type":"array","items":{"type":"string","description":"A tag (`tag_…`).","example":"tag_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The per-number contact (`ct_…`).","example":"ct_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"number_id":{"type":"string","description":"Its number (`num_…`).","example":"num_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"}},"required":["id","number_id"],"additionalProperties":false},"description":"The person on each of your numbers."},"blocked_at":{"description":"Blocked: their messages open no conversation and nothing automated is sent. ISO 8601, UTC.","type":["string","null"]},"opted_out_at":{"description":"Opted out of marketing (your own records; replies inside a conversation they started are not marketing). ISO 8601, UTC.","type":["string","null"]},"last_message_at":{"description":"Their latest message on any number. ISO 8601, UTC.","type":["string","null"]},"created_at":{"description":"When the customer was created. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When the profile last changed. ISO 8601, UTC.","type":["string","null"]}},"required":["id","display_name","phone","email","language","lifecycle_stage","attributes","tag_ids","contacts","blocked_at","opted_out_at","last_message_at","created_at","updated_at"],"additionalProperties":false,"description":"One person across the organization's numbers. The same object is the `data` of the `customer.updated` webhook."},"BoardPostOutput":{"type":"object","properties":{"id":{"type":"string","description":"The post id (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"board_id":{"type":"string","description":"Its board (`brd_…`).","example":"brd_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"title":{"type":"string","description":"Empty once its author deleted it."},"body":{"type":"string"},"status":{"type":"string","enum":["under_review","planned","in_progress","completed","closed"]},"moderation":{"type":"string","enum":["visible","pending","hidden"]},"category":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["bug","feature_request"]}},"required":["name","kind"],"additionalProperties":false},"vote_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"comment_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"merged_into_id":{"anyOf":[{"type":"string","description":"The post it was merged into (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The author on this board (`buser_…`).","example":"buser_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"subject":{"type":"string","description":"Your app's own user id (the token's `sub`)."}},"required":["id","subject"],"additionalProperties":false},{"type":"null"}],"description":"Null once your app erased its user."},"conversation_id":{"anyOf":[{"type":"string","description":"Its support conversation in the inbox (`cnv_…`).","example":"cnv_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"deleted":{"type":"boolean"},"created_at":{"description":"When it was posted. ISO 8601, UTC.","type":["string","null"]},"updated_at":{"description":"When it last changed. ISO 8601, UTC.","type":["string","null"]}},"required":["id","board_id","title","body","status","moderation","category","vote_count","comment_count","merged_into_id","author","conversation_id","deleted","created_at","updated_at"],"additionalProperties":false,"description":"A post on a board. The same object is the `data` of the `board.post.created` and `board.post.status` webhooks."},"BoardCommentOutput":{"type":"object","properties":{"id":{"type":"string","description":"The comment id (`bcmt_…`).","example":"bcmt_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"post_id":{"type":"string","description":"Its post (`bpost_…`).","example":"bpost_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"body":{"type":"string"},"is_team":{"type":"boolean","description":"Written by a member for the team."},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The author on this board (`buser_…`).","example":"buser_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},"subject":{"type":"string"}},"required":["id","subject"],"additionalProperties":false},{"type":"null"}]},"member_id":{"anyOf":[{"type":"string","description":"The member who answered for the team (`mem_…`).","example":"mem_0193a4f2c1d87b3e9f4a2b6c8d0e1f23"},{"type":"null"}]},"deleted":{"type":"boolean"},"created_at":{"description":"When it was written. ISO 8601, UTC.","type":["string","null"]}},"required":["id","post_id","body","is_team","author","member_id","deleted","created_at"],"additionalProperties":false,"description":"A comment on a post. The same object is the `data` of the `board.comment.created` webhook."}},"responses":{"BadRequest":{"description":"Malformed request: invalid JSON, a bad cursor, or a missing / invalid `Idempotency-Key`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unauthorized":{"description":"Missing, unknown, revoked or expired API key (`unauthorized`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Forbidden":{"description":"The key lacks the endpoint's scope (`insufficient_scope`), or sending is paused for the organization (`sends_blocked`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"No such resource in this organization (`<resource>_not_found`). An id of another organization or with the wrong prefix reads the same.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unprocessable":{"description":"Invalid fields (`validation_failed` with `errors`), a domain refusal (e.g. `invalid_phone`), or an `Idempotency-Key` reused for another request (`idempotency_key_reused`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"TooManyRequests":{"description":"Rate limit (`rate_limited`), monthly API or send quota (`quota_exceeded`), or a per-number daily cap (`send_cap_reached`, `recipient_never_wrote`). Honor `Retry-After` when present.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Conflict":{"description":"The resource's state refuses the request (e.g. `number_not_working`), or the same `Idempotency-Key` is still in flight (`idempotency_key_in_use`).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"GatewayError":{"description":"WhatsApp did not answer an in-request call (`gateway_<reason>`): retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Unavailable":{"description":"The request was saved but could not be queued (`enqueue_failed`): retry with the same `Idempotency-Key`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"An organization API key: `Authorization: Bearer rl_live_…`."}}}}