{"openapi":"3.1.0","info":{"title":"Mapier API","description":"The Mapier gateway: the surface a customer’s agent codes against.\n\nAuthenticate with a project API key as a bearer token. A key names one project **and one\nenvironment** — `mp_live_…` reaches real handsets, `mp_test_…` reaches the sandbox — and the\ntwo see none of each other’s data. Both take exactly these routes: only the transport behind\nthem differs, which is the whole point of having a test mode.\n\nOne route takes no key and reads no `x-mapier-version`: `GET /v1/public/channel-availability`,\nwhich channels are on for everyone.\n\nThere is no browser CORS on this surface and there never will be. A key belongs in a server,\nand an API that answered a preflight would be an invitation to put one in a page.\n\nEvery refusal is `{\"error\": {\"code\", \"message\", \"details\"?}}`. Switch on `code`; it is a\nclosed set and each value maps to exactly one status. Never parse `message`.\n\nBodies are capped at 64 KiB. `message.send` sends media by link on an iMessage line (live only), a WhatsApp line (live or test), a Telegram line (live only), a Discord line (live only), a Slack line (live only) and a Messenger line (live only): `kind: \"media\"` with an https `url` and an optional `caption`. On an iMessage line a photo or file goes only into an existing conversation — a 422 with `reason: conversation_not_confirmed` into any other, and carries no `caption` (a 422 at `payload.caption`). On a Messenger line a photo or file carries no `caption` (a 422 at `payload.caption`). A payload whose `attachments` or `media` is not empty is refused with a 422 naming the field, rather than sent as its text alone.\n\nEvery route reads `x-mapier-version`. Omit it and you get your project’s default: the\nnewest version dated on or before the day the project’s first API key was created, so rotating\na key or moving from test to live changes nothing under a deployed integration —\n`2026-09-01` for a project that had a key before every boundary. A new project\ndefaults to whatever is newest on the day of its first key, so pin a version when you start, and\nbefore you point an existing integration at a new project: `2026-12-01` is the newest.\nEach operation’s parameter says what differs.\n\nA command that fails after its 202 — a `command` frame on the stream, a `message.failed` or\n`command.settled` webhook — carries the transport’s `errorCode` verbatim and a `failureClass`\nbeside it from a closed set. Switch on the class; quote the code.\n\n**Rate limits**\n\n- `POST /v1/commands/{type}`, its `/check`, and `GET /v1/commands/{commandId}` — 600 requests per 60s, per project and environment: every key of the project spends one budget, and live and test have one each. That is the default; a project may carry a ceiling of its own, which `GET /v1/whoami` reports as `limits.commandsPerMinute`.\n- `POST /v1/handle-check`, and `GET /v1/reachability` with `registered=true` — 30 requests per 60s, per key.\n- `GET /v1/attachments/{id}` — 120 requests per 60s, per key.\n- `GET /v1/response_stream` — 10 connects per 60s, per key.\n- `GET /v1/conversations`, `GET /v1/conversations/{conversationId}` and its `/messages` — 120 requests per 60s, per key.\n- `GET /v1/lines/available` — 120 requests per 60s, per key.\n- `GET /v1/lines/{lineId}/health` and `GET /v1/lines/{lineId}/reputation` — 60 requests per 60s, per key.\n- `GET /v1/reachability` — 120 requests per 60s, per key.\n- `GET /v1/lines/{lineId}/templates` — 30 requests per 60s, per key.\n- `GET /v1/events` — 120 requests per 60s, per key.\n- `GET /v1/contacts/{contactId}`, `GET /v1/people/{personId}` and `POST /v1/contacts/{contactId}/consent` — 120 requests per 60s, per key.\n- `GET /v1/capabilities` — 120 requests per 60s, per key.\n- `POST /v1/line-setups`, its `/checks` and `/cancel`, and `GET /v1/line-setups/{setupId}` — 30 requests per 60s, per key.\n- `GET /v1/messages/{messageId}/receipts` — 60 requests per 60s, per key.\n- `POST /v1/conversation-lookup` — 30 requests per 60s, per key.\n- `GET /v1/projects`, `GET /v1/projects/{projectId}`, `GET /v1/members` and `GET /v1/audit-logs` (personal access tokens) — 120 requests per 60s, per person: every personal access token of one person spends one budget.\n- `GET /v1/webhook-endpoints`, `POST /v1/webhook-endpoints`, `GET /v1/webhook-endpoints/{endpointId}`, `PATCH /v1/webhook-endpoints/{endpointId}`, `DELETE /v1/webhook-endpoints/{endpointId}`, `POST /v1/webhook-endpoints/{endpointId}/rotate-secret` and `GET /v1/webhook-endpoints/{endpointId}/deliveries` (personal access tokens) — 60 requests per 60s, per person: every personal access token of one person spends one budget.\n- `POST /v1/cli/logins` (no credential) — 10 requests per 60s, per address: the caller holds no credential yet.\n- `POST /v1/cli/logins/token` (no credential) — 120 requests per 60s, per address: the caller holds no credential yet.\n- `POST /v1/cli/tokens/renew` (a refresh token, no bearer) — 60 requests per 60s, per address: the caller holds no credential yet.\n- `POST /v1/cli/tokens/revoke` (a refresh token, no bearer) — 10 requests per 60s, per address: the caller holds no credential yet.\n- `POST /v1/personal-tokens/current/revoke` (personal access tokens) — 10 requests per 60s, per person: every personal access token of one person spends one budget.\n- `GET /v1/response_stream` — 4 open at once, per key; more may be refused.\n\nFailed authentication is counted separately, per calling address, so one bad key cannot\nspend a working customer’s budget.\n\nThe console API (`/console/*`) is a different surface with a different principal and is\ndeliberately not described here.","version":"2.151.0"},"servers":[{"url":"https://api.mapier.ai","description":"The gateway."}],"tags":[{"name":"Commands","description":"Doing something to a conversation."},{"name":"Messages","description":"Reading what became of one."},{"name":"People","description":"Who you are writing to, and whether they asked you to stop."},{"name":"Project","description":"What this key is, and who it can reach."},{"name":"Lines","description":"Adding a line, with a person finishing what only they can."},{"name":"Stream","description":"Everything, as it happens."},{"name":"Organization","description":"Your organization’s projects, members and audit log, with a personal access token."},{"name":"Webhooks","description":"Where a project’s events are sent, with a personal access token."},{"name":"Sign-in","description":"Signing in from a terminal, and out again, with a personal access token."}],"components":{"schemas":{"V1MessageFrame":{"type":"object","properties":{"conversationId":{"type":"string","description":"The thread this arrived on. Send back to it with this id."},"from":{"type":"string","description":"The contact’s address, normalised — never one of your own lines."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null for a message that carried no text — attachments alone, for one. On iMessage it is also null, among others, for the message a chat background change leaves in a conversation with one person on a line whose device predates the `chat_background` frame, which `sendCommand` describes, and for a poll’s own row that reached this platform before the poll’s moment, which the `polls` option of `/v1/response_stream` describes."},"externalId":{"type":"string","deprecated":true,"description":"Deprecated: read `platformMessageId` instead, which carries the same value; this field stays and is never removed. The transport’s own id for this message, or our `messageId` when it supplied none."},"replyToExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The message being replied to. Unlike `externalId` this is always OUR message id, never the transport’s: the `messageId` of that message’s own `message` frame when the contact sent it, and the `messageId` its `command` frame carried when you did. Null when the message is not a reply, or when it replies to a message this platform does not hold."},"occurredAt":{"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":"When the transport says it happened, which is not when you received this frame."},"attachmentIds":{"type":"array","items":{"type":"string"},"description":"Fetch each with `GET /v1/attachments/{id}`. Always empty in test mode."},"platformMessageId":{"description":"The channel’s own id for this message — on a test line, the simulated device’s — so you can correlate with anything you already hold, and name the message by it in a later command, such as `reaction.set`. It falls back to our `messageId` only when the channel supplied none, since an empty string here would be a frame you cannot correlate at all. Reply by `messageId`, not by this. `externalId` carries the same value; absent only on an answer from before the field.","type":"string"},"messageId":{"type":"string","description":"Our id for this message. Reply to it by naming this at `target.replyToMessageId`, and match a later message’s `replyToExternalId` against it."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"channel":{"description":"The channel the message is on — the `channel` of its line as `GET /v1/whoami` lists it, and of its conversation: `imessage`, `whatsapp` and so on. Present on every frame published since the field was; absent only on a frame stored before then.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"isGroup":{"description":"Whether the conversation this message arrived in is a group chat, as the channel reported it: `true` for a group, `false` for a one-to-one conversation, and absent when the channel has not said. A group’s messages arrive under the group’s own `conversationId`, never under the sender’s one-to-one conversation.","type":"boolean"},"addressed":{"description":"On a group message, whether it is for your line: `true` when it names your line, replies to a message your line sent, is an iMessage app card that replaces one your line sent, sits in a thread your line posted in, or, on Telegram, is a command to it. `false` only where the channel read the message and found none of these, as Slack, Discord and Telegram do. Absent means nobody could tell — on iMessage and WhatsApp, a group message that neither mentions nor replies to your line — so treat the message as addressed. Only `false` means it was not addressed to the line. Never on a one-to-one message.","type":"boolean"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Fetch it with `GET /v1/attachments/{id}`; the same id `attachmentIds` lists."},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type the sender’s device declared, as `type/subtype`, or the type its declared kind (Apple’s UTI) names — `audio/x-caf` for a voice memo; null when neither says. Not necessarily the `content-type` `GET /v1/attachments/{id}` answers, which is read from the bytes."},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The file’s name as the sender’s device gave it, or null."},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The file’s size in bytes, or null."},"isSticker":{"description":"Whether the attachment is a sticker, as the channel reported it; absent when the channel did not say — never read absent as `false`.","type":"boolean"},"kind":{"description":"`voice_note` when the channel reported the message as a voice memo and this is its recording. Absent otherwise — never read absent as \"not a voice note\". New kinds may be added.","type":"string","enum":["voice_note"]}},"required":["id","mimeType","filename","byteSize"]},"description":"What `attachmentIds` lists, one entry per id in the same order, with what the sender’s device declared about each: its type, name, size, whether it is a sticker, and whether it is a voice note. Always empty in test mode."},"isVoiceMemo":{"description":"`true` when the channel reported the message as a voice memo — the recording is among its attachments, marked `attachments[].kind: voice_note` when it is the only one, and `text` may carry the channel’s transcript. Absent otherwise, which includes a channel that does not report it: never read absent as `false`.","type":"boolean","const":true},"effect":{"description":"The expressive effect the sender chose, as the channel names it — on iMessage a bubble or screen effect by its short name (`impact`, `confetti`, `shootingstar`, …), most of which `message.send` takes back but not all, or Apple’s own identifier verbatim for an effect the sender’s device does not know: tolerate a value you do not recognise. Absent when the message was sent with none, or the channel did not say.","type":"string"},"service":{"description":"The service an iMessage line received the message over: `iMessage`, or `SMS` or `RCS` when the sender’s phone sent it through their carrier instead. Absent when the line did not say — a line not yet updated to report it, another channel, or a service it does not name — so never read absent as `iMessage`.","type":"string","enum":["iMessage","SMS","RCS"]},"contactId":{"description":"Our id for the contact who sent the message — the `contactId` the `location.*` events, reactions and the console name them by. Absent on a message received before the field existed, and on a history row whose sender this project no longer holds.","type":"string"},"optedOut":{"description":"Whether the sender is opted out once this message is recorded. `true` when this message, or an earlier one it did not undo, was an opt-out keyword on a phone channel: the whole message, in capitals, one of STOP, UNSUBSCRIBE, OPTOUT, CANCEL, END or QUIT, ignoring spaces around it and any trailing `.`, `!` or `?`. A near-miss — \"stop\", \"Stop\" or \"STOP please\" — changes nothing. A send to them is then refused with `recipient_not_allowed`. `false` otherwise — including when this message opted them back in: START or UNSTOP, or anything else they wrote one-to-one that carries no opt-out word. A keyword typed in a group chat changes nothing. Absent on a message received before the field existed, and on a conversation history row.","type":"boolean"},"kind":{"description":"What the message is, where the channel said: `text`, `media`, `location`, `contact`, `interactive_reply` (a button or quick reply the person tapped; see `interactiveReply`), `template_reply`, `app_card` (a card from an iMessage app; see `appCard`) and so on. Absent when the channel did not say. New kinds may be added: treat one you do not recognise as `unsupported`.","type":"string","enum":["text","media","location","contact","system","unsupported","template","interactive","interactive_reply","template_reply","sticker","rich_link","multipart","location_request","poll","app_card","reaction"]},"appCard":{"description":"With `kind` `app_card`, on an iMessage line: the card a person sent from an iMessage app. `text` is null, `attachments` is empty (the card’s picture is not published) and the card is never a reply. Absent on every other message, and on a card received by a line not yet updated to report cards, which arrives as a message with unreadable text and a picture.","type":"object","properties":{"app":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The app’s name as the card carried it, or null."},"teamId":{"type":"string","description":"The Apple team id of the app’s developer. Apple’s own apps use `0000000000`."},"bundleId":{"type":"string","description":"The bundle id of the app’s Messages extension."},"appStoreId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The app’s App Store id as the card carried it, or null."}},"required":["name","teamId","bundleId","appStoreId"],"description":"The app the card came from. Any app a person has can send one, registered with us or not."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The app’s own state, as the sender’s app wrote it: often an `https` link, sometimes a `data:` URL. Treat it as untrusted input; we never fetch it. Null when the card carried none, when it is longer than 16384 characters, and on a card from one of Apple’s own apps."},"interactive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"`true` when the app draws the card itself on a phone that has it; `false` for a plain card; null when the line could not read the card’s contents, as on a card from one of Apple’s own apps."},"layout":{"anyOf":[{"type":"object","properties":{"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s first line, or null."},"subcaption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s second line, or null."}},"required":["caption","subcaption"]},{"type":"null"}],"description":"The card’s words. Null when the card carried none, and on a card from one of Apple’s own apps."},"updates":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `messageId` of the first card this one replaces in the conversation, when we can tell: one your line sent, or an earlier one the person sent. Name it at `target.messageId` of `app_card.update` to answer on a card of yours. Null for a new card, and when the app did not link its card to the one before, which is the app’s choice, so null does not prove the card is new."}},"required":["app","url","interactive","layout","updates"]},"interactiveReply":{"description":"With `kind` `interactive_reply`: the button, quick reply or action the person tapped. Absent otherwise.","type":"object","properties":{"id":{"type":"string","maxLength":256,"description":"The id you gave the button, quick reply or action when you sent it."},"title":{"type":"string","maxLength":256,"description":"The words the person saw on what they tapped."},"sourceMessageId":{"description":"Our `messageId` of the message that carried the buttons, when this platform holds it.","type":"string"}},"required":["id","title"]},"fromDisplayName":{"description":"The name the sender’s platform shows for them, as it said it. A label to show, never an identity: anyone can change it, so match people by `from` or `contactId`. Absent when the platform gave none.","type":"string","maxLength":256},"replyTo":{"description":"The message this one replies to, and how. Absent when it is not a reply we can name.","type":"object","properties":{"messageId":{"type":"string","description":"Our id for the message replied to — the same value as `replyToExternalId`."},"style":{"type":"string","enum":["quote","thread"],"description":"`quote` for a reply that quotes one message, `thread` for one posted in a message’s thread, as Slack replies are. New styles may be added."}},"required":["messageId","style"]},"textFormat":{"description":"The markup `text` is written in, as the channel delivered it: `plain`, or the channel’s own — Slack’s mrkdwn, Discord’s markdown, Telegram’s HTML. Absent means plain. New formats may be added; `textPlain` always reads without markup.","type":"string","enum":["plain","slack_mrkdwn","discord_markdown","telegram_html"]},"textPlain":{"description":"`text` with the markup taken out, when `textFormat` is not `plain`. Absent otherwise.","type":"string"},"platform":{"description":"The arriving channel’s own ids for the message, under that channel’s key alone — `platform.slack` on a Slack message. Never the platform’s raw payload. Keys may be added. Absent when there are none.","type":"object","properties":{"whatsapp":{"description":"On a WhatsApp message.","type":"object","properties":{"waId":{"description":"The sender’s WhatsApp id, when Meta sent one.","type":"string"},"bsuid":{"description":"The sender’s business-scoped user id, when Meta sent one.","type":"string"},"contextMessageId":{"description":"The WhatsApp id of the message this replies to.","type":"string"},"referral":{"description":"The ad or link the person came from, as Meta described it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"location":{"description":"On a `location` message: the place the person shared. When it answers your location request, `contextMessageId` names that request.","type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Degrees north, from -90 to 90."},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Degrees east, from -180 to 180."},"name":{"description":"The place’s name, when the person picked one.","type":"string","maxLength":1024},"address":{"description":"The place’s address, when WhatsApp sent one.","type":"string","maxLength":1024},"url":{"description":"The place’s link, when WhatsApp sent one.","type":"string","maxLength":2048}},"required":["latitude","longitude"]}}},"slack":{"description":"On a Slack message.","type":"object","properties":{"teamId":{"type":"string","description":"The Slack workspace id."},"channelId":{"type":"string","description":"The Slack channel or direct message id."},"userId":{"type":"string","description":"The sender’s Slack user id."},"threadTs":{"description":"The thread’s timestamp, when the message is in a thread.","type":"string"}},"required":["teamId","channelId","userId"]},"discord":{"description":"On a Discord message.","type":"object","properties":{"channelId":{"type":"string","description":"The Discord channel or direct message id."},"guildId":{"description":"The server id, when the message is in a server.","type":"string"},"threadId":{"description":"The thread the message was written in, when it is in one. The conversation is the channel’s: every thread of a channel arrives under its `conversationId`.","type":"string"},"parentChannelId":{"description":"The channel the thread hangs off, when the message is in a thread.","type":"string"}},"required":["channelId"]},"telegram":{"description":"On a Telegram message.","type":"object","properties":{"chatId":{"type":"string","description":"The Telegram chat id."},"username":{"description":"The sender’s @username, when they have one. Display only.","type":"string"},"messageThreadId":{"description":"The forum topic the message was written in, when the group is a forum. The conversation is the group’s: every topic arrives under its `conversationId`.","type":"string"}},"required":["chatId"]},"messenger":{"description":"On a Messenger message.","type":"object","properties":{"pageId":{"type":"string","description":"The Facebook Page the message was sent to."},"psid":{"type":"string","description":"The sender’s page-scoped id."}},"required":["pageId","psid"]}}}},"required":["conversationId","from","text","externalId","replyToExternalId","occurredAt","attachmentIds","messageId","lineId","attachments"]},"V1CommandFrame":{"type":"object","properties":{"commandId":{"type":"string","description":"The `commandId` the 202 handed back."},"logicalActionId":{"type":"string","description":"Your `Idempotency-Key` for this command, or the one minted for you when you sent none, read from this platform’s own record of what you sent. A frame that names a `messageId` — a send that wrote a message — always carries yours, and so does every other command you sent, with one exception: on a live iMessage line `group.create`, whose transport does not use your key, carries the transport’s own id here when its settlement arrived before the 202’s `commandId` was recorded. `commandId`, which the 202 handed back, is the correlator that always holds."},"status":{"type":"string","enum":["succeeded","failed","ambiguous","no_effect","cancelled","expired"],"description":"Terminal, and emitted once. `no_effect` and `ambiguous` are outcomes rather than failures: the transport took the command and could not prove what it changed."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transport’s own code, verbatim, when the command did not succeed — so a support thread can quote it — and null otherwise. An OPEN string: switch on `failureClass`, and read this for the detail."},"conversationId":{"description":"The thread this command acted on — for a reaction, the thread holding the message it names, and for any command sent to a `target.conversationId`, that thread. `null` — present, not omitted — when no thread of yours is known for it, as for `group.create`, which opens the thread the line then reports.","anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"]},{"type":"null"}],"description":"The command type you sent — the `{type}` of `POST /v1/commands/{type}`, read from this platform’s own record of the command, since a transport’s settlement does not name it. Null only for a settlement this platform cannot match to a command it sent: on a live iMessage line, a `group.create` whose settlement arrived before the 202’s `commandId` was recorded."},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for the message this command wrote — the one `getMessageReceipts` takes and a later `target.replyToMessageId` names. Null for a command that writes no message, such as a reaction or a group command."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"deprecated":true,"description":"Deprecated: read `platformMessageId` instead, which carries the same value; this field stays and is never removed. The transport’s own id for the message this command wrote."},"platformMessageId":{"description":"The channel’s own id for the message this command wrote — on a test line, the simulated device’s — the same id a `message` frame carries at `platformMessageId` for a message the contact sent, so you can correlate with anything the channel shows you and name the message in a later command, such as `reaction.set` at `payload.targetExternalId`. Reply to it by `messageId`, not by this. Null when the command wrote no message, when it did not succeed, and when the channel’s settlement named no id for the message it created. `externalId` carries the same value; absent only on an answer from before the field.","anyOf":[{"type":"string"},{"type":"null"}]},"namePhoto":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name people see on the line’s messages — Messages’ display name. Null when none is set."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s given name, or null."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s family name, or null."},"hasPhoto":{"type":"boolean","description":"Whether the card carries a photo. The photo itself is not returned; set a new one with `name_photo.set` and `payload.photoUrl`."}},"required":["name","firstName","lastName","hasPhoto"]},{"type":"null"}],"description":"The line’s own Name and Photo card — the name and photo its contacts see — on a `succeeded` `name_photo.get` (the card as it is) or `name_photo.set` (the card read back after the change). Null on every other settlement."},"group":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","description":"Our id for the new group’s conversation — the one `conversation.created` named — so you can send into it with `target.conversationId`."},"inviteLink":{"description":"WhatsApp only: the link people join the group by (`https://chat.whatsapp.com/…`). Nobody is added for you: send it to the people who should join. Keep it — it is served here for as long as this settlement is kept, and not after. Absent on iMessage, whose groups are made with their members.","type":"string"}},"required":["conversationId"]},{"type":"null"}],"description":"The new group on a `succeeded` `group.create` or `whatsapp.group.create`: its `conversationId` and, on WhatsApp, the `inviteLink` people join it by. Null on every other settlement."},"appCard":{"anyOf":[{"type":"object","properties":{"updatable":{"type":"boolean"}},"required":["updatable"]},{"type":"null"}],"description":"On a `succeeded` iMessage app card, whether it can be updated later: false means Messages gave no id, so send a new card to change it. Null on every other settlement."},"projectId":{"type":"string","description":"The project the key that sent the command belongs to."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"environment":{"type":"string","enum":["live","test"],"description":"`live` or `test`: the environment the command was sent in. A stream frames only its own key’s environment."},"failureClass":{"anyOf":[{"type":"string","enum":["target","content","capability","line","rate_limited","not_run","transport","unknown"]},{"type":"null"}],"description":"What kind of failure this was, from a CLOSED set, so a handler can decide without learning any transport’s vocabulary: `target` (who or what the command is aimed at cannot take it), `content` (the payload was refused — fix it, then send), `capability` (this line cannot carry the command), `line` (the line cannot send right now), `rate_limited` (wait, then send), `not_run` (it never ran — sending again is safe), `transport` (the transport failed on its side) or `unknown` (read `errorCode`). Null unless `status` is `failed`, `cancelled` or `expired`."}},"required":["commandId","logicalActionId","status","errorCode","type","messageId","externalId","namePhoto","group","appCard","projectId","lineId","environment","failureClass"]},"V1ErrorFrame":{"type":"object","properties":{"code":{"type":"string","description":"An `ERROR_CODES` value. Switch on this; never parse `message`."},"message":{"type":"string","description":"A sentence for a person, explaining why the stream is ending."}},"required":["code","message"]},"V1ReceiptFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"commandId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `commandId` the 202 handed back for the send this receipt is about — the correlator. Null only on a receipt recorded before this field existed."},"messageId":{"type":"string","description":"Our id for the message, as `getMessageReceipts` names it."},"status":{"type":"string","enum":["delivered","read"],"description":"What the recipient’s device reported. A receipt never walks a message backwards: once a message is `read`, a late `delivered` for it moves nothing and frames nothing."},"occurredAt":{"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":"When the device reported it, not when you received this frame."},"simulated":{"type":"boolean","description":"True in test, where the sandbox produced the receipt rather than a real device."},"deliveryService":{"description":"The service an iMessage line’s send went out over: `iMessage`, or `SMS` or `RCS` when it went through the carrier instead. Absent when the line did not say — another channel, a test receipt, or a service it does not name — so never read absent as `iMessage`.","type":"string","enum":["iMessage","SMS","RCS"]},"deliveryError":{"description":"The iMessage line’s own error code for the delivery, as text — `4` — for quoting to support. Absent when there was none. Never branch on it: the status says what happened.","type":"string","maxLength":64}},"required":["lineId","commandId","messageId","status","occurredAt","simulated"]},"V1DeliveryFailedFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"commandId":{"type":"string","description":"The `commandId` the 202 handed back for the send this verdict is about — the correlator. Never null: every verdict was recorded with the handle of the send it is about."},"messageId":{"type":"string","description":"Our id for the message, as `getMessageReceipts` names it."},"occurredAt":{"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":"When the provider reported the message not delivered, not when you received this frame."},"simulated":{"type":"boolean","description":"True in test, where the sandbox’s `not_delivered` delivery knob produced the verdict rather than a real provider."},"deliveryService":{"description":"The service an iMessage line’s send went out over: `iMessage`, or `SMS` or `RCS` when it went through the carrier instead. Absent when the line did not say — another channel, a test receipt, or a service it does not name — so never read absent as `iMessage`.","type":"string","enum":["iMessage","SMS","RCS"]},"deliveryError":{"description":"The iMessage line’s own error code for the delivery, as text — `4` — for quoting to support. Absent when there was none. Never branch on it: the status says what happened.","type":"string","maxLength":64}},"required":["lineId","commandId","messageId","occurredAt","simulated"]},"V1LocationFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","enum":["location.share_started","location.updated","location.share_ended"],"description":"Which moment of the share this is: it started, a new position arrived, or it ended — the webhook event type, verbatim."},"conversationId":{"type":"string","description":"Our id for the one-to-one conversation with the person sharing."},"contactId":{"type":"string","description":"Our id for the person sharing, as the contacts routes name them."},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Degrees. Always set on `location.updated`; null on a start that arrived before the first position, or an end that carried no last one."},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Degrees; null exactly when `latitude` is."},"horizontalAccuracyM":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The radius of uncertainty around the position, in metres; null when `latitude` is, and where the channel reports none (a place picked on a Telegram map)."},"altitudeM":{"description":"Metres, where the device reported it. Absent otherwise.","type":"number"},"speedMps":{"description":"Metres a second, where the device reported a valid speed. Absent otherwise.","type":"number"},"coarseAddress":{"description":"A coarse place name such as a city, where the platform gave one. Absent otherwise.","type":"string"},"capturedAt":{"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"}],"description":"When the device took this position; null exactly when `latitude` is."},"occurredAt":{"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":"When it happened: the position’s own instant, or when the start or end was observed."},"simulated":{"type":"boolean","description":"True in test, where the sandbox phone shared the location."}},"required":["lineId","type","conversationId","contactId","latitude","longitude","horizontalAccuracyM","capturedAt","occurredAt","simulated"]},"V1MessageEditedFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","const":"message.edited","description":"The webhook event type, verbatim."},"messageId":{"type":"string","description":"Our id for the message the contact edited — the `messageId` its `message` frame carried."},"conversationId":{"type":"string","description":"Our id for the conversation the message is in."},"externalId":{"type":"string","deprecated":true,"description":"Deprecated: read `platformMessageId` instead, which carries the same value; this field stays and is never removed. The platform’s id for the message."},"platformMessageId":{"description":"The channel’s id for the message — the `platformMessageId` its `message` frame carried. `externalId` carries the same value; absent only on an answer from before the field.","type":"string"},"text":{"type":"string","description":"The message as it reads after the edit. The message’s own stored text is not changed; this is the only place the new text arrives."},"previousText":{"description":"The text before the edit, where the platform kept it. Absent otherwise; never empty.","type":"string"},"editedAt":{"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":"When the contact edited the message, as the platform reports it."},"simulated":{"type":"boolean","description":"True in test, where the sandbox phone edited the message."}},"required":["lineId","type","messageId","conversationId","externalId","text","editedAt","simulated"]},"V1MessageUnsentFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","const":"message.unsent","description":"The webhook event type, verbatim."},"messageId":{"type":"string","description":"Our id for the message the contact unsent — the `messageId` its `message` frame carried."},"conversationId":{"type":"string","description":"Our id for the conversation the message is in."},"externalId":{"type":"string","deprecated":true,"description":"Deprecated: read `platformMessageId` instead, which carries the same value; this field stays and is never removed. The platform’s id for the message."},"platformMessageId":{"description":"The channel’s id for the message — the `platformMessageId` its `message` frame carried. `externalId` carries the same value; absent only on an answer from before the field.","type":"string"},"unsentAt":{"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":"When the contact unsent the message, as the platform reports it."},"simulated":{"type":"boolean","description":"True in test, where the sandbox phone unsent the message."}},"required":["lineId","type","messageId","conversationId","externalId","unsentAt","simulated"]},"V1PollFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","enum":["poll.created","poll.options_changed","poll.voted","poll.vote_cleared"],"description":"Which moment of the poll this is: it was created, its choices changed, a participant voted, or a participant took their vote back — the webhook event type, verbatim."},"conversationId":{"type":"string","description":"Our id for the conversation the poll is in — a one-to-one thread or a group’s."},"actor":{"type":"string","enum":["line","contact"],"description":"`line` when this line did it — created the poll, voted, or added a choice, so a `poll.created` with `actor: line` is your own poll’s ids coming back — and `contact` when a participant did."},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for the participant, as the contacts routes name them, where this project holds one; null when the actor is the line, and for a participant this project holds no contact for (a member of a group chat nobody has written to one to one). Two such participants’ frames carry nothing that tells them apart, so their votes cannot be counted per person."},"pollExternalId":{"type":"string","description":"The transport’s id for the poll — the original balloon’s, which every later moment of the same poll repeats, so a change, a vote and a vote taken back are matched to their poll by it — and what `poll.vote` takes at `payload.pollExternalId`."},"question":{"description":"The poll’s question. Present on `poll.created` alone.","type":"string"},"options":{"description":"The poll’s choices, in order, each with the id a vote names. Present on `poll.created`, and on `poll.options_changed` as the WHOLE current list — replace what you hold, never append. Absent on the other two.","type":"array","items":{"type":"object","properties":{"optionExternalId":{"type":"string","description":"The transport’s id for this choice — the id a `poll.voted` lists in `selectedOptionExternalIds`, and what `poll.vote` takes at `payload.optionExternalId`. Opaque: pass it back exactly as given."},"text":{"type":"string","description":"The choice as the poll shows it."}},"required":["optionExternalId","text"]}},"selectedOptionExternalIds":{"description":"Every choice the voter holds after this vote — their current selection, so a multi-select poll carries several and a change carries the new whole. Present on `poll.voted` alone; a `poll.vote_cleared` means they hold none.","type":"array","items":{"type":"string"}},"occurredAt":{"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":"When it happened, as the transport reports it."},"simulated":{"type":"boolean","description":"True in test, where the sandbox produced the moment rather than a real device: there, the line’s own poll and vote, and never a contact’s."}},"required":["lineId","type","conversationId","actor","contactId","pollExternalId","occurredAt","simulated"]},"V1ReactionFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","enum":["reaction.added","reaction.removed"],"description":"Whether the reaction was put on or taken off — the webhook event type, verbatim."},"messageId":{"type":"string","description":"Our id for the message reacted to — the `messageId` its frame carried."},"conversationId":{"type":"string","description":"Our id for the conversation the message is in, a group’s included."},"channel":{"description":"The channel the conversation is on. Absent only on a reaction recorded before the field existed.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"actor":{"type":"string","description":"Who reacted: the person’s address, as `from` names them on their messages, or your line’s own address when the line reacted."},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for the person who reacted, as the contacts routes name them. Null when the line reacted, for a person this project holds no contact for — a group member who has not written in any conversation on the line — and on a reaction recorded before the field existed."},"isGroup":{"description":"Whether the conversation is a group chat: `true` for a group, `false` for a one-to-one conversation, and absent when the channel has not said, as on the conversation’s messages.","type":"boolean"},"emoji":{"type":"string","description":"The reaction, in the platform’s own spelling."},"partIndex":{"description":"The part of the message the reaction is on, counted from 0 in the order the channel lays out the message’s parts — the number `reaction.tapback`’s `partIndex` takes. Absent when it is on the whole message or the channel did not say. iMessage only. A removal the platform implies by replacing another reaction carries none.","type":"integer","minimum":0,"maximum":9007199254740991},"providerReactionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The platform’s id for the reaction, where it gives one. Null otherwise."},"occurredAt":{"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":"When the reaction was put on or taken off, as the platform reports it."}},"required":["lineId","type","messageId","conversationId","actor","contactId","emoji","providerReactionId","occurredAt"]},"V1ConversationCreatedFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","const":"conversation.created","description":"The webhook event type, verbatim."},"conversationId":{"type":"string","description":"Our id for the conversation — the `conversationId` its messages arrive under and a reply names."},"kind":{"type":"string","enum":["direct","group"],"description":"`direct` for a conversation with one person, `group` for a group chat."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the conversation is on."},"peerAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person’s address in a `direct` conversation. Null for a group."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The group’s name, where it has one. Null for a `direct` conversation."}},"required":["lineId","type","conversationId","kind","channel","peerAddress","title"]},"V1ConversationUpdatedFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","const":"conversation.updated","description":"The webhook event type, verbatim."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the group."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the group is on."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The group’s name now. Null when it has none."},"changed":{"type":"array","items":{"type":"string","enum":["title","participants"]},"description":"What moved, in this order: `title`, then `participants`. Never empty."},"participantsAdded":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The member as the platform names them: the `from` their messages carry in this conversation."},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for this member, as the contacts routes name them. Null when this project has no contact for them."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the platform shows for this member, or their contact’s name. Null when neither is known."}},"required":["address","contactId","displayName"]},"description":"Who joined. Empty when nobody did."},"participantsRemoved":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The member as the platform names them: the `from` their messages carry in this conversation."},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for this member, as the contacts routes name them. Null when this project has no contact for them."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the platform shows for this member, or their contact’s name. Null when neither is known."}},"required":["address","contactId","displayName"]},"description":"Who left. Empty when nobody did."}},"required":["lineId","type","conversationId","channel","title","changed","participantsAdded","participantsRemoved"]},"V1ConversationStatusChangedFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","const":"conversation.status_changed","description":"The webhook event type, verbatim."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the group."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the group is on."},"from":{"type":"string","enum":["active","closed"],"description":"The status before this move."},"to":{"type":"string","enum":["active","closed"],"description":"The status now."},"reason":{"description":"Why the group is closed. Present only when `to` is `closed`.","type":"string","enum":["removed","deleted","archived","suspended"]}},"required":["lineId","type","conversationId","channel","from","to"]},"V1GapFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","const":"line.gap","description":"The webhook event type, verbatim."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The line’s channel."},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"The start of the window traffic may be missing from."},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"The end of the window."},"cause":{"type":"string","enum":["rate_limited","disconnected"],"description":"`rate_limited` — the channel, or this platform, held the line’s traffic back for a while; `disconnected` — the line’s connection was lost."},"conversationIds":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}],"description":"The conversations the window touched, where the channel said which. Null when any of the line’s conversations may be missing messages."},"recovered":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many messages from the window were recovered. Each was already delivered as an ordinary `message.received`, with the time it was sent, before this event."},"complete":{"type":"boolean","description":"Whether everything in the window was re-read. When false, some messages may be missing for good: read the conversations with `GET /v1/conversations/{conversationId}/messages`, or ask the people in them."}},"required":["lineId","type","channel","from","to","cause","conversationIds","recovered","complete"]},"V1MessageReceivedFrame":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The event’s id: the same value as this frame’s SSE `id:`, the webhook’s `id` and its `mapier-event-id` header. Deduplicate on it."},"type":{"type":"string","const":"message.received","description":"The webhook event type, verbatim."},"environment":{"type":"string","enum":["live","test"],"description":"`test` or `live`: the key’s environment."},"occurredAt":{"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":"When the event was recorded, as the webhook’s `occurredAt`."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The `message.received` event’s payload, verbatim — the `data` a webhook endpoint subscribed to `message.received` is sent, with `projectId`, `environment` and `lineId` on it."}},"required":["id","type","environment","occurredAt","data"]},"V1ChatBackgroundFrame":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this happened on — its `id` as `GET /v1/whoami` lists it. Every frame and every webhook about something on a line names it, so a key holding several lines never has to look a conversation up to tell which number an event belongs to. The only event that can carry null here is `contact.opt_out_changed`, when the change was made in the console."},"type":{"type":"string","enum":["conversation.background_changed"],"description":"The webhook event type, verbatim: `conversation.background_changed`."},"conversationId":{"type":"string","description":"Our id for the conversation whose background changed — a one-to-one thread or a group’s."},"from":{"type":"string","description":"The address of whoever changed it: the person’s, or this line’s own when `fromMe` is true."},"fromMe":{"type":"boolean","description":"True when this line made the change — your own `chat_background.set` or `chat_background.remove` comes back here as well as settling as a `command` frame, so do not count it twice — and false when a person in the conversation did."},"background":{"anyOf":[{"type":"object","properties":{"preset":{"anyOf":[{"type":"string","enum":["gradient","color_mango","color_ice","color_plum","color_deep_sea","color_green_apple","color_cherry","color_bubblegum","color_tangerine","color_magenta","color_lime","color_silver","color_carbon","color_stone","custom","aurora_green","aurora_purple","aurora_pink","sky_dusk","sky_haze","sky_sunset","sky_clear","sky_sunrise","sky_dawn","water_light","water_dark","glitter_gold","glitter_copper","glitter_silver","photo"]},{"type":"null"}],"description":"Which background was set — one of the presets `chat_background.set` takes. Null when the line could not tell which: it reports the look only when it can tie it to this change, so a set followed at once by another, or read back after a later one, arrives with `preset: null`. `photo` is a picture someone chose, carried as `attachmentId` where the line could export it."},"colors":{"description":"The gradient’s two colours, each `#RRGGBB`, on a `custom` background alone, where the line read them. Absent on every other preset.","type":"array","prefixItems":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}]},"attachmentId":{"description":"The picture, on a `photo` background alone: an attachment id, fetched with `GET /v1/attachments/{id}` exactly as a message attachment is, and like a new one possibly not yet there while the line uploads it. Absent where the line could not export the picture — an older Mac, a background already replaced, one flagged by Communication Safety, or no picture to read — and on every other preset.","type":"string"}},"required":["preset"]},{"type":"null"}],"description":"The background now set, or null when it was removed."},"occurredAt":{"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":"When the change happened, as the transport reports it."},"simulated":{"type":"boolean","description":"False on every one: a test line frames none of these, so each is a live line’s. Carried, as on every frame, so a client reads one field across them all."}},"required":["lineId","type","conversationId","from","fromMe","background","occurredAt","simulated"]},"V1LineSetup":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"method":{"type":"string","enum":["operator","byo_meta_app","mapier_number","manifest_api","byo_token","managed_bot"]},"purpose":{"type":"string","enum":["connect","reconnect"]},"state":{"type":"string","enum":["awaiting_input","awaiting_human","verifying","ready","verified","failed","cancelled"]},"checks":{"type":"object","propertyNames":{"type":"string","enum":["credentials","webhook","platform_approval","policy_ack","inbound_proof","outbound_proof"]},"additionalProperties":{"type":"object","properties":{"state":{"type":"string","enum":["pending","ok","warning","failed","n/a"]},"detail":{"type":"string"},"reason":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}]},"retryable":{"type":"boolean"},"checkedAt":{"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"}]},"docUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"fixUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"sub":{"anyOf":[{"type":"object","propertyNames":{"type":"string","enum":["number","install","server","access","waba","business","app"]},"additionalProperties":{"type":"string","enum":["pending","ok","warning","failed","n/a"]}},{"type":"null"}]}},"required":["state","detail","reason","retryable","checkedAt","docUrl","fixUrl","sub"]},"required":["credentials","webhook","platform_approval","policy_ack","inbound_proof","outbound_proof"]},"nextStep":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"paste_back"},"callbackUrl":{"type":"string","format":"uri"},"verifyToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"type":"object","properties":{"callbackUrl":{"type":"string"},"verifyToken":{"type":"string"}},"required":["callbackUrl","verifyToken"]}},"required":["kind","callbackUrl","verifyToken","fields"]},{"type":"object","properties":{"kind":{"type":"string","const":"oauth_authorize"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","url","expiresAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"invite"},"url":{"type":"string","format":"uri"}},"required":["kind","url"]},{"type":"object","properties":{"kind":{"type":"string","const":"deep_link"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["kind","url","expiresAt"]},{"type":"object","properties":{"kind":{"type":"string","const":"message_us"},"address":{"type":"string","minLength":1},"hint":{"type":"string"}},"required":["kind","address","hint"]},{"type":"object","properties":{"kind":{"type":"string","const":"wait"},"reason":{"type":"string","enum":["number_ordering","otp_pending","operator_attaching"]},"etaSeconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","reason","etaSeconds"]}]},{"type":"null"}]},"handoffUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"handoffExpiresAt":{"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"}]},"identity":{"anyOf":[{"type":"object","properties":{"externalRef":{"type":"string"},"display":{"type":"string"}},"required":["externalRef","display"]},{"type":"null"}]},"lineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"number":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"e164":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["ordering","bought","verifying","registered","awaiting_meta_delete","releasing","released","rejected_by_meta","otp_failed","order_failed"]},"otp":{"anyOf":[{"type":"object","properties":{"method":{"anyOf":[{"type":"string","enum":["VOICE","SMS"]},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"nextAttemptAt":{"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":["method","attempts","nextAttemptAt"]},{"type":"null"}]},"awaitingMetaDeleteUntil":{"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"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["state_changed","otp_requested","otp_received","otp_verified","provider_webhook","meta_error","sweeper"]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"state":{"anyOf":[{"type":"string","enum":["ordering","bought","verifying","registered","awaiting_meta_delete","releasing","released","rejected_by_meta","otp_failed","order_failed"]},{"type":"null"}]}},"required":["kind","at","state"]}}},"required":["id","e164","state","otp","awaitingMetaDeleteUntil","lastError","events"]},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expiresAt":{"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":["id","channel","method","purpose","state","checks","nextStep","handoffUrl","handoffExpiresAt","identity","lineId","number","failureReason","createdAt","updatedAt","expiresAt"]},"V1MessageSendCommand":{"type":"object","properties":{"target":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."},"replyToMessageId":{"description":"Our id for a message in the same conversation to quote. Quoted where the line can; a 422 at this key otherwise, never a message sent unquoted.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["conversationId"],"additionalProperties":{},"title":"conversation","description":"Named by our id for the conversation."},{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."},"replyToMessageId":{"description":"Our id for a message in the same conversation to quote. Quoted where the line can; a 422 at this key otherwise, never a message sent unquoted.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["recipientExternalId"],"additionalProperties":{},"title":"recipient","description":"Named by the person."}],"description":"Who to send to: a `conversationId`, or a recipient — a first message to a person opens the thread. Keys this does not name are ignored."},"payload":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"text","description":"`text`. Carried on iMessage, WhatsApp, Telegram, Discord, Slack and Messenger lines."},"text":{"type":"string","minLength":1,"description":"The text. At most 65536 bytes of UTF-8 on iMessage, 4096 characters on WhatsApp, 4096 characters on Telegram, 2000 characters on Discord, 40000 characters on Slack and 2000 characters on Messenger."},"effect":{"type":"string","enum":["impact","loud","gentle","invisibleink","confetti","lasers","fireworks","balloons","sparkles","spotlight","echo","love","celebration"],"description":"The screen or bubble effect the message arrives with. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.effect`."},"subject":{"type":"string","minLength":1,"maxLength":1024,"description":"A bold subject line above the text. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.subject`."},"textFormatting":{"description":"Ranges of the text drawn bold, italic, animated or as a mention. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.textFormatting`.","minItems":1,"maxItems":256,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Where the range starts in `text`, in UTF-16 code units."},"length":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"How long the range is, in UTF-16 code units."},"styles":{"description":"The styles the range is drawn in.","minItems":1,"type":"array","items":{"type":"string","enum":["bold","italic","underline","strikethrough"]}},"effect":{"description":"The animation the range plays.","type":"string","enum":["bounce","stretch","squish","scaleRipple","big","bloom","somersault","nod","shake","jitter","small","explode"]},"mention":{"description":"The address of the person the range mentions.","type":"string","minLength":1}},"required":["start","length"],"additionalProperties":false,"description":"One range of the text: `start` and `length`, with at least one of `styles`, `effect` and `mention`."}},"platform":{"description":"Options one channel has and the others do not, under that channel’s name.","type":"object","properties":{"whatsapp":{"description":"WhatsApp’s own options.","type":"object","properties":{"previewUrl":{"description":"Whether WhatsApp draws a preview of the first link in the text. Carried on WhatsApp lines; any other send refuses it with a 422 at `payload.platform.whatsapp`.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"required":["text"],"additionalProperties":false,"title":"text","description":"A text message. `kind` may be left out."},{"type":"object","properties":{"kind":{"type":"string","const":"media","description":"`media`. Carried on WhatsApp, Telegram, Discord, Slack and Messenger lines, and on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"url":{"type":"string","pattern":"^https:\\/\\/","description":"The https link of the photo or file, fetched by the platform or the transport before it is sent. At most 2048 characters on iMessage."},"caption":{"description":"Words sent with the file. Carried on WhatsApp, Telegram, Discord and Slack lines; any other send refuses it with a 422 at `payload.caption`.","type":"string","minLength":1,"maxLength":1024}},"required":["kind","url"],"additionalProperties":false,"title":"media","description":"A photo or file, by link."},{"type":"object","properties":{"kind":{"type":"string","const":"sticker","description":"`sticker`. Carried on WhatsApp and Telegram lines, and on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"emoji":{"description":"Exactly one emoji. Give this or `url`, not both. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.emoji`.","type":"string","minLength":1},"url":{"description":"The https link of the image to send as the sticker: a PNG, GIF or JPEG on iMessage, given instead of `emoji`; a WebP image whose path ends in `.webp` on WhatsApp, where it is required.","type":"string","maxLength":2048,"pattern":"^https:\\/\\/"},"attachToMessageExternalId":{"description":"The transport’s id for a message the contact sent, to stick the sticker onto. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.attachToMessageExternalId`.","type":"string","minLength":1},"partIndex":{"description":"The part of that message the sticker is stuck to. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.partIndex`.","type":"integer","minimum":0,"maximum":64},"placement":{"description":"Where on the message the sticker sits. Needs `attachToMessageExternalId`. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.placement`.","type":"object","properties":{"x":{"description":"Across the bubble.","type":"number","minimum":-5,"maximum":6},"y":{"description":"Down the bubble.","type":"number","minimum":-5,"maximum":6},"scale":{"description":"How large.","type":"number","minimum":0.1,"maximum":5},"rotation":{"description":"Turned, in degrees.","type":"number","minimum":-180,"maximum":180}},"additionalProperties":false}},"required":["kind"],"additionalProperties":false,"title":"sticker","description":"One emoji, or an image by link, drawn as a sticker — on iMessage alone or stuck onto a message, and on WhatsApp a WebP image by link, alone."},{"type":"object","properties":{"kind":{"type":"string","const":"rich_link","description":"`rich_link`. Carried on WhatsApp and Telegram lines, and on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"url":{"type":"string","maxLength":2048,"pattern":"^https?:\\/\\/","description":"The http or https page the recipient’s phone draws as a preview card."}},"required":["kind","url"],"additionalProperties":false,"title":"rich_link","deprecated":true,"description":"A link sent as a preview card. Deprecated: send `kind: \"link\"`, the same message."},{"type":"object","properties":{"kind":{"type":"string","const":"multipart","description":"`multipart`. Carried on Telegram, Discord and Slack lines, and on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"parts":{"minItems":2,"maxItems":20,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"text","description":"`text`."},"text":{"type":"string","minLength":1,"description":"The words of this part."}},"required":["kind","text"],"additionalProperties":false,"description":"A text part."},{"type":"object","properties":{"kind":{"type":"string","const":"media","description":"`media`."},"url":{"type":"string","pattern":"^https:\\/\\/","description":"The https link of the photo of this part."}},"required":["kind","url"],"additionalProperties":false,"description":"A photo part, by link."}]},"description":"The parts, in the order they are shown — at most 10 of them photos, and no link twice."},"effect":{"type":"string","enum":["impact","loud","gentle","invisibleink","confetti","lasers","fireworks","balloons","sparkles","spotlight","echo","love","celebration"],"description":"The screen or bubble effect the message arrives with. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.effect`."},"subject":{"type":"string","minLength":1,"maxLength":1024,"description":"A bold subject line above the text. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`; any other send refuses it with a 422 at `payload.subject`."}},"required":["kind","parts"],"additionalProperties":false,"title":"multipart","description":"Text and photos as one message."},{"type":"object","properties":{"kind":{"type":"string","const":"location_request","description":"`location_request`. Carried on WhatsApp and Telegram lines, and on iMessage lines only into a one-to-one conversation the transport has confirmed, named by `target.conversationId`."}},"required":["kind"],"additionalProperties":false,"title":"location_request","description":"A card asking the person to share their location. Nothing goes beside `kind`."},{"type":"object","properties":{"kind":{"type":"string","const":"poll","description":"`poll`. Carried on Telegram and Discord lines, and on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"question":{"type":"string","minLength":1,"maxLength":128,"description":"The question, on one line."},"options":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"description":"One choice, on one line."},"description":"The choices, each once."}},"required":["kind","question","options"],"additionalProperties":false,"title":"poll","description":"A poll."},{"type":"object","properties":{"kind":{"type":"string","const":"app_card","description":"`app_card`. Carried on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"app":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":4096,"description":"The name this organization registered the app under."},"teamId":{"type":"string","pattern":"^[A-Z0-9]{10}$","description":"The app’s Apple developer team id."},"bundleId":{"type":"string","maxLength":4096,"pattern":"^[A-Za-z0-9.-]+$","description":"The Messages extension’s bundle id, not the host app’s."},"appStoreId":{"description":"The App Store id, so someone without the app can find it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["name","teamId","bundleId"],"additionalProperties":false,"description":"The app the card comes from, held by this organization."},"url":{"type":"string","minLength":1,"maxLength":4096,"description":"The app’s own state, an https, http or data URL. Nothing on Mapier’s side fetches it."},"interactive":{"description":"Whether an installed app draws the card itself from `url`. Default false, a plain card. Set it only for an app that draws its own bubble: Messages starts such an app as soon as the card is on screen, and an app that does not support it shows its whole screen in the bubble.","type":"boolean"},"layout":{"type":"object","properties":{"caption":{"type":"string","minLength":1,"maxLength":4096,"description":"The card’s first line."},"subcaption":{"description":"The card’s second line.","type":"string","minLength":1,"maxLength":4096},"image":{"description":"An https link to the card’s picture: JPEG, PNG, WebP, HEIC or HEIF. Mapier fetches it before the card is written. Not on a reply. Shown only to someone who has the line in their contacts.","type":"string","minLength":1,"maxLength":2048}},"required":["caption"],"additionalProperties":false,"description":"The words drawn where the app does not draw the card itself, and its picture."},"summary":{"description":"What the person sees of this card once an update has replaced it.","type":"string","minLength":1,"maxLength":4096}},"required":["kind","app","url","layout"],"additionalProperties":false,"title":"app_card","description":"A card from an iMessage app this organization holds."},{"type":"object","properties":{"kind":{"type":"string","const":"link","description":"`link`. The same message as `kind: \"rich_link\"`, which it replaces. Carried on WhatsApp and Telegram lines, and on iMessage lines only into a conversation the transport has confirmed, named by `target.conversationId`."},"url":{"type":"string","maxLength":2048,"pattern":"^https?:\\/\\/","description":"The http or https page the recipient’s phone draws as a preview card."}},"required":["kind","url"],"additionalProperties":false,"title":"link","description":"A link sent as a preview card."},{"type":"object","properties":{"kind":{"type":"string","const":"template","description":"`template`. Runs as `whatsapp.template.send`, with the same payload beside `kind`, and is recorded, settled and refused under that name. Carried on WhatsApp lines."},"template":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The approved template: its `name`, `language` and `components`, as `whatsapp.template.send` takes it."}},"required":["kind","template"],"additionalProperties":{},"title":"template","description":"An approved message template."},{"type":"object","properties":{"kind":{"type":"string","const":"choices","description":"`choices`. Runs as `whatsapp.interactive.send` or `messenger.interactive.send`, with the same payload beside `kind`, and is recorded, settled and refused under that name. Carried on WhatsApp and Messenger lines."},"interactive":{"description":"An interactive message of `type` `button` or `list`, as `whatsapp.interactive.send` takes it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"text":{"description":"The words above the choices, as `messenger.interactive.send` takes them.","type":"string"},"quickReplies":{"description":"Quick replies, as `messenger.interactive.send` takes them.","type":"array","items":{}},"buttons":{"description":"Buttons, as `messenger.interactive.send` takes them.","type":"array","items":{}}},"required":["kind"],"additionalProperties":{},"title":"choices","description":"Choices the person picks from: `interactive` runs as `whatsapp.interactive.send`; `quickReplies` or `buttons` as `messenger.interactive.send`; neither, as the command `target.channel` names."},{"type":"object","properties":{"kind":{"type":"string","const":"location","description":"`location`. Runs as `whatsapp.location.send`, with the same payload beside `kind`, and is recorded, settled and refused under that name. Carried on WhatsApp lines."},"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Degrees north."},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Degrees east."},"name":{"description":"The place’s name.","type":"string","minLength":1,"maxLength":1024},"address":{"description":"The place’s address.","type":"string","minLength":1,"maxLength":1024}},"required":["kind","latitude","longitude"],"additionalProperties":false,"title":"location","description":"A place on a map."},{"type":"object","properties":{"kind":{"type":"string","const":"contact","description":"`contact`. Runs as `whatsapp.contacts.send`, with the same payload beside `kind`, and is recorded, settled and refused under that name. Carried on WhatsApp lines."},"contacts":{"minItems":1,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"The contact cards, as `whatsapp.contacts.send` takes them."}},"required":["kind","contacts"],"additionalProperties":{},"title":"contact","description":"One or more contact cards."}],"description":"What to send, by `kind`. A key the resolved line does not carry is a 422 at `payload.<key>`, never dropped."}},"required":["target","payload"],"title":"message.send","x-mapier-command-type":"message.send","description":"The body of `POST /v1/commands/message.send`: a message.","x-channels":{"tier":"universal","cells":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1ReactionSetCommand":{"type":"object","properties":{"target":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."},"messageId":{"description":"Our id for the message reacted to — the `messageId` a `message.received` event and the conversation’s history carry. Name the message here or at `payload.targetExternalId`; both may be given only for the same message. A message this project does not hold, or one of another conversation, is a 422 here with `reason: invalid_target`, and one the transport has named no id for yet a 422 here with `reason: not_yet_addressable`, as `message.edit` answers.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["conversationId"],"additionalProperties":{},"title":"conversation","description":"Named by our id for the conversation."},{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."},"messageId":{"description":"Our id for the message reacted to — the `messageId` a `message.received` event and the conversation’s history carry. Name the message here or at `payload.targetExternalId`; both may be given only for the same message. A message this project does not hold, or one of another conversation, is a 422 here with `reason: invalid_target`, and one the transport has named no id for yet a 422 here with `reason: not_yet_addressable`, as `message.edit` answers.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["recipientExternalId"],"additionalProperties":{},"title":"recipient","description":"Named by the person."}],"description":"The thread the command is done in: a `conversationId`, or the person it is with. An iMessage line needs the `conversationId`. A person the project has never reached is a refusal, not a new thread. The message may be named here by our id, at `messageId`."},"payload":{"type":"object","properties":{"targetExternalId":{"description":"The transport’s own id for the message reacted to — a `message` frame’s `externalId`, or a `command` frame’s. Give this or `target.messageId`; it is the only way to name a message this platform never stored.","type":"string","minLength":1},"emoji":{"type":"string","minLength":1,"maxLength":140,"description":"The reaction: one emoji, such as 👍, on every channel. On Slack it is sent as Slack’s name for it, and an emoji Slack has no name for is a 422 at `payload.emoji`."}},"required":["emoji"],"additionalProperties":false,"description":"The message reacted to, and the reaction. Name the message by one of two ids: the transport’s, at `targetExternalId`, or ours, at `target.messageId`."}},"required":["target","payload"],"title":"reaction.set","x-mapier-command-type":"reaction.set","description":"The body of `POST /v1/commands/reaction.set`: a reaction put on a message. Carried on iMessage, WhatsApp, Telegram, Discord, Slack and Messenger lines.","x-channels":{"tier":"universal","cells":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1ReactionRemoveCommand":{"type":"object","properties":{"target":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."},"messageId":{"description":"Our id for the message reacted to — the `messageId` a `message.received` event and the conversation’s history carry. Name the message here or at `payload.targetExternalId`; both may be given only for the same message. A message this project does not hold, or one of another conversation, is a 422 here with `reason: invalid_target`, and one the transport has named no id for yet a 422 here with `reason: not_yet_addressable`, as `message.edit` answers.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["conversationId"],"additionalProperties":{},"title":"conversation","description":"Named by our id for the conversation."},{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."},"messageId":{"description":"Our id for the message reacted to — the `messageId` a `message.received` event and the conversation’s history carry. Name the message here or at `payload.targetExternalId`; both may be given only for the same message. A message this project does not hold, or one of another conversation, is a 422 here with `reason: invalid_target`, and one the transport has named no id for yet a 422 here with `reason: not_yet_addressable`, as `message.edit` answers.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["recipientExternalId"],"additionalProperties":{},"title":"recipient","description":"Named by the person."}],"description":"The thread the command is done in: a `conversationId`, or the person it is with. An iMessage line needs the `conversationId`. A person the project has never reached is a refusal, not a new thread. The message may be named here by our id, at `messageId`."},"payload":{"type":"object","properties":{"targetExternalId":{"description":"The transport’s own id for the message reacted to — a `message` frame’s `externalId`, or a `command` frame’s. Give this or `target.messageId`; it is the only way to name a message this platform never stored.","type":"string","minLength":1},"emoji":{"description":"The reaction to take off. iMessage, Discord and Slack need it; WhatsApp and Messenger take off the line’s one reaction and refuse it with a 422 at `payload.emoji`.","type":"string","minLength":1,"maxLength":140}},"additionalProperties":false,"description":"The message whose reaction is taken off, named by one of two ids: the transport’s, at `targetExternalId`, or ours, at `target.messageId`."}},"required":["target","payload"],"title":"reaction.remove","x-mapier-command-type":"reaction.remove","description":"The body of `POST /v1/commands/reaction.remove`: a reaction taken off a message. Carried on iMessage, WhatsApp, Telegram, Discord, Slack and Messenger lines.","x-channels":{"tier":"universal","cells":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1MessageReadCommand":{"type":"object","properties":{"target":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."}},"required":["conversationId"],"additionalProperties":{},"title":"conversation","description":"Named by our id for the conversation."},{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."}},"required":["recipientExternalId"],"additionalProperties":{},"title":"recipient","description":"Named by the person."}],"description":"The thread the command is done in: a `conversationId`, or the person it is with. An iMessage line needs the `conversationId`. A person the project has never reached is a refusal, not a new thread."},"payload":{"description":"Optional. Leave the payload out to mark the whole conversation read.","type":"object","properties":{"externalId":{"description":"The transport’s id for the message read up to. Optional: an iMessage line marks the whole conversation read, and checks only that the message is in it.","type":"string","minLength":1}},"additionalProperties":false}},"required":["target"],"title":"message.read","x-mapier-command-type":"message.read","description":"The body of `POST /v1/commands/message.read`: a one-to-one conversation marked read on the line. The contact sees a read receipt only where the channel and their settings show one (iMessage: the line’s read receipts on; WhatsApp: the contact’s read receipts on). Carried on iMessage, WhatsApp and Messenger lines.","x-channels":{"tier":"universal","cells":{"imessage":"yes","whatsapp":"yes","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1TypingStartCommand":{"type":"object","properties":{"target":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."}},"required":["conversationId"],"additionalProperties":{},"title":"conversation","description":"Named by our id for the conversation."},{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"recipientExternalId":{"type":"string","minLength":1,"description":"The person, in the channel’s own address form — an E.164 phone number on iMessage and WhatsApp. `address`, `handle`, `to` and `recipient` are read as the same key, in that order after this one."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."}},"required":["recipientExternalId"],"additionalProperties":{},"title":"recipient","description":"Named by the person."}],"description":"The thread the command is done in: a `conversationId`, or the person it is with. An iMessage line needs the `conversationId`. A person the project has never reached is a refusal, not a new thread."},"payload":{"description":"Optional. Leave the payload out to show typing in the conversation.","type":"object","properties":{"externalId":{"description":"The transport’s id for the message being answered, where the channel takes one.","type":"string","minLength":1}},"additionalProperties":false}},"required":["target"],"title":"typing.start","x-mapier-command-type":"typing.start","description":"The body of `POST /v1/commands/typing.start`: a typing indicator shown in the conversation. Carried on iMessage, WhatsApp, Telegram, Discord, Slack and Messenger lines.","x-channels":{"tier":"universal","cells":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1MessageEditCommand":{"type":"object","properties":{"target":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for a message this line sent in that conversation."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."}},"required":["conversationId","messageId"],"additionalProperties":{},"description":"The line’s own message, by our ids for it and its conversation."},"payload":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"The new text. At most 65536 bytes of UTF-8 on iMessage, and 4096 on Telegram."}},"required":["text"],"additionalProperties":false,"description":"The message’s new text."}},"required":["target","payload"],"title":"message.edit","x-mapier-command-type":"message.edit","description":"The body of `POST /v1/commands/message.edit`: a message the line sent, changed. Carried on iMessage, Telegram, Discord and Slack lines.","x-channels":{"tier":"shared_optional","cells":{"imessage":"yes","whatsapp":"not_supported","telegram":"yes","discord":"yes","slack":"yes","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1MessageUnsendCommand":{"type":"object","properties":{"target":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, from a `message` or `command` frame. Wins over a recipient when both are named."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for a message this line sent in that conversation."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"Which channel the recipient is on. Optional; from `x-mapier-version` `2026-10-01` an unnamed channel is the project’s one channel, and a 422 at `target.channel` when it has lines on two."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to act from, as `GET /v1/whoami` lists it. Optional: the platform picks otherwise."}},"required":["conversationId","messageId"],"additionalProperties":{},"description":"The line’s own message, by our ids for it and its conversation."},"payload":{"description":"Nothing. Leave the payload out.","type":"object","properties":{},"additionalProperties":false}},"required":["target"],"title":"message.unsend","x-mapier-command-type":"message.unsend","description":"The body of `POST /v1/commands/message.unsend`: a message the line sent, taken back. Carried on iMessage, Telegram, Discord and Slack lines.","x-channels":{"tier":"shared_optional","cells":{"imessage":"yes","whatsapp":"not_supported","telegram":"yes","discord":"yes","slack":"yes","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1AppCardUpdateCommand":{"type":"object","properties":{"target":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The first card’s `messageId`, or that of any update of it. The update always replaces the first card."}},"required":["messageId"],"additionalProperties":false,"description":"The card to replace, and nothing else: it goes into that card’s own thread, on its own line."},"payload":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":4096,"description":"The app’s new state, an https, http or data URL. Nothing on Mapier’s side fetches it."},"layout":{"type":"object","properties":{"caption":{"type":"string","minLength":1,"maxLength":4096,"description":"The card’s first line."},"subcaption":{"description":"The card’s second line.","type":"string","minLength":1,"maxLength":4096}},"required":["caption"],"additionalProperties":false,"description":"The words drawn where the app does not draw the card itself."},"interactive":{"description":"Whether an installed app draws the card itself. Left out, the card keeps its last value. Set it true only for an app that draws its own bubble: Messages starts such an app as soon as the card is on screen, and an app that does not support it shows its whole screen in the bubble.","type":"boolean"},"summary":{"description":"What the person sees of the version this update replaces.","type":"string","minLength":1,"maxLength":4096}},"required":["url","layout"],"additionalProperties":false,"description":"The card’s new link and words. The app cannot change, and an update is never a reply."}},"required":["target","payload"],"title":"app_card.update","x-mapier-command-type":"app_card.update","description":"The body of `POST /v1/commands/app_card.update`: an iMessage app card this line sent, replaced in place. Carried on iMessage lines.","x-channels":{"tier":"shared_optional","cells":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel","docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"}}},"V1UntypedCommand":{"type":"object","properties":{"target":{"default":{},"description":"Who the command is about — for `message.send`, `{\"recipient\": \"+15550100777\"}`. The shape is per command type and the transport is the authority on it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"payload":{"default":{},"description":"What the command does — for `message.send`, `{\"text\": \"…\"}`. Omit the whole body for a command that needs neither. On `message.send` and the four `whatsapp.*.send` types a key the resolved line cannot carry is a 422 at `payload.<key>`, never dropped.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"options":{"description":"How to treat what the line cannot carry. Omit it for the default: refuse, never reshape.","type":"object","properties":{"ifUnsupported":{"description":"On `typing.start` or `message.read` only: `skip` answers `200 {\"skipped\": true}` instead of a refusal when the line cannot carry the command, and sends nothing. `refuse`, the default, refuses. On any other type it is a 422.","type":"string","enum":["refuse","skip"]},"degrade":{"description":"`adapt` lets the platform drop or split a part the channel cannot carry — an effect, a caption on Messenger — and says what it changed. `strict`, the default, refuses instead.","type":"string","enum":["strict","adapt"]}},"additionalProperties":false}},"title":"untyped","description":"The body of every other command type, whose `target` and `payload` the transport behind the line is the authority on — the operation’s description lists what is checked before anything is sent."}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A project API key, issued in the console and shown once. `mp_live_` or `mp_test_` followed by 43 characters. A malformed, unknown, revoked or expired key is one 401 — the four are indistinguishable on purpose, so the response cannot tell a thief which string they found is worth keeping. A key carries scopes, chosen when it is created: `messages:send`, `messages:read`, `lines:write` and `webhooks:write`. Each operation’s security requirement names the scope it needs, and a key without it is a 403 `insufficient_scope`. `GET /v1/whoami` lists a key’s scopes."},"personalToken":{"type":"http","scheme":"bearer","description":"A personal access token: a person’s credential in one organization, made in the console and shown once. `mp_pat_` followed by 43 characters. It calls the operations that name this scheme and no others; any other operation answers it a 403 `forbidden`. A call needs the scope the operation names on the token AND the capability of the same name in its owner’s role now, asked on every call: a token never does more than its owner can. A malformed, unknown, revoked or expired token, or one whose owner left the organization, is a 401 `invalid_credentials`, as an unknown key is. An operation about one project — every one that names this scheme except `listProjects`, `getProject`, `listMembers`, `listAuditLogs` and `getCapabilities` — names its project in the `x-mapier-project` header (the project’s id, as `listProjects` lists it, never a slug), which is required: not sent, it is a 400 `bad_request` with `reason: \"missing_header\"`. Its environment is the `x-mapier-environment` header, `live` or `test`, which is optional: not sent, the call is `live`. A malformed header is a 422 `validation_failed` at the header, an environment the token was not made for a 403 `forbidden` with `reason: \"environment\"` (a token made for `test` alone gets it when it sends no environment), and a project the token cannot reach — one its owner cannot open, outside its list, another organization’s or unknown — a 404 `not_found`, the answer an unknown id gets. An archived project is the 409 `project_archived` a key gets. The answer echoes both headers, the environment included when it was not sent. A project API key ignores them."}}},"security":[{"apiKey":[]}],"paths":{"/v1/public/channel-availability":{"get":{"operationId":"getChannelAvailability","tags":["Project"],"summary":"Which channels are on","security":[],"description":"Every channel, and whether it is on for everyone: what docs.mapier.ai and mapier.ai show. Needs no key. `offered` is true only when the channel is on for every organization, so a channel on for some organizations reads false here. `tag` is the channel’s release word, such as `Beta`, for display. What your own project can use is `GET /v1/whoami` and `GET /v1/capabilities`.","responses":{"200":{"description":"Every channel, in a fixed order.","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"offered":{"type":"boolean","description":"True when the channel is on for every organization. False when it is on for some or none."},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The channel’s release word, such as `Beta` or `Soon`. Null when it has none."}},"required":["key","offered","tag"]},"description":"Every channel, in a fixed order."}},"required":["channels"]},"example":{"channels":[{"key":"imessage","offered":true,"tag":"Available"},{"key":"rcs","offered":false,"tag":"Not planned"},{"key":"sms","offered":false,"tag":"Not planned"},{"key":"whatsapp","offered":false,"tag":"Beta"},{"key":"voice","offered":false,"tag":"Not planned"},{"key":"telegram","offered":false,"tag":"Soon"},{"key":"signal","offered":false,"tag":"Not planned"},{"key":"apple_business","offered":false,"tag":"Not planned"},{"key":"discord","offered":false,"tag":"Soon"},{"key":"slack","offered":false,"tag":"Soon"},{"key":"messenger","offered":false,"tag":"Soon"}]}}},"headers":{"Cache-Control":{"description":"Always `public, max-age=60`: the body may be reused for a minute.","schema":{"type":"string"}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/cli/logins":{"post":{"operationId":"startCliLogin","tags":["Sign-in"],"summary":"Start a sign-in from a terminal","security":[],"description":"Starts a sign-in for a command-line tool, with no credential. Show the person `userCode` and `verificationUrl` (or open `verificationUrlComplete`); they sign in to the console, choose an organization and approve. Meanwhile poll `POST /v1/cli/logins/token` with `deviceCode` every `interval` seconds (5 to start). The login works once and for 10 minutes. Keep `deviceCode` to the tool: whoever holds it receives the token once the person approves.","requestBody":{"description":"What to call this machine, optionally.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceName":{"description":"What to call this machine. It is kept as letters, digits, spaces and `. - _ ( ) @ '`, at most 64 characters: a typographic apostrophe becomes a plain one, an accented letter loses its accent and any other character is dropped. The token is named `CLI on <deviceName>`, or `CLI` without one or when nothing is left. The person approving sees it marked as sent by this request, not checked.","type":"string","maxLength":256}}},"example":{"deviceName":"build-box"}}}},"responses":{"201":{"description":"The codes and the link.","content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","description":"The secret this tool polls with. Keep it to this process; never show it to anyone."},"userCode":{"type":"string","description":"What the person types or checks on the page: `KQ7M-2PXD`."},"verificationUrl":{"type":"string","description":"The page to open, signed in to the console."},"verificationUrlComplete":{"type":"string","description":"The same page with the code filled in."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When the login stops working: ten minutes from now."},"expiresIn":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The same, in seconds."},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"How many seconds to wait between polls."}},"required":["deviceCode","userCode","verificationUrl","verificationUrlComplete","expiresAt","expiresIn","interval"]},"example":{"deviceCode":"mp_cli_example-not-a-real-device-code","userCode":"KQ7M-2PXD","verificationUrl":"https://convo.mapier.ai/app/cli","verificationUrlComplete":"https://convo.mapier.ai/app/cli?code=KQ7M-2PXD","expiresAt":"2026-09-02T14:20:00.000Z","expiresIn":600,"interval":5}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/cli/logins/token":{"post":{"operationId":"pollCliLogin","tags":["Sign-in"],"summary":"Poll a sign-in from a terminal","security":[],"description":"Where a sign-in stands, by its `deviceCode`, with no credential. `status` is `pending` (poll again after `interval`), `slow_down` (you polled too soon; `interval` has grown), `denied`, `expired`, `used` (its tokens were already handed over) or `approved`. `approved` is answered once, to the first poll after the approval, and carries two tokens: `accessToken`, a personal access token to send as the bearer, which lasts 1 hour, and `refreshToken`, which is never a bearer and is exchanged at `POST /v1/cli/tokens/renew` for a new pair. The sign-in carries every scope the person’s role allowed at the sign-in, every project, live, and ends 60 days after it, however often it renews. Store both now; no request returns either again. A person already holding ten active tokens in that organization is a 409 `limit_reached`: they revoke one, and the next poll succeeds while the login lasts. An unknown device code is a 404.","requestBody":{"description":"The device code the start answered.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":200,"description":"The `deviceCode` the start answered."}},"required":["deviceCode"]},"example":{"deviceCode":"mp_cli_example-not-a-real-device-code"}}}},"responses":{"200":{"description":"Where it stands, or the first pair.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"pending","description":"Nobody has approved or denied it yet. Poll again after `interval`."},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["status","interval"]},{"type":"object","properties":{"status":{"type":"string","const":"slow_down","description":"Polled sooner than `interval`. Wait `interval`, which has grown."},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["status","interval"]},{"type":"object","properties":{"status":{"type":"string","const":"denied","description":"The person denied it. Start again."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","const":"expired","description":"Ten minutes passed before a token was handed over. Start again."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","const":"used","description":"Its token was already handed over, to the first poll after the approval. Start again."}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","const":"approved","description":"Approved: the first pair, in this answer only."},"accessToken":{"type":"string","description":"A personal access token, `mp_pat_…`: send it as the bearer. It lasts an hour."},"accessTokenExpiresAt":{"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":"When the access token stops working."},"refreshToken":{"type":"string","description":"A refresh token, `mp_refresh_…`: never a bearer. Exchange it at `POST /v1/cli/tokens/renew` for a new pair before the access token expires, and keep only the newest: a replaced one presented again ends the sign-in."},"refreshTokenExpiresAt":{"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":"When the sign-in ends: renewals do not extend it."},"tokenId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The sign-in, as the console lists it. The same across renewals."},"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"description":"The organization it belongs to."},"role":{"type":"string","enum":["member","developer","admin"],"description":"The role its owner holds there now; the token never does more."},"scopes":{"type":"array","items":{"type":"string","enum":["projects:read","projects:write","lines:read","lines:write","webhooks:read","webhooks:write","api_keys:read","messages:read","messages:send","members:read","audit:read"]},"description":"What it may do: everything that role allowed at the sign-in. A renewal never widens it."}},"required":["status","accessToken","accessTokenExpiresAt","refreshToken","refreshTokenExpiresAt","tokenId","organization","role","scopes"]}]},"examples":{"pollCliLogin":{"summary":"Approved: the first pair, once. Before that, `{\"status\": \"pending\", \"interval\": 5}`.","value":{"status":"approved","accessToken":"mp_pat_example-not-a-real-token","accessTokenExpiresAt":"2026-09-02T15:12:00.000Z","refreshToken":"mp_refresh_example-not-a-real-token","refreshTokenExpiresAt":"2026-11-01T14:12:00.000Z","tokenId":"0192a7f3-6f70-7182-9d93-0f1a2b3c4d5e","organization":{"id":"0192a7a0-0b1c-7d2e-8f3a-4b5c6d7e8f90","slug":"acme","name":"Acme"},"role":"developer","scopes":["projects:read","projects:write","messages:read","messages:send"]}}}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `limit_reached`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["limit_reached"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"limit":{"type":"string","description":"Which limit was reached: on a send to a test line, `sharedLineSendsPerDay` or `sharedLineNonRepliesPerDay`; on a line setup, `purchasedLines`, the dedicated lines the organization pays for."},"maximum":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"That limit’s value. A test line’s two reset at 00:00 UTC; `purchasedLines` moves when the organization adds lines on its Billing page."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/cli/tokens/renew":{"post":{"operationId":"renewCliSignIn","tags":["Sign-in"],"summary":"Renew a terminal sign-in","security":[],"description":"Exchanges the newest `refreshToken` for a new pair: a new access token for the next hour, and a new refresh token that replaces the one sent. Renew before the access token expires; an access token already issued keeps working until its own expiry, so a call or a stream holding it is not cut off. Keep only the newest refresh token: one already replaced, sent again, ends the whole sign-in, unless it is within 30 seconds of its replacement, when it is only refused, so that two processes renewing at once cost one of them a retry with the pair the other stored. Every refusal is the same 401, whatever its reason: an unknown, replaced or expired refresh token, a revoked sign-in, or one whose owner left the organization. The sign-in’s scopes never widen. No bearer: the refresh token is in the body.","requestBody":{"description":"The newest refresh token.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1,"maxLength":200,"description":"The newest refresh token this sign-in was answered."}},"required":["refreshToken"]},"example":{"refreshToken":"mp_refresh_example-not-a-real-token"}}}},"responses":{"200":{"description":"The new pair.","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string","description":"A personal access token, `mp_pat_…`: send it as the bearer. It lasts an hour."},"accessTokenExpiresAt":{"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":"When the access token stops working."},"refreshToken":{"type":"string","description":"A refresh token, `mp_refresh_…`: never a bearer. Exchange it at `POST /v1/cli/tokens/renew` for a new pair before the access token expires, and keep only the newest: a replaced one presented again ends the sign-in."},"refreshTokenExpiresAt":{"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":"When the sign-in ends: renewals do not extend it."},"tokenId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The sign-in, as the console lists it. The same across renewals."}},"required":["accessToken","accessTokenExpiresAt","refreshToken","refreshTokenExpiresAt","tokenId"]},"example":{"accessToken":"mp_pat_example-not-a-real-token-2","accessTokenExpiresAt":"2026-09-02T16:10:00.000Z","refreshToken":"mp_refresh_example-not-a-real-token-2","refreshTokenExpiresAt":"2026-11-01T14:12:00.000Z","tokenId":"0192a7f3-6f70-7182-9d93-0f1a2b3c4d5e"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/cli/tokens/revoke":{"post":{"operationId":"revokeCliSignIn","tags":["Sign-in"],"summary":"Sign out with a refresh token","security":[],"description":"Ends the sign-in a refresh token belongs to, both its tokens at once: what `convo logout` does when its access token has expired. Any refresh token the sign-in was answered ends it. Always a 204, for an unknown token too, so the answer says nothing about the token. With a live access token, `POST /v1/personal-tokens/current/revoke` does the same.","requestBody":{"description":"A refresh token of the sign-in.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1,"maxLength":200,"description":"Any refresh token the sign-in was answered."}},"required":["refreshToken"]},"example":{"refreshToken":"mp_refresh_example-not-a-real-token"}}}},"responses":{"204":{"description":"Signed out, or nothing to sign out. No body."},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/commands/{type}":{"post":{"operationId":"sendCommand","tags":["Commands"],"summary":"Send a command","security":[{"apiKey":["messages:send"]},{"personalToken":["messages:send"]}],"description":"The one route an agent calls. The types that put a bubble on the recipient’s handset write a message row — `message.send`, all four `whatsapp.*.send` and `messenger.interactive.send`; every other type is a thing done to a thread, recorded as a `command.settled` event and nothing else. A type this channel never carries is a 404 `unsupported_command` with `reason: not_on_channel`, while a type it carries that this line cannot is a 202 that settles `failed`. The 202 is a handle, not a delivery: watch `/v1/response_stream` for the terminal status. A command addressed to a recipient may name the line it goes out on at `target.lineId`, the line’s `id` as `GET /v1/whoami` lists it, and the line then says the channel too. With none, it goes out on the number the recipient last wrote to: the line of their newest inbound message in a one-to-one conversation on that channel, among this project’s lines that are active — whether or not that line’s connection is answering — and, where they have written in on no active line, the line their conversation with this project began on, which is refused `line_unavailable` if that line is itself paused or released; for somebody new the platform picks one. A reply, naming `target.replyToMessageId`, goes out on the line of the conversation holding the message it answers. A send into a conversation, by `target.conversationId`, always goes out on that conversation’s line. Naming another line than the one the recipient was first reached on opens a second conversation with them on that line beside the first; their first line does not move. That person then sees two numbers from one business, which Apple reads as spam on iMessage. The platform never does this on its own. An id that is not a line of this project in the environment of the key — another project’s, the other environment’s, or nobody’s — is the 403 `line_not_allowed`, whose `details.lineId` is the id sent; `GET /v1/whoami` lists the lines the key can use. A 422 `validation_failed` at `target.lineId` refuses, before anything is written, a line on another channel than `target.channel` names, and one other than the line a `conversationId` names (a conversation stays on its line). A command done to a thread, naming a line the person is not on, acts in the conversation this project already has with them there and is refused at `target.lineId` where there is none. A named line that is paused, released, full or whose connection is down is refused as a send to that line is. The 202 names the line the command went out on, `lineId`, and why that one, `lineSelection`. A message the channel refuses is still recorded: it is settled `failed` — `needs_reconcile` when the refusal does not prove nothing was delivered — and announced as `message.failed` (or `message.needs_reconcile`) with `commandId: null`. The refusal names it as `details.messageId` wherever its `details` is an object, except under a `conflict`’s `idempotency_key_reused`, `idempotency_key_failed` and `idempotency_key_unresolved`, where a `messageId` is always an earlier send’s; otherwise the event alone names it — a channel’s `internal_error` and `payload_too_large` carry no `details`, its `not_found`, `rate_limited` and `unsupported_command` may carry none, and a `validation_failed`’s `details` is the field list. A command done to a thread — every type but the message types and `group.create` — is addressed to somebody this project already has a conversation with: to a recipient it has none with it is a 422 `validation_failed` at the target field you wrote them at — `target.recipientExternalId` or whichever of its spellings you used — before anything is written. On `message.send` the payload carries what the line carries, and nothing is dropped: `text` (or `body`, never two different ones) on every line; on an iMessage line, live or test, `effect`, `subject` and `textFormatting` as well, on its conversation path (below); and on a WhatsApp line, live or test, `platform.whatsapp.previewUrl` as well; a WhatsApp line takes a text of at most 4096 characters; a Discord line takes a text of at most 2000 characters; a Slack line takes a text of at most 40000 characters; a Messenger line takes a text of at most 2000 characters; a Telegram line takes a text of at most 4096 characters; an iMessage line takes a text of at most 65536 bytes of UTF-8. A WhatsApp line also sends media, by link: `kind: \"media\"` with an https `url` WhatsApp fetches itself (a test line never fetches it) and an optional `caption` of 1 to 1024 characters, in place of the text. A staged upload (`media.transferId`) cannot be sent. A live iMessage line sends a photo or file by link as well — `kind: \"media\"` with an https `url` of at most 2048 characters — only on its conversation path (below) and with no `caption`. The platform fetches the link itself before anything is written — https only, at most 8 MiB, from a server that answers promptly, every redirect re-checked and none into a private network, and only an image, a PDF, common audio or video, or a vCard contact card (`.vcf`) whose declared type matches its bytes.A link it cannot use is a 422 at `payload.url` whose entry names the reason (`media_fetch_refused`, `media_fetch_failed`, `media_too_large` and `unsupported_media_type`), and while your project, or this platform, is already sending as many files as it can at once the answer is a 503 `service_busy` with `retryAfter`; neither writes a message, so the same `Idempotency-Key` may be sent again. Once the file is with the line the message is written and sent, the request waiting while the file is still reaching the line: one that does not arrive in time is the 503 `upstream_unavailable` with `reason: timeout`, and one the line no longer holds `reason: media_not_staged`, each naming the message, which is settled `failed`. Its test line refuses one by name at `payload.url` in a conversation the contact has written into, and in any other with the live line’s `reason: conversation_not_confirmed`. A Discord or Slack line sends media by link as well, the same three keys, the line downloading the link itself; it sends a direct message to one person, addressed by their own user id (a Discord user id, or a Slack member id such as `U0123ABCD`), or into a room it has filed as a group, by that conversation’s `conversationId` — never to a channel id; and it is live only, its test pair a 503 `line_unavailable` with `reason: channel_not_available`. A Messenger line sends to the page-scoped id (PSID) of a person who has written to the Page, live only as Discord and Slack are; Meta lets a Page answer within 24 hours of the person’s last message, and a send past that is accepted and settles `failed` with `errorCode: outside_service_window`. `messenger.interactive.send` sends `text` with one to 13 `quickReplies` (`title`, `payload`) or one to three `buttons` (`postback`, `web_url` or `phone_number`), never both, each bound refused at its field before anything is written; a person’s tap comes back as a message of `kind: interactive_reply`. Any other key — another channel’s option included, and iMessage’s `effect` and `subject` off its conversation path — is a 422 `validation_failed` at `payload.<key>`, refused before anything is written, with the line’s `channel` and the keys it `carries` in the same entry. The media keys are checked for shape before the line is known — `url` or `caption` without `kind: \"media\"`, a link that is not https, a caption out of bounds — so that 422 names the key and carries no `channel` or `carries`. A null option is absent. The four `whatsapp.*.send` payloads are held to the same rule and to WhatsApp’s own bounds — a latitude within ±90 and a longitude within ±180, one to three reply buttons, ten rows in a list, a contact card’s name of at most 1024 characters — each refused at its field before anything is written. A reply names a message in the same conversation at `target.replyToMessageId`; any other is a 422 there. A reply, `target.replyToMessageId`, is quoted on a WhatsApp line, live or test, and on a Discord line, and sent into the replied message’s thread on a Slack line, when it names a message the contact sent, and on an iMessage line, live or test, when the message goes on the conversation path below and names a message the contact sent or one of yours whose `command` frame carried an `externalId`; any other is a 422 `validation_failed` at `target.replyToMessageId` before anything is written, never a message sent unquoted. A live iMessage line sends on one of two paths, chosen by the thread. Into a thread whose conversation the line has confirmed is with that one contact — which it does when it reports the conversation, the first time it sees it — or whose conversation the line has reported as a group chat — into which a message reaches every member, and which takes every kind but `location_request` — every message goes on the conversation path, which reaches the contact at whatever address the conversation is with, an email address included, carries `effect` (one of `impact`, `loud`, `gentle`, `invisibleink`, `confetti`, `lasers`, `fireworks`, `balloons`, `sparkles`, `spotlight`, `echo`, `love` and `celebration`) and `subject` (1 to 1024 characters) beside `text`, quotes a reply at `target.replyToMessageId` when it names a message the contact sent or one of yours whose `command` frame carried an `externalId`, honours `Idempotency-Key`, and is the one path for the message kinds the recipient path cannot carry — `media`, `sticker`, `rich_link`, `multipart`, `location_request`, `poll` and `app_card`, of which a live iMessage line sends `media`, `sticker`, `rich_link`, `multipart`, `location_request`, `poll` and `app_card` today — a photo or file by its `url`, with no `caption`, `effect` or `subject` beside it. On the conversation path a command the line has not taken within 30 seconds expires — its `command` frame settles `expired`, `failureClass: not_run` — where the recipient path waits five minutes; while the line is offline the send is refused at once, a 503 `upstream_unavailable` with `reason: no_live_connector`; and while sending on the line is paused the send is accepted, 202, and its command then expires. Into any other thread a text goes on the recipient path — so a conversation can still be opened by writing first — which takes a phone number with its country code, such as +14155550123, never an email address, lets a command wait five minutes and has three limits: its message is `text` alone, which the line refuses (`invalid_text`, once the message is written) when blank or over 16 KiB; nothing but text reaches the handset — no effect, subject, quoted reply or attachment; and it does not honour `Idempotency-Key` — a retry under a key is answered from this platform’s own record and never posted twice, but a send whose answer was lost settles `needs_reconcile` rather than being retried, and its `command` frame carries the line’s own `logicalActionId`. What a path cannot carry is a 422 `validation_failed` before anything is written: an email address, at the target field you wrote it at — `target.recipientExternalId` or whichever of its spellings you used — and at `target.conversationId` when it is the peer of a thread you named that takes the recipient path; on the recipient path, `effect` and `subject`, at `payload.<key>`, and a reply, at `target.replyToMessageId`; on the conversation path, an `effect` outside those names or a `subject` outside that length, at `payload.<key>`, and a reply to a message that carries no iMessage id — one the contact did not send and whose `command` frame carried no `externalId` — at `target.replyToMessageId`; a message of a kind only the conversation path carries, into any other thread, at `target.conversationId` or the recipient key you wrote, with `reason: conversation_not_confirmed` — send the person a text first (into a group chat, `location_request` is refused the same way and no text changes that — send it into a member’s own one-to-one conversation); and on either, a group conversation the line has not named yet, at `target.conversationId` — with that same `reason` for a kind only the conversation path carries, a poll among them, and with no `reason` for any other kind. On an iMessage line, live or test, `reaction.tapback` and `name_photo.share` are done in the conversation named at `target.conversationId`, which the line must have named — it names one when the contact first writes into it — and `name_photo.share` only in a conversation with one person; a `reaction.tapback` names its message at `payload.targetMessageExternalId`, by the `externalId` its `message` frame carried, or by the message’s own `messageId` where the contact sent it. `group.create` names 2 to 32 other people at `target.participantExternalIds` (or `participants`), each an address the channel parses — an E.164 number or a lower-case Apple ID email of at most 512 characters, with no control character and in composed Unicode (NFC) — sent in its canonical form and counted once. Each is a 422 `validation_failed` at that field before anything is sent when it cannot be addressed so: a conversation the line has not named; a message named by its `messageId` that the line sent — there is no iMessage id on it to name — or that another conversation holds; and a participant list outside those bounds or holding an address that is not one of those. Where only the line can tell, it answers: a conversation it has named with a group’s id — as it may one the contact first wrote into from a group — refuses a `name_photo.share` with a 400 `bad_request` whose `reason` is `invalid_target`, and a `reaction.tapback` there on a message sent one to one settles `failed` with `stale_target`. An iMessage line reacts to a message with `reaction.set` and takes its reaction back with `reaction.remove`, each done in the conversation at `target.conversationId` as a `reaction.tapback` is, naming the message at `payload.targetExternalId` — by the `externalId` its `message` frame carried, or by the message’s own `messageId` where the contact sent it — or at `target.messageId` by that `messageId`, and the reaction at `payload.emoji`, one emoji. The six classic emoji (❤️ 👍 👎 😂 ‼️ ❓) are sent as iMessage’s classic reactions (tapbacks), and any other emoji as an emoji reaction. A line that cannot send emoji reactions, or cannot take a reaction back, settles the command `failed` with `capability_constraint_violation` and changes nothing. A `reaction.remove` names the emoji it takes back, since iMessage removes a reaction by its emoji. On a live line each is also a 422 `validation_failed` before anything is sent: at `payload.emoji` for a missing emoji or one that is not one emoji, and at `payload.<key>` for any key but those two. A test line accepts both and settles them `failed` with `unsupported_capability`. An iMessage line does `typing.start` only in a conversation with one person, at `target.conversationId`, that the line has named and also confirmed is with that one person — a 422 `validation_failed` at `target.conversationId` otherwise, whose `reason` is `conversation_not_confirmed` where the conversation is named but not yet confirmed: send the person a text first. It shows the typing bubble on their phone for about twelve seconds, or until the line sends into the conversation; there is no call that takes it down, and to hold it up, send it again. It is fire-and-forget: the 202 is followed by a `command.settled` that is `succeeded` once the line took the signal, or `failed` with the code of what it answered instead (`not_found`, `rate_limited`, `upstream_unavailable`) — never a promise that the phone drew it — and it is never retried. At most one signal per conversation per 5 seconds is sent; another inside that window is accepted and settles `succeeded` without being sent again, the bubble the first raised being still up. Typing the contact does is not carried: no frame, event or webhook says a person is typing. An iMessage line does `message.read` only in a conversation with one person, at `target.conversationId`, that the line has named and also confirmed is with that one person, as it does `typing.start` — a 422 `validation_failed` at `target.conversationId` otherwise, whose `reason` is `conversation_not_confirmed` where the conversation is named but not yet confirmed. It marks the whole conversation read on the line. The person sees “Read” under their message only when the line has read receipts turned on. With them off it still succeeds and the person sees nothing. That is the line reading the person’s messages: the person reading the line’s arrives as the `message.read` event, as before. `payload.externalId`, the message a WhatsApp line marks read up to, may name a message here as well — by the `externalId` its `message` frame carried, or its `messageId` — and is a 422 `validation_failed` there when it is not an id or names a message of another conversation; the whole conversation is marked read either way. On an iMessage line it is fire-and-forget like `typing.start`: `succeeded` once the line took the signal, or `failed` with the code of what it answered instead, never a promise that the person saw it, and never retried. Every `message.read` is sent, none held back inside a window, because one held back would leave a message that arrived since the last unread. On an iMessage line `typing.start` and `message.read` share a budget of 12 signals per conversation in 60 seconds, counted from the first: past it either is accepted and settles `failed` with `rate_limited` without being sent. Neither honours `Idempotency-Key` on a live iMessage line: the same key again is a new signal, and the key comes back as the settlement’s `logicalActionId`. An iMessage line changes or takes back a message it sent: `message.edit` with the new text at `payload.text` (not blank, at most 65536 bytes of UTF-8), and `message.unsend` with no payload, each naming the message at `target.messageId` — the `messageId` this platform gave it, which its `command.settled` carries — in the conversation at `target.conversationId`, a group’s included. An edit is allowed within 15 minutes of the message being sent and an unsend within 2 minutes; the person sees the new text marked Edited, or the message gone and marked Unsent. Each is a 422 `validation_failed` before anything is sent: at `target.messageId` whose `reason` is `invalid_target` for a message that is not in that conversation or was not sent from this line, `not_yet_addressable` for one the line has not given an id — still being sent, failed, or a rich link that settled with no `externalId` — and `window_elapsed` past the window; and at `payload.<key>` for any key but those. The message this platform stores is not changed: its text stays what was sent, and an unsent message stays in the thread. The 202 is followed by a `command.settled`: `succeeded` once the line read the change back; `failed` with `stale_target` when the line no longer finds the message inside its window — which is also how an unsend that already worked settles when it is sent again — or with `invalid_target`; or `ambiguous` with `moderation_unverified` when the line could not prove what happened. That one means the message may or may not have been changed: ask the person rather than retrying blindly, and do not wait for it to settle further, which it may never do. While the line’s sending is paused, each is refused at once, a 503 `upstream_unavailable` whose `reason` is `outbound_paused`, rather than held past its window. An iMessage line reads and sets its own Name and Photo — the name and photo the people it writes to see — with `name_photo.get` and `name_photo.set`, each done to the line itself: the target is `{lineId}`, the line’s `id` as `GET /v1/whoami` lists it, and names nobody and no conversation. `name_photo.get` takes no payload. `name_photo.set` takes at least one of `payload.name` (the name people see), `payload.firstName` and `payload.lastName` — each text, not blank, at most 128 characters, the first and last name joined for display when no `name` is given — and `payload.photoUrl`, an https link to a JPEG, PNG, GIF, WEBP or HEIC image of at most 8 MiB that this platform fetches and hands to the line before anything is sent; a photo left out is kept. Each is refused before anything is sent: at `target.lineId`, the 403 `line_not_allowed` for an id that is not a line of this project in the environment of the key; and a 422 `validation_failed` at `payload.<key>` for any other key, a blank or over-long name or a link that is not https, at `payload` for a set naming nothing to change, and at `payload.photoUrl` — its `reason` one of the link refusals a media send meets, or the line’s own `image_too_large` or `unreadable_image` once it has the picture — for a link that cannot be fetched or a file that is not such an image or is too large. A line on another channel is the 404 `unsupported_command` whose `reason` is `not_on_channel`; a paused or released line is the 503 `line_unavailable`. The 202 is followed by a `command.settled` carrying `namePhoto` — the card’s `name`, `firstName`, `lastName` and whether it `hasPhoto`; the photo itself is not returned — on a `succeeded` get, and on a `succeeded` set once the line read the change back. A set the line could not prove settles `ambiguous`: read the card with `name_photo.get` before setting it again. A line not yet updated to carry the card settles `failed` with a capability code and changes nothing. A test line carries both: its card starts as the line’s name, a set changes it and the Sandbox page shows it, and a photo link is fetched and checked as live checks it but is not kept or shown. While the line’s sending is paused a set is refused at once, a 503 `upstream_unavailable` whose `reason` is `outbound_paused`. An iMessage line does `group.update` only in a group chat and `group.leave` only in a group chat — a conversation the line reported as a group when it first saw it, named at `target.conversationId` (a message sent into such a conversation goes on the conversation path, to every member — every kind but `location_request`, which is refused there as into any conversation that is not one confirmed person’s). A conversation with one person, one the line has not named, or an address of someone this project has already exchanged messages with, in place of a conversation, is a 422 `validation_failed` at `target.conversationId` before anything is sent (an address it has not is refused at the field you wrote it at, as for every command done in a conversation). `group.update` carries one action at `payload.action`: `rename`, with `name` of at most 128 characters, not blank and with no ASCII control character; `add_participant` or `remove_participant`, with `participantExternalId`, one address the channel parses — an E.164 number or a lower-case Apple ID email of at most 512 characters, with no ASCII control character and in composed Unicode (NFC), as `group.create`’s participants are — sent in its canonical form; `set_photo` is refused at `payload.action` until a group photo can be sent by link. `group.leave` takes an empty payload. A name, an address, an action or a key outside those is a 422 `validation_failed` at its own field before anything is written. What the line can still answer, at once: a group it has seen no message in yet refuses an `add_participant` or `remove_participant` with a 409 `conflict` whose `reason` is `group_has_no_messages_yet` — send a message into it first (a `rename` is not held back); and while the line is offline it refuses either command, a 503 `upstream_unavailable` whose `reason` is `connector_unavailable`. A command it accepts, it answers on the `command.settled` that follows the 202: `succeeded` once the line read a `group.update`’s change back, or sent a `group.leave` without an error (sent, not proven — nothing reads a leave back); `failed` with `command_claim_invalid` for an `add_participant` naming someone already in the group, or a `remove_participant` naming someone not in it, as the line last saw its members; `failed` with `stale_target` for a group addressed right after its membership changed, before its next message — a message sent into it then included; `failed` with `gateway_rejected` for a change the line refused before making it, a removal that would leave the group smaller than Apple allows among them; `failed` with `capability_constraint_violation` for an `add_participant` or `remove_participant` on a line that has not announced member changes; `expired` with `command_expired_before_execution`, nothing changed, while sending on the line is paused — it accepts either, and holds it until sending resumes or the command’s time runs out; and `ambiguous` with `group_update_unverified` for a change the line sent and could not read back — check the group’s name or members on a phone in it before sending the change again. A leave whose sending errored settles `ambiguous` with `group_leave_unverified`, so the line may still be in the group. And Apple lets a member leave only a group of at least 4 people, the line among them: in a smaller group a `group.leave` is sent, changes nothing and still settles `succeeded`. After either, check on a phone in the group before leaving again; a leave that did happen cannot be undone. A leave that settles `succeeded` closes the conversation for the line at once (`conversation.status_changed`, reason removed), and a send into it is then refused; if the line is still in the group, the group’s next message opens it again. On a test iMessage line a well-formed call to either is that 422 at `target.conversationId`: the sandbox files no group chat, so no conversation there is one. An iMessage line votes on a poll in a conversation with `poll.vote`: the conversation at `target.conversationId`, a group’s included, which the line must have named, and the poll and the choice at `payload.pollExternalId` and `payload.optionExternalId`, exactly as the poll’s `poll.created` event carried them, or a later `poll.options_changed` for a choice added since (`?events=polls`) — for a poll the line sent as for one it received. A vote adds its choice to the line’s selection, as Apple’s polls take several; voting for another choice does not take the first back. Each is a 422 `validation_failed` before anything is sent: at `payload.pollExternalId` or `payload.optionExternalId` for an id missing or not of that form, at `payload.remove` — taking a vote back is not carried yet, no line announcing it — and at `payload.<key>` for any other key. The 202 is followed by a `command.settled`: `succeeded` once the line voted, and a `poll.voted` with `actor: line` carrying its whole selection on `?events=polls`; `failed` with `stale_target` when the poll is not among the conversation’s 30 newest messages, or with a capability code on a line that does not vote; or `ambiguous` with `poll_vote_unverified` when the line could not prove the vote — read the poll’s next `poll.voted` before voting again. A test line carries it: the vote is made on the poll the test line sent, and nobody on the test phone votes. An iMessage line sets or removes the background of a conversation: `chat_background.set` with the background’s name at `payload.preset`, one of: `gradient`, `color_mango`, `color_ice`, `color_plum`, `color_deep_sea`, `color_green_apple`, `color_cherry`, `color_bubblegum`, `color_tangerine`, `color_magenta`, `color_lime`, `color_silver`, `color_carbon`, `color_stone`, `custom`, `aurora_green`, `aurora_purple`, `aurora_pink`, `sky_dusk`, `sky_haze`, `sky_sunset`, `sky_clear`, `sky_sunrise`, `sky_dawn`, `water_light`, `water_dark`, `glitter_gold`, `glitter_copper`, `glitter_silver`, `photo`; `gradient` is Apple’s default, the `color_*` names are Apple’s two-colour gradients, the `aurora_*`, `sky_*`, `water_*` and `glitter_*` names are Apple’s animated backgrounds, `custom` is a gradient of two colours you give at `payload.colors`, an array of exactly two strings, each `#RRGGBB`, and `photo` is a picture you give at `payload.photoUrl`, an https link of at most 2048 characters to a JPEG, PNG, HEIC/HEIF or WebP image (not a GIF) of at most 8 MiB and 100 megapixels, no side over 65,535 px, which this platform fetches and hands to the line before anything is sent — the line re-encodes it as a JPEG whose long side is at most 3,072 px, transparent areas become white, and the background shows it cropped to fill the screen; and `chat_background.remove` with an empty payload. Each is done in the conversation at `target.conversationId` — a conversation with one person that the line has named and also confirmed is with that one person, or a group chat it reported — and each is a 422 `validation_failed` before anything is sent: at `target.conversationId` for an address of someone this project has already exchanged messages with, in place of a conversation (an address it has not is refused at the field you wrote it at, as for every command done in a conversation), for a conversation the line has not named, and for a conversation with one person it has not yet confirmed, whose `reason` is `conversation_not_confirmed` (send the person a text first); at `payload.preset` for a preset that is missing or not on that list; at `payload.colors` for a `custom` set without exactly two such colours, and for `colors` beside any other preset, which has its own; at `payload.photoUrl` for a `photo` set without such a link, for `photoUrl` beside any other preset, and — its `reason` one of the link refusals a media send meets — for a link that cannot be fetched or a file that is not such an image or is too large, in bytes or in pixels, and, from the line’s own check of the picture once it has it, a 422 `validation_failed` whose `reason` is `image_too_large` or a 422 `validation_failed` whose `reason` is `unreadable_image`, at the same field; and at `payload.<key>` for any other key, `expectedBackgroundGuid` among them — a remove takes no guard, because nothing this API returns names a background. What the line can still answer, at once: while the line is offline it refuses either, a 503 `upstream_unavailable` whose `reason` is `connector_unavailable`; and while sending on the line is paused it refuses either, a 503 `upstream_unavailable` whose `reason` is `outbound_paused`. A command it accepts, it answers on the `command.settled` that follows the 202: `succeeded` once the line read the change back, and for a remove of a background that was not there — the settlement does not say which; `failed` with `gateway_rejected` when the line refused before changing anything — busy with another background change, unable to find the conversation, or without what a background change needs at that moment — so nothing changed and it can be sent again under a new `Idempotency-Key` — and for a `photo` set also when the line could not read the picture, which sending the same picture again meets the same way; for a `photo` set alone, `failed` with `transfer_not_landed` when the picture did not reach the line within five minutes, and `failed` with `invalid_target` when it was no longer on the line when the change began, nothing changed in either; `failed` with `stale_target` for a group chat the line could not find among its own with the members the line last saw — one addressed right after its membership changed, before its next message, among them; `failed` with `capability_not_negotiated` on a line that has not announced that it sets, or that it removes, a background — the two are enabled separately; `failed` with `capability_constraint_violation`, `failureClass` `capability`, for a preset the line does not carry — each line announces the backgrounds it can set, one not yet updated announces fewer, and `gradient` is on every line that sets one — so nothing changed; `expired` with `command_expired_before_execution`, nothing changed, for a change the line did not reach in time — a background change lets the line’s other waiting commands go first, but once it has started the line takes no other command until the change is read back or given up on, so anything sent meanwhile but a `typing.start`, into any conversation on the line, waits for it, and what the conversation path carries — a message into a confirmed conversation or a group chat, a `reaction.tapback`, a `name_photo.share`, a `poll.vote` — settles `expired` too when it waits past that path’s expiry; and `ambiguous` with `chat_background_unverified` for a change the line began and could not read back — it may or may not have been made, and this API cannot read a background back: ask someone in the conversation before sending it again; a remove sent again where nothing is left to remove settles `succeeded` and changes nothing. Rarely, either settles `ambiguous` with `gateway_timeout` instead, when the attempt failed on the line before it could say what it did — read it as `chat_background_unverified`. On a live line every change to a conversation’s background — this command’s, or one a person makes on their own phone — is reported as a `conversation.background_changed` event, opt-in, and as a `chat_background` frame on a stream opened with `?events=chat_backgrounds`, with `fromMe` true for the line’s own change. A line not yet updated to report it instead leaves a message from the person with no text for a change in a conversation with one person, whoever made it: a `message` frame and a `message.received` whose `text` is null, stored in the conversation, counted as a received message, and leaving the conversation awaiting a reply in the console until the line next sends; on such a line a group chat’s change by the line files nothing. One `Idempotency-Key` reused across a set and a remove is answered on a live line with the first command and changes nothing more — the two count as one command for the key — so give each its own key. A test line carries both in a conversation with one person and settles as above: it carries every preset on the list, nothing draws the background, a `photo` link is fetched and checked as live checks it but is not kept, no message with no text is filed and no `conversation.background_changed` is reported, a key reused across the two is a 409 `conflict` whose `reason` is `idempotency_key_reused`, and there is no group chat to set one in. On an iMessage line, live or test, a message may be an emoji sticker: `kind: \"sticker\"` with `emoji`, exactly one emoji — one grapheme that is an emoji, a flag or a keycap, at most 64 UTF-16 units, nothing before or after it — in place of the text, or `url` in its place, the https link (at most 2048 characters) of an image sticker, exactly one of the two; `attachToMessageExternalId`, the `externalId` of the message it is stuck to, as its `message` frame carried it; `partIndex`, 0 to 64, the part of that message; and a placement, an object naming any of `placement.x` and `placement.y` (-5 to 6, the sticker’s centre as a fraction of that message’s bubble from its top-left corner), `placement.scale` (0.1 to 5, times the standard size) and `placement.rotation` (-180 to 180 degrees, clockwise), each rounded to 4 decimal places before it is checked, and only beside `attachToMessageExternalId`. A reply is `target.replyToMessageId`, as on any send, and never beside `attachToMessageExternalId`. Each of those is a 422 `validation_failed` at its own field before anything is written, as is any of the four keys without `kind: \"sticker\"` and a `transferId`, which /v1 never takes; a sticker to a channel that sends none is a 404 `unsupported_command` with `reason: not_on_channel`. A sticker travels on the conversation path alone, so one into any other thread is a 422 before anything is written. An image sticker is fetched and handed to the line inside the send: a link that is not a PNG, GIF or JPEG, is larger than 512000 bytes or is more than 618 px on a side is a 422 `validation_failed` at `payload.url` and reaches no line; a test line does not rehearse an image sticker and refuses one at `payload.url`. What the line can draw is not known before a sticker is sent: a line that has not announced emoji stickers — or placement, for a placed one, or replies on a sticker, for a reply — is sent nothing, and the command is accepted and then settles `failed` with `capability_constraint_violation`, `failureClass` `capability`. On an iMessage line, live or test, a message may be a link sent as a preview card: `kind: \"rich_link\"` with `url`, an absolute `http` or `https` URL of at most 2048 characters with no control character, in place of the text, and nothing else beside it; the recipient’s phone fetches the page to draw the card. A reply is `target.replyToMessageId`, as on any send. Each of those is a 422 `validation_failed` at its own field before anything is written; a rich link to a channel that sends none is a 404 `unsupported_command` with `reason: not_on_channel`. A rich link travels on the conversation path alone, so one into any other thread is a 422 before anything is written. A live line names the rich link it sent, as it names a text: its `command.settled` carries an `externalId`, it reports `message.delivered`, and `message.read` when the phone sends one, as a text does, and a later command — a tapback, a sticker stuck to it, a reply, an edit or an unsend — can name it. A rich link that settled with no `externalId` keeps none: one sent before the line was updated to name rich links stays `sent`, and every rich link on a test line has none, so no later command can name it. What the line can send is not known before a rich link is sent: a line that has not announced rich links — or replies on a rich link, for a reply — is sent nothing, and the command is accepted and then settles `failed` with `capability_constraint_violation`, `failureClass` `capability`. On a WhatsApp line, live or test, a sticker is an image by link: `kind: \"sticker\"` with `url`, an https link of at most 2048 characters to a WebP image, its path ending in `.webp` (a query string may follow). WhatsApp fetches the file itself and takes a static sticker of at most 100 KB or an animated one of at most 500 KB, 512 × 512 px; a file it does not take settles the send `failed`. A missing `url`, a link whose path does not end in `.webp`, `emoji`, `attachToMessageExternalId`, `partIndex`, `placement`, a `caption` and `platform.whatsapp.previewUrl` are each a 422 `validation_failed` at that field before anything is written. A sticker goes to one person: into a WhatsApp group it is a 422 at `target.conversationId`. A link preview is `kind: \"rich_link\"` with `url`, an absolute `http` or `https` URL of at most 2048 characters, and nothing else beside it — `platform.whatsapp.previewUrl` included, which it turns on itself: it is sent as a text whose body is the link, and the recipient’s WhatsApp draws a preview of the page. Any other key beside it is a 422 `validation_failed` at that field before anything is written. A reply on either is `target.replyToMessageId`, as on any send. A test line draws the sticker by its file’s name and the preview as a card naming the link’s host, and opens neither link. On an iMessage line, live or test, a message may be text and photos as ONE message, in the order given: `kind: \"multipart\"` with `parts`, each `{kind: \"text\", text}` or `{kind: \"media\", url}` with an https link, and `effect` and `subject` beside them as on a text. A multipart has 2 to 20 parts, at most 10 of them media, no link twice, and no text part blank; each of those is a 422 `validation_failed` at `payload.parts` or at the part (`payload.parts[i].url`, `payload.parts[i].text`) before anything is written. A reply is `target.replyToMessageId`, as on any send. Every link is fetched and uploaded to the line before the message is sent, in order; a link that cannot be fetched, is too large, or is not a photo, video or PDF — audio goes as a message of its own — is a 422 at that part’s `url` and nothing is sent, never a partial message. A multipart to any other channel is a 404 `unsupported_command` with `reason: not_on_channel`, and it travels on the conversation path alone, so one into any other thread is a 422 before anything is written. What the line can send is not known before a multipart is sent: a line that has not announced multipart sends is sent nothing, and the command is accepted and then settles `failed` with `capability_constraint_violation`, `failureClass` `capability` — never several separate messages. On a test line a multipart of text parts is performed, and one holding a media part settles `failed` with `unsupported_capability`, since nothing is fetched there. On an iMessage line, live or test, a message may be Apple’s “Share My Location?” request card: `kind: \"location_request\"` and nothing beside it — any other key in the payload, the text included, is a 422 `validation_failed` at that key before anything is written. A reply is `target.replyToMessageId`, as on any send. A location request to any channel but iMessage and a live WhatsApp line is a 404 `unsupported_command` with `reason: not_on_channel`. On iMessage it travels on the conversation path alone, and only into a conversation with one person (a group chat is on that path for every kind but `location_request`), so one into any other thread — a group, or a conversation not yet confirmed as with that one person — is a 422 whose `reason` is `conversation_not_confirmed` before anything is written. `succeeded` means the card was sent, never that the person shared: if they tap Share, their location arrives later from the line, apart from this command. What the line can send is not known before a request is sent: a line that has not announced location requests — or replies on one, for a reply — is sent nothing, and the command is accepted and then settles `failed` with `capability_constraint_violation` (or `capability_not_negotiated`), `failureClass` `capability`. On a test line the card is sent and delivered, and nobody shares back. On a live WhatsApp line it is WhatsApp’s location request: a Send location button under the fixed text “Tap below to share your location.”, inside the service window, to one person and with no reply — a reply or a group is a 422 before anything is written. The place the person sends back arrives as a `location` message replying to it. On an iMessage line, live or test, a message may be a poll: `kind: \"poll\"` with `question` and `options`, 2 to 12 choices, each once. The question and every choice are 1 to 128 characters, not blank and on one line — the bound of the poll as it comes back, not of the send, so that every poll sent comes back with its ids. Any other key, the text included, and any choice or question outside those bounds, is a 422 `validation_failed` at that key (`payload.question`, `payload.options`, `payload.options[i]`) before anything is written, and so is a `question` or `options` beside any other kind. A reply is `target.replyToMessageId`, as on any send. A poll to any other channel is a 404 `unsupported_command` with `reason: not_on_channel`, and it travels on the conversation path alone — into a conversation the line has confirmed is with one person, or a group chat it has reported — so one into any other thread, a group it has not named yet included, is a 422 at `target.conversationId` or the recipient key you wrote, whose `reason` is `conversation_not_confirmed`, before anything is written. The poll’s own id and the ids its choices were given arrive on the stream opened with `?events=polls`, as a `poll.created` with `actor: line` — the ids `poll.vote` names; its `command.settled` carries the same poll id as `externalId` where the line names the message a send created. What the line can send is not known before a poll is sent: a line that has not announced polls is sent nothing, and the command is accepted and then settles `failed` with `capability_constraint_violation` (or `capability_not_negotiated`), `failureClass` `capability`. On a test line the poll is sent and comes back as `poll.created`, and nobody on the test phone votes on it. On an iMessage line of an organization offered app cards, a message may be a card from an iMessage app the organization holds: `kind: \"app_card\"`, `app.name` (its registered name), `app.teamId`, `app.bundleId`, optional `app.appStoreId`, `url`, `layout.caption`, optional `layout.subcaption`, optional `interactive` (default false, a plain card) and optional `summary`, each text 1 to 4096 characters, the `url` https, http or data. Any other key is a 422 `validation_failed` at that key before anything is written. An app this organization does not hold, a disabled one, or a name that differs is a 422 at `payload.app`. For an organization not offered cards, on a test line and on any other channel, it is a 404 `unsupported_command` with `reason: not_on_channel`. It travels on the conversation path alone, into a one-to-one the transport has confirmed or a group it has reported, else a 422 whose `reason` is `conversation_not_confirmed`. Someone other than the line must have written in the thread (403 `recipient_not_allowed`, `recipient_must_write_first`) and the newest service seen there must be iMessage (403, `app_card_needs_imessage`; a thread with no service seen is refused too). A card is never sent twice for one `Idempotency-Key`, at any API version. Its `command.settled` carries `appCard.updatable`, and `succeeded` means the Mac handed the card to Messages, not that it was delivered or drawn as a card. `needs_reconcile` with `app_card_unverified` means it may be in the thread: look before resending. `message.edit` and `message.unsend` refuse a card with a 422. A line whose Mac cannot send cards accepts the card and settles it `failed` with `capability_constraint_violation`, and `/check` cannot see that. A new card may carry a picture: `layout.image`, the https link (at most 2048 characters) of a JPEG, PNG, WebP, HEIC or HEIF image of at most 8388608 bytes, which Mapier fetches and hands to the line before the card is written; a link that cannot be fetched, or a file outside that rule, is a 422 `validation_failed` at `payload.layout.image` with nothing written. A card with a picture cannot be a reply (422 at `payload.layout.image`), and `app_card.update` refuses `layout.image`: an update keeps the picture its card was sent with. A line whose Mac cannot send card pictures accepts the card and settles it `failed` with `capability_constraint_violation`; it never sends the card without its picture. Messages draws the picture only for someone who has the line in their contacts; anyone else sees the card with its words alone. An organization offered app cards replaces a card in place with `app_card.update`: `target.messageId` names the first card, any update of it, or a card the person sent that replaced it (a received card whose `appCard.updates` is set), always the same first card, and nothing else may sit beside it in the target. The payload is `url`, `layout.caption`, optional `layout.subcaption`, optional `interactive` and optional `summary`, each text 1 to 4096 characters; the app cannot change, an update is never a reply, and `interactive` left out keeps the card’s last value. For an organization not offered cards it is a 404 `unsupported_command`, `reason: not_on_channel`, whether or not the message exists; an id this project does not hold, or a message that is not a card, is a 404 `not_found`. A card whose first send or latest update has not settled is a 409 `conflict`, `reason: card_update_in_flight`, which is the one to retry once it settles. A 422 `validation_failed` with `reason: card_not_updatable` at `target.messageId` means the first card failed or could not be confirmed, was given no id by Messages, was started by the person, came from an app since disabled, or the conversation is now on another line; send a new card. Every update notifies the people in the thread, so a card takes at most 50 updates in any hour, counted together whether they name the first card or one of its updates (the first card itself is not counted): the next one is a 429 `rate_limited`, `reason: card_update_limit`, with the seconds to wait in `details.retryAfter` and in the `retry-after` header. An update refused before it reached the line is not counted, and neither is one that failed without running: `failureClass: not_run` (it expired or was cancelled first), or an `errorCode` of `connector_offline` or `outbound_paused` (the line’s Mac was away or paused and never ran it). A refused update can be sent again under the same `Idempotency-Key` once the wait is over. Someone having written, the newest service being iMessage, opt-out, pause and rate limits apply as on a send, and a repeated `Idempotency-Key` adopts the first update, never sending again. Its `command.settled` is `type: app_card.update`, its own `messageId`, and `appCard.updatable: true`. `/check` cannot see a Mac without the update flag: that update is accepted, settles `failed`, and never becomes a new card. On an iMessage line, live or test, a text may carry `textFormatting`: 1 to 256 ranges of it, each `{start, length}` in UTF-16 code units of `text`, inside it and cutting no character in two, with at least one of `styles` (a list of any of `bold`, `italic`, `underline` and `strikethrough`), `effect` (one of `bounce`, `stretch`, `squish`, `scaleRipple`, `big`, `bloom`, `somersault`, `nod`, `shake`, `jitter`, `small` and `explode`, an animation of those characters — the whole message’s bubble or screen effect is `effect` on the payload) and `mention`, the address of the person a one-to-one conversation is with, over the name shown for them and never over their address; any other mention, and any mention in a group chat, is refused. A range that breaks one of those rules is a 422 `validation_failed` at that range (`payload.textFormatting[i]` or one of its keys), and a list that is not 1 to 256 ranges, or `textFormatting` on anything but a text, is a 422 at `payload.textFormatting`, each before anything is written; on any other channel it is a 422 at `payload.textFormatting`. Formatting travels on the conversation path alone, so a text formatted into any other thread is a 422 at `payload.textFormatting`. What the line can draw is not known before a mention is sent: a line that has not announced mentions is sent nothing, and the command is accepted and then settles `failed` with `capability_not_negotiated`, `failureClass` `capability`. Slack, Discord and Telegram lines file their rooms as group conversations: every message in a Slack channel, private channel or group DM the bot is in, in a Discord channel the bot’s role can view, and in a Telegram group the bot is in arrives under the room’s own `conversationId` with `isGroup: true` (a thread in the room, or a Telegram forum topic, arrives in the room’s conversation, its `replyToExternalId` naming what it answers), and every speaker becomes a contact. Telegram gives a bot only some of a group’s messages: with privacy mode on, its default, the messages meant for it, such as commands for it and replies to its messages. Writing in a Telegram group is not writing to the line: a person must still start the bot before it can message them directly. A `message.send` into a room, at `target.conversationId`, goes to the whole room (a Telegram forum’s General topic); a reply, `target.replyToMessageId`, goes into the replied message’s thread on Slack (in a DM as well: a plain send goes to the top level) and is quoted on Discord and Telegram; `reaction.set` and `reaction.remove` work in a room; `typing.start` and `message.read`, where the channel has them, are done in a conversation with one person and are a 422 `validation_failed` at `target.conversationId` in a room. Nothing is posted into a room the line has not filed: a room is reached only by the `conversationId` its messages arrived under. A group message on Slack, Discord or Telegram carries `addressed`: `true` when it names the line’s account, answers its message, sits in a thread it posted in, or, on Telegram, is a command to it, `false` otherwise. On iMessage it is `true` when the message mentions the line or replies to its message, and on WhatsApp when it replies to the line’s message; otherwise it is absent there. Absent means nobody could tell; treat the message as addressed. Only `false` means it was not addressed to the line — so an agent that answers only what names it skips `isGroup && addressed === false`, which is right on every channel. WhatsApp groups are coming soon: they need a number Meta has made an Official Business Account. Into a WhatsApp group a text, a link preview, a photo or file by link, and `whatsapp.template.send` are sent (a quiet group is restarted with a template; Mapier keeps no group reply window, and Meta’s answer settles the send); a reply into one is a 422 at `target.replyToMessageId`, and a sticker, a reaction, `whatsapp.interactive.send`, `whatsapp.location.send` and `whatsapp.contacts.send` a 422 at `target.conversationId`. `whatsapp.group.create` makes a new group on a WhatsApp line: address the line at `target.lineId`, with `payload.subject` of 1 to 128 characters and an optional `payload.description` of up to 2048. Nobody is added: people join by the group’s invite link, so `target.participants` is a 422 `validation_failed` at that field. It answers 202 and settles when WhatsApp reports the group made: `succeeded` with `group: {conversationId, inviteLink}` on `command.settled` and a `conversation.created` of `kind: group` for the new conversation; `failed` with `groups_not_eligible` on a number that cannot use groups; and `ambiguous` with `group_create_unconfirmed` when WhatsApp did not confirm the group in time. The invite link is on `command.settled` and `GET /v1/commands/{commandId}` for at least 90 days, and not after: keep it. A test WhatsApp line cannot carry it: it is the 404 `unsupported_command` whose `reason` is `not_on_line`. `kind: \"link\"` is `kind: \"rich_link\"`, which stays accepted and is deprecated. `template` as `whatsapp.template.send`, `choices` as `whatsapp.interactive.send` or `messenger.interactive.send`, `location` as `whatsapp.location.send` and `contact` as `whatsapp.contacts.send` each run as that command, with the same payload beside `kind`; the command stays accepted under its own name, and a refusal, `command.settled.type` and `GET /v1/commands/{id}` name it. `choices` with neither `interactive` nor `quickReplies` or `buttons` runs as the command `target.channel` names, and takes an interactive message of `type` `button` or `list` only. On a test line on a shared number (its `Line` carries `shared`), a command goes only to someone who has texted the line and is still connected, and only until 20 turns or 100 messages have gone unanswered since they last texted: otherwise it is a 403 `recipient_not_allowed` with `recipient_must_write_first`. Such a line’s budgets answer 429 `rate_limited` with `shared_line`, and its daily caps 409 `limit_reached`. `name_photo.*`, `chat_background.set`, `chat_background.remove` and a `poll.vote` on a poll whose `poll.created` this conversation did not carry are a 404 `unsupported_command` with `shared_line`. A `message.send` of `kind: \"app_card\"` and its `app_card.update` go out as any message does, admitted and counted against those budgets. `group.*` is a 404 too unless group chats are turned on for the organization. Then `group.create` takes 2 to 10 people who are all this project's connected Test contacts, and every command into a group (a message, a reaction, an edit or unsend, a vote, `group.update`, `group.leave`) goes out only while everyone in it is: otherwise a 403 `recipient_not_allowed` with `group_member_not_test_contact`, or `recipient_must_write_first` naming the member who must text first or has gone too long without answering. Where such a refusal names an address, it is the first, in sort order, of those that stopped the group, which need not be the first one the request listed. A group someone outside its member list writes in refuses those commands the same way for 24 hours after the last such message, unless a newer member list arrives first. A group message counts as one send toward the line’s limits and toward each member’s. Unlike on other iMessage lines, a `group.create` sent again under its `Idempotency-Key` is answered from the first: with the same people it is adopted and never a second group, and with other people it is a 409 `idempotency_key_reused`.","parameters":[{"in":"path","name":"type","required":true,"description":"The command vocabulary. A name outside it is a 404 `unsupported_command`. `conversation.mark_read` is `message.read`, and `profile.get`, `profile.set` and `profile.share` are `name_photo.get`, `name_photo.set` and `name_photo.share`: the same command, body and answer at every version. It is recorded, settled and reported under the older name, whose use as a request name is deprecated and never removed.","schema":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send","conversation.mark_read","profile.get","profile.set","profile.share"]}},{"in":"header","name":"idempotency-key","required":false,"description":"A key of your choosing, and the ONLY thing that makes a retry safe. Send the same key again and the original send is adopted rather than repeated. **Omit it and every attempt is a new send**: a key is minted per request, so two POSTs with no header are two messages. It is optional at every `x-mapier-version`, and the 202 to a request without one carries `x-mapier-idempotency: none`; nothing is ever matched to an earlier send by its body or its timing. Send one on every request. Reuse the key you sent the first time — a fresh one on the retry is a different command. A key names ONE command, and every type adopts a repeat of it, with three exceptions on a live iMessage line: `group.create`, minted afresh on every POST, so a retried `group.create` is a second group; and `typing.start` and `message.read`, where the same key again is a new signal. Never reuse a key for a different command — depending on the type and the channel it is refused with a 409 `idempotency_key_reused`, or adopted as the first and never sent. There is nothing to adopt when the channel never took the first send of a message, and the retry is a 409 `conflict` instead: `reason: idempotency_key_failed` when it was refused — it was not sent (of a message sent as several, `details.sentParts` names the parts that were), so send it, or only the rest, again under a fresh key — and `reason: idempotency_key_unresolved` when its outcome is unknown, because repeating it could deliver the message twice: a send that settled `needs_reconcile`, or one whose attempt died before any answer and has not been reconciled yet — its `errorCode` is null until it is, and `message.needs_reconcile` follows. The exception is a live WhatsApp, Discord, Slack, Telegram or Messenger line, which adopts a repeated key, and a live iMessage line whose first attempt and retry both went on its conversation path (`sendCommand` says which threads take it), where the line adopts a repeated key: in either, a retry of an attempt that died before any answer, made before it is reconciled, is sent again under the same key — the line adopts it if the first attempt reached it — and answered 202, or with the channel’s refusal of the re-send, after which the send is settled `needs_reconcile`. A retry while the first attempt is still running is `reason: idempotency_key_in_flight`: wait, and retry with the SAME key. Checked before anything is written or sent. From `x-mapier-version: 2026-12-01`, a key is never sent twice, on any channel: every type adopts a repeat, `group.create`, `typing.start` and `message.read` included, and a retry of an attempt that got no answer is `reason: idempotency_key_in_flight` while it may still be running and `reason: idempotency_key_unresolved` after, and is never sent again. A command that writes no message and was refused keeps its key answering the same two reasons, so send it again under a new key. A key is 1 to 200 characters, none of them a control character (U+0000–U+001F or U+007F), and no whitespace at either end; one outside that is a 422 `validation_failed` at `Idempotency-Key`, and a key is never trimmed: a trimmed key is a different key.","schema":{"type":"string","minLength":1,"maxLength":200},"example":"6f1c2b9e-4d3a-4f7e-9b8c-1a2d3e4f5a6b"},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-01`, a `target` that names no `channel` is resolved from the project’s lines rather than meaning iMessage, and a project with lines on more than one channel answers 422 listing them. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: `capacity_exhausted` where an older version answers `no_line_capacity`, and under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. From `2026-12-01`, on a line whose service reports what it can do, a command that report lacks is a 404 `unsupported_command` with `reason: not_on_line`, rather than a 202 that settles `failed` with `unsupported_capability`; `options.ifUnsupported: skip` on `typing.start` or `message.read` answers 200 `skipped` instead. iMessage and test lines are unchanged. From `2026-12-01`, a repeated `Idempotency-Key` is never sent twice, on any channel: `group.create`, `typing.start` and `message.read` adopt a repeat as every other type does, and a retry of an attempt that got no answer is a 409 rather than sent again. `Idempotency-Key` says which 409. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"Typed per command type: `anyOf` names one arm for each of `message.send`, `reaction.set`, `reaction.remove`, `message.read`, `typing.start`, `message.edit`, `message.unsend` and `app_card.update`, each a component carrying its type as `x-mapier-command-type`, and an untyped arm for every other. Which arm applies is the path’s `{type}`: no field of the body says so, so a client generated from this operation types the body as the whole union. The arms document what the server reads and refuses; the request is not validated against them. For an untyped type the line’s channel is the authority on what `target` and `payload` hold. The exceptions are a `message.send` payload and the four `whatsapp.*.send` payloads, whose keys are the ones the resolved line carries and whose bounds are checked before anything is written, and the target of an iMessage `reaction.tapback`, `name_photo.share`, `typing.start` or `group.create`, and the target and payload of an iMessage `message.read`, `message.edit`, `message.unsend`, `group.update`, `group.leave`, `poll.vote`, `chat_background.set`, `chat_background.remove`, `reaction.set` or `reaction.remove`, and the payload of an iMessage `name_photo.get` or `name_photo.set`, which are checked before anything is sent — the operation’s description lists them.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"default":{},"description":"Who the command is about — for `message.send`, `{\"recipient\": \"+15550100777\"}`. The shape is per command type and the transport is the authority on it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"payload":{"default":{},"description":"What the command does — for `message.send`, `{\"text\": \"…\"}`. Omit the whole body for a command that needs neither. On `message.send` and the four `whatsapp.*.send` types a key the resolved line cannot carry is a 422 at `payload.<key>`, never dropped.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"options":{"description":"How to treat what the line cannot carry. Omit it for the default: refuse, never reshape.","type":"object","properties":{"ifUnsupported":{"description":"On `typing.start` or `message.read` only: `skip` answers `200 {\"skipped\": true}` instead of a refusal when the line cannot carry the command, and sends nothing. `refuse`, the default, refuses. On any other type it is a 422.","type":"string","enum":["refuse","skip"]},"degrade":{"description":"`adapt` lets the platform drop or split a part the channel cannot carry — an effect, a caption on Messenger — and says what it changed. `strict`, the default, refuses instead.","type":"string","enum":["strict","adapt"]}},"additionalProperties":false}},"anyOf":[{"$ref":"#/components/schemas/V1MessageSendCommand"},{"$ref":"#/components/schemas/V1ReactionSetCommand"},{"$ref":"#/components/schemas/V1ReactionRemoveCommand"},{"$ref":"#/components/schemas/V1MessageReadCommand"},{"$ref":"#/components/schemas/V1TypingStartCommand"},{"$ref":"#/components/schemas/V1MessageEditCommand"},{"$ref":"#/components/schemas/V1MessageUnsendCommand"},{"$ref":"#/components/schemas/V1AppCardUpdateCommand"},{"$ref":"#/components/schemas/V1UntypedCommand"}]},"examples":{"message.send.text":{"summary":"`message.send`: a text into a conversation","value":{"target":{"kind":"conversation","conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Your order shipped."}}},"message.send.recipient":{"summary":"`message.send`: a text to a person, by phone number","value":{"target":{"kind":"recipient","channel":"imessage","recipientExternalId":"+14155550100"},"payload":{"text":"hi"}}},"message.send.effect":{"summary":"`message.send`: an iMessage text with a subject and an effect","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"You are in. See you Saturday.","subject":"Saturday","effect":"confetti"}}},"message.send.formatting":{"summary":"`message.send`: an iMessage text with a bold, animated range","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Your table is ready.","textFormatting":[{"start":14,"length":5,"styles":["bold"],"effect":"jitter"}]}}},"message.send.mention":{"summary":"`message.send`: an iMessage text mentioning the person","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Thanks, Sam!","textFormatting":[{"start":8,"length":3,"mention":"+14155550100"}]}}},"message.send.media":{"summary":"`message.send`: a file by link","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"media","url":"https://example.com/orders/4821/receipt.pdf"}}},"message.send.caption":{"summary":"`message.send`: a photo by link with a caption, where the line carries one","value":{"target":{"channel":"whatsapp","recipientExternalId":"+14155550100"},"payload":{"kind":"media","url":"https://example.com/listings/4821/front.jpg","caption":"The front."}}},"message.send.preview_url":{"summary":"`message.send`: a WhatsApp text that previews its link","value":{"target":{"channel":"whatsapp","recipientExternalId":"+14155550100"},"payload":{"text":"Your receipt: https://example.com/r/4821","platform":{"whatsapp":{"previewUrl":true}}}}},"message.send.sticker":{"summary":"`message.send`: an iMessage sticker stuck onto a message","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"sticker","emoji":"👍","attachToMessageExternalId":"5D1B7E0A-2F3C-4B8E-9A61-1C2D3E4F5A6B","placement":{"x":0.95,"y":0.1,"rotation":12}}}},"message.send.rich_link":{"summary":"`message.send`: an iMessage link as a preview card","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"rich_link","url":"https://example.com/launch"}}},"message.send.multipart":{"summary":"`message.send`: iMessage text and photos as one message","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"multipart","parts":[{"kind":"text","text":"Here they are:"},{"kind":"media","url":"https://example.com/listings/4821/front.jpg"},{"kind":"media","url":"https://example.com/listings/4821/kitchen.jpg"}]}}},"message.send.location_request":{"summary":"`message.send`: an iMessage request to share a location","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"location_request"}}},"message.send.poll":{"summary":"`message.send`: an iMessage poll","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"poll","question":"Lunch?","options":["Tacos","Ramen","Pho"]}}},"message.send.app_card":{"summary":"`message.send`: an iMessage app card","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"app_card","app":{"name":"Example Games","teamId":"A1B2C3D4E5","bundleId":"com.example.games.MessagesExtension","appStoreId":1234567890},"url":"https://games.example.com/card?game=7f3a","layout":{"caption":"Your move","subcaption":"Tic-tac-toe"},"summary":"Game started"}}},"app_card.update":{"summary":"`app_card.update`: an iMessage app card replaced in place","value":{"target":{"messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65"},"payload":{"url":"https://games.example.com/card?game=7f3a&move=2","layout":{"caption":"Your move","subcaption":"Tic-tac-toe"},"summary":"You played X"}}},"reaction.set":{"summary":"`reaction.set`: a reaction on a message the person sent","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"targetExternalId":"wamid.HBgLMTQxNTU1NTAxMDAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3OEIA","emoji":"👍"}}},"reaction.remove":{"summary":"`reaction.remove`: the line’s reaction taken off, on WhatsApp","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"targetExternalId":"wamid.HBgLMTQxNTU1NTAxMDAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3OEIA"}}},"message.read":{"summary":"`message.read`: a conversation marked read","value":{"target":{"kind":"conversation","conversationId":"a0000000-0000-4000-8000-000000000001"}}},"typing.start":{"summary":"`typing.start`: typing shown in a conversation","value":{"target":{"kind":"conversation","conversationId":"a0000000-0000-4000-8000-000000000001"}}},"message.edit":{"summary":"`message.edit`: a message the line sent, with new text","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001","messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65"},"payload":{"text":"Your order shipped. It arrives Thursday."}}},"message.unsend":{"summary":"`message.unsend`: a message the line sent, taken back","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001","messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65"}}},"whatsapp.template.send":{"summary":"`whatsapp.template.send`: an approved template, outside the 24-hour window","value":{"target":{"channel":"whatsapp","recipientExternalId":"+447700900123"},"payload":{"name":"booking_reminder","language":"en_GB","components":[{"type":"body","parameters":[{"type":"text","text":"7pm"}]}]}}},"whatsapp.interactive.send":{"summary":"`whatsapp.interactive.send`: two reply buttons","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"interactive":{"type":"button","body":{"text":"Still on for 7pm?"},"action":{"buttons":[{"type":"reply","reply":{"id":"yes","title":"Yes"}},{"type":"reply","reply":{"id":"move","title":"Move it"}}]}}}}},"whatsapp.location.send":{"summary":"`whatsapp.location.send`: a pin with a name and an address","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"latitude":37.7936,"longitude":-122.3958,"name":"Ferry Building","address":"1 Ferry Building, San Francisco"}}},"whatsapp.contacts.send":{"summary":"`whatsapp.contacts.send`: one contact card","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"contacts":[{"name":{"formatted_name":"Front desk"},"phones":[{"phone":"+14155550199","type":"WORK"}]}]}}},"messenger.interactive.send":{"summary":"`messenger.interactive.send`: a text with quick replies","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Which store?","quickReplies":[{"title":"San Francisco","payload":"sf"},{"title":"Oakland","payload":"oak"}]}}}}}}},"responses":{"202":{"description":"Accepted. `repeated` is `true` when an `Idempotency-Key` matched an earlier send; `lineId` is the line it went out on and `lineSelection` why.","content":{"application/json":{"schema":{"type":"object","properties":{"commandId":{"type":"string","description":"The handle to correlate against. It appears as `commandId` on the `command` frame."},"status":{"type":"string","const":"queued","description":"Always `queued`. The 202 says the command was accepted, never that it was delivered — the terminal status arrives on `/v1/response_stream`."},"disposition":{"type":"string","enum":["queued","adopted"],"deprecated":true,"description":"Deprecated: read `repeated` instead, which says the same thing; this field stays and is never removed. `adopted` when an `Idempotency-Key` matched a send already made, in which case `commandId` is the FIRST send’s and nothing new was queued. A retry is not a second message."},"repeated":{"description":"`true` when an `Idempotency-Key` matched a send already made, in which case `commandId` is the FIRST send’s and nothing new was queued. A retry is not a second message. `false` when this request queued the command. Absent on an answer from before the field.","type":"boolean"},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this command went out on — its `id` as `GET /v1/whoami` lists it under `lines`. Every later frame and event about the command is about this line."},"lineSelection":{"type":"string","enum":["named","reused_active_chat","new_best_line"],"description":"Why that line. `named`: the target named it at `target.lineId` (a command done to the line always does). `reused_active_chat`: the conversation’s own line, or — addressed to a recipient — the line of the conversation holding the message a reply answers, else the active line the recipient last wrote in on, else the line their conversation with this project began on. `new_best_line`: the recipient is new to this project, and the platform picked one of its lines on that channel — one whose connection is answering first, then one that has met fewer new people today, then the one with the most room."},"channel":{"description":"The channel of that line — `imessage`, `whatsapp`, `slack` and so on — so a send that named no `target.channel` says where it went. Absent on an answer from before the field.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"parts":{"description":"When the send went out as several messages — a caption sent on its own with `options.degrade: \"adapt\"` — each one’s command, in order. `commandId` is the first’s, and it settles for that part alone: the whole message went out only when every part’s command settles `succeeded`, so watch each `commandId` here. Parts go out in order, each once the one before it was accepted; one the transport refuses, or never answers, stops the rest, and the request answers with that refusal instead, its `details.sentParts` naming the parts already sent. A retry with the same key never sends a part again. Absent on a single message.","type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]}},"adaptations":{"description":"With `options.degrade: \"adapt\"`: each part of the message that was changed to fit the channel. Absent when nothing was changed.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field that was changed, dotted — `payload.effect`."},"action":{"type":"string","description":"What was done to it: `dropped` (left out) or `split` (sent as a message of its own). New values may be added; skip one you do not recognise."},"capability":{"description":"The capability the field needed, when it has one — `message.send.media`.","type":"string"},"reason":{"type":"string","description":"Why: `not_on_channel` (the channel cannot carry it) or `no_caption_on_channel` (the channel has no caption). New values may be added."}},"required":["path","action","reason"]}}},"required":["commandId","status","disposition","lineId","lineSelection"]},"example":{"commandId":"3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71","status":"queued","disposition":"queued","repeated":false,"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","lineSelection":"reused_active_chat","channel":"imessage"}}},"headers":{"x-mapier-idempotency":{"description":"`none` when the request carried no `Idempotency-Key`: a key was minted for this request alone, so a retry of it is a new request. Absent when the request carried a key.","schema":{"type":"string","enum":["none"]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`, `line_not_allowed`, `recipient_not_allowed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope","line_not_allowed","recipient_not_allowed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["app_card_needs_imessage","blocked","environment","group_member_not_test_contact","not_owned","opted_out","outside_service_window","paused","recipient_blocked","recipient_must_write_first","role","thread_not_owned"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line id the command named at `target.lineId`. `GET /v1/whoami` lists the lines this key can use."},"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The contact the refusal is about, when one exists."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"With `outside_service_window`, `recipient_must_write_first`, `thread_not_owned` or `group_member_not_test_contact`: the channel whose rule it is. With `not_entitled` or `planned`: the channel your organization may not set up a line on yet."},"serviceWindowExpiresAt":{"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"}],"description":"With `outside_service_window`: when the window closed, or null if this person has never written to you. Send an approved template instead — it is what the window lets through."},"remedy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"With `outside_service_window` or `recipient_must_write_first`: what to do next — a template to send, or wait for the person to write."},"reachability":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line asked about, as `GET /v1/whoami` lists it."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"That line’s channel."},"recipient":{"type":"string","deprecated":true,"description":"Deprecated: read `to` instead, which carries the same value; this field stays and is never removed. The person’s address on that channel, normalised."},"to":{"description":"The person’s address on that channel, normalised. `recipient` carries the same value; absent only on an answer from before the field.","type":"string"},"canSend":{"type":"object","properties":{"freeform":{"type":"boolean","description":"Whether an ordinary message — text, media — would be sent now."},"template":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an approved WhatsApp template would be sent now. Null off WhatsApp."}},"required":["freeform","template"],"description":"What the line may send this person now."},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","deprecated":true,"description":"Deprecated: read `reason` instead, which carries the same value; this field stays and is never removed. The refusal reason."},"reason":{"description":"The refusal reason — `outside_service_window`, `opted_out` and so on. `code` carries the same value; absent only on an answer from before the field.","type":"string"},"docUrl":{"type":"string","format":"uri","description":"The errors page row for that reason."}},"required":["code","docUrl"]},"description":"Why a send would be refused, one entry per reason. Empty when nothing stands in the way."},"serviceWindow":{"type":"object","properties":{"applies":{"type":"boolean","description":"Whether this channel has a window at all — WhatsApp and Messenger do."},"expiresAt":{"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"}],"description":"When the window closes, or closed. Null when it does not apply or never opened."}},"required":["applies","expiresAt"],"description":"The channel’s window for ordinary messages after the person last wrote."},"initiation":{"type":"object","properties":{"required":{"type":"string","enum":["none","template","recipient_first","unknown"],"description":"Who must write first on this channel: `none`, `template` (an approved template opens the conversation), `recipient_first` (the person must write first) or `unknown`. New rules may be added."},"satisfied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether that has happened. Null when the channel cannot tell — Discord, for one."}},"required":["required","satisfied"],"description":"Whether this line may start the conversation."},"consent":{"type":"object","properties":{"optedOut":{"type":"boolean","description":"Whether the person is opted out. An opt-out applies on every channel."},"scope":{"type":"string","const":"person","description":"Always `person`: an opt-out covers the person, not one address."}},"required":["optedOut","scope"],"description":"The person’s opt-out."},"remedy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"What to do next, as data: a command `type` to send instead, or an `action` — `connect_line`, `wait_for_recipient`, `set_option`, `shorten` or `use_line`. New actions may be added; skip one you do not recognise."},{"type":"null"}],"description":"What to do next when a send would be refused. Null when nothing stands in the way, or nothing helps."},"evidenceAt":{"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"}],"description":"When the newest fact this answer rests on was recorded — the person’s last message. Null if none."},"registered":{"description":"Present only when `registered=true` was asked. Whether the channel believes this address can receive, asked live on this line as `POST /v1/handle-check` asks it. **Null is not false**: it means this transport cannot answer the question synchronously, which is the honest answer for WhatsApp — the Cloud API has no reachability probe, and a number is only known to be reachable once a message to it is accepted. Always null on Messenger, Discord, Telegram and Slack, which have no probe to ask, with `registeredReason` `unverified`.","anyOf":[{"type":"boolean"},{"type":"null"}]},"registeredReason":{"description":"Present only when `registered=true` was asked. Why not, when `registered` is false, or why the transport could not say, when it is null. Usually null when the address can receive, but a transport may add a caveat to a yes — `marketing_opt_out` on WhatsApp — so a reason is not by itself a no: `registered` is the answer, and this is what rides beside it.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["lineId","channel","recipient","canSend","reasons","serviceWindow","initiation","consent","remedy","evidenceAt"],"description":"With `outside_service_window`, `recipient_must_write_first` or `thread_not_owned`: everything `GET /v1/reachability` would answer for this person on this line."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`, `unsupported_command`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found","unsupported_command"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `command_retired`, `not_on_channel`, `not_on_line` and `shared_line` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"With `not_on_channel`: the channel of the line the command was aimed at, which carries no such command on any line. With `not_on_line`: that line’s channel, which does."},"capability":{"type":"string","description":"With `not_on_channel` or `not_on_line`: the capability the command needs and that channel, or that line, lacks."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `not_on_line`: the line that cannot carry the command."},"alternatives":{"type":"array","items":{"type":"string"},"description":"With `not_on_channel` or `not_on_line`: capabilities the line does carry that come close. Empty when none does."},"remedy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"With `not_on_channel` or `not_on_line`: what to do next — another command, an option, or a line that carries it."},"use":{"type":"string","description":"With `command_retired`, when the transport names a successor: the command type to send instead. Always one of the published command types."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `conflict`, `conversation_closed`, `limit_reached`, `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict","conversation_closed","limit_reached","project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `archived`, `deleted`, `idempotency_key_failed`, `idempotency_key_in_flight`, `idempotency_key_reused`, `idempotency_key_unresolved`, `removed` and `suspended` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `idempotency_key_reused`, `idempotency_key_failed` or `idempotency_key_unresolved`: the message an earlier send wrote under this `Idempotency-Key`. Read it before deciding to send again. With any other reason — a transport’s own refusal of this send, on `sendCommand`: the message THIS send wrote before the transport refused it, which the `message.failed` or `message.needs_reconcile` event for it names too. A transport that refuses a send with one of the first three words names no message here; a retry under the same key answers `idempotency_key_failed` or `idempotency_key_unresolved` with it."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"With `idempotency_key_failed` or `idempotency_key_unresolved`: the error code that message settled with — the transport’s refusal, or `gateway_response_lost` when nothing came back — or null for an attempt that died before any answer and has not been reconciled yet."},"failureClass":{"anyOf":[{"type":"string","enum":["target","content","capability","line","rate_limited","not_run","transport","unknown"]},{"type":"null"}],"description":"With `idempotency_key_failed`: the class of the first send’s refusal, from the closed set `command` frames carry — its `errorCode`, read with the reason the refusal carried where that reason and not the code says what to do, as the `message.failed` for the same refusal was. Null with `idempotency_key_unresolved`, whose outcome is unproven rather than failed."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"With a transport’s own reason, on a command it refused only for now and said how long: the seconds to wait before trying the command again."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The conversation that is closed: `GET /v1/conversations/{conversationId}` reads it, and `conversation.status_changed` announces when it is active again."},"limit":{"type":"string","description":"Which limit was reached: on a send to a test line, `sharedLineSendsPerDay` or `sharedLineNonRepliesPerDay`; on a line setup, `purchasedLines`, the dedicated lines the organization pays for."},"maximum":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"That limit’s value. A test line’s two reset at 00:00 UTC; `purchasedLines` moves when the organization adds lines on its Billing page."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`, `sandbox_budget_exhausted`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited","sandbox_budget_exhausted"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `daily_budget` and `shared_line` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `capacity_exhausted`, `line_unavailable`, `no_line`, `no_line_capacity`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["capacity_exhausted","line_unavailable","no_line","no_line_capacity","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `all_lines_full`, `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/commands/{type}/check":{"post":{"operationId":"checkCommand","tags":["Commands"],"summary":"Check a command without sending it","security":[{"apiKey":["messages:send"]},{"personalToken":["messages:send"]}],"description":"Would `POST /v1/commands/{type}` with this same body and these same headers be accepted now? The check runs every rule the send runs, in the same order, and sends nothing, writes nothing and never uses up the `Idempotency-Key`. The answer is always 200. `accepted: false` carries `refusal`, the exact error body the send would answer with — its `code`, `message` and `details` — so one handler reads both; `accepted: true` names the line the send would go out on and why, and, with `options.degrade: \"adapt\"`, what the send would change. A key whose earlier send has a row is answered as the send would answer it: accepted, or the 409. A media link is not fetched, so a link the send cannot fetch is accepted here and refused by the send. Only a refusal of the check itself is an error status: an API key that is not valid, a body over the size limit, an unknown version, a key without `messages:send`, or the project’s command budget, which a check spends as a send does.","parameters":[{"in":"path","name":"type","required":true,"description":"The command type to check — the `{type}` the send would use. `conversation.mark_read` is `message.read`, and `profile.get`, `profile.set` and `profile.share` are `name_photo.get`, `name_photo.set` and `name_photo.share`: the same command, body and answer at every version. It is recorded, settled and reported under the older name, whose use as a request name is deprecated and never removed.","schema":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send","conversation.mark_read","profile.get","profile.set","profile.share"]}},{"in":"header","name":"idempotency-key","required":false,"description":"The key the send would carry, read and held to its rule as the send reads it, and never used up: a check claims no key, so the send that follows it is the first under it. A key of your choosing, and the ONLY thing that makes a retry safe. Send the same key again and the original send is adopted rather than repeated. **Omit it and every attempt is a new send**: a key is minted per request, so two POSTs with no header are two messages. It is optional at every `x-mapier-version`, and the 202 to a request without one carries `x-mapier-idempotency: none`; nothing is ever matched to an earlier send by its body or its timing. Send one on every request. Reuse the key you sent the first time — a fresh one on the retry is a different command. A key names ONE command, and every type adopts a repeat of it, with three exceptions on a live iMessage line: `group.create`, minted afresh on every POST, so a retried `group.create` is a second group; and `typing.start` and `message.read`, where the same key again is a new signal. Never reuse a key for a different command — depending on the type and the channel it is refused with a 409 `idempotency_key_reused`, or adopted as the first and never sent. There is nothing to adopt when the channel never took the first send of a message, and the retry is a 409 `conflict` instead: `reason: idempotency_key_failed` when it was refused — it was not sent (of a message sent as several, `details.sentParts` names the parts that were), so send it, or only the rest, again under a fresh key — and `reason: idempotency_key_unresolved` when its outcome is unknown, because repeating it could deliver the message twice: a send that settled `needs_reconcile`, or one whose attempt died before any answer and has not been reconciled yet — its `errorCode` is null until it is, and `message.needs_reconcile` follows. The exception is a live WhatsApp, Discord, Slack, Telegram or Messenger line, which adopts a repeated key, and a live iMessage line whose first attempt and retry both went on its conversation path (`sendCommand` says which threads take it), where the line adopts a repeated key: in either, a retry of an attempt that died before any answer, made before it is reconciled, is sent again under the same key — the line adopts it if the first attempt reached it — and answered 202, or with the channel’s refusal of the re-send, after which the send is settled `needs_reconcile`. A retry while the first attempt is still running is `reason: idempotency_key_in_flight`: wait, and retry with the SAME key. Checked before anything is written or sent. From `x-mapier-version: 2026-12-01`, a key is never sent twice, on any channel: every type adopts a repeat, `group.create`, `typing.start` and `message.read` included, and a retry of an attempt that got no answer is `reason: idempotency_key_in_flight` while it may still be running and `reason: idempotency_key_unresolved` after, and is never sent again. A command that writes no message and was refused keeps its key answering the same two reasons, so send it again under a new key. A key is 1 to 200 characters, none of them a control character (U+0000–U+001F or U+007F), and no whitespace at either end; one outside that is a 422 `validation_failed` at `Idempotency-Key`, and a key is never trimmed: a trimmed key is a different key.","schema":{"type":"string","minLength":1,"maxLength":200},"example":"6f1c2b9e-4d3a-4f7e-9b8c-1a2d3e4f5a6b"},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-01`, a `target` that names no `channel` is resolved from the project’s lines rather than meaning iMessage, and a project with lines on more than one channel answers 422 listing them. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: `capacity_exhausted` where an older version answers `no_line_capacity`, and under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. From `2026-12-01`, on a line whose service reports what it can do, a command that report lacks is a 404 `unsupported_command` with `reason: not_on_line`, rather than a 202 that settles `failed` with `unsupported_capability`; `options.ifUnsupported: skip` on `typing.start` or `message.read` answers 200 `skipped` instead. iMessage and test lines are unchanged. From `2026-12-01`, a repeated `Idempotency-Key` is never sent twice, on any channel: `group.create`, `typing.start` and `message.read` adopt a repeat as every other type does, and a retry of an attempt that got no answer is a 409 rather than sent again. `Idempotency-Key` says which 409. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"The body the send would carry, typed per command type as on the send.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"default":{},"description":"Who the command is about — for `message.send`, `{\"recipient\": \"+15550100777\"}`. The shape is per command type and the transport is the authority on it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"payload":{"default":{},"description":"What the command does — for `message.send`, `{\"text\": \"…\"}`. Omit the whole body for a command that needs neither. On `message.send` and the four `whatsapp.*.send` types a key the resolved line cannot carry is a 422 at `payload.<key>`, never dropped.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"options":{"description":"How to treat what the line cannot carry. Omit it for the default: refuse, never reshape.","type":"object","properties":{"ifUnsupported":{"description":"On `typing.start` or `message.read` only: `skip` answers `200 {\"skipped\": true}` instead of a refusal when the line cannot carry the command, and sends nothing. `refuse`, the default, refuses. On any other type it is a 422.","type":"string","enum":["refuse","skip"]},"degrade":{"description":"`adapt` lets the platform drop or split a part the channel cannot carry — an effect, a caption on Messenger — and says what it changed. `strict`, the default, refuses instead.","type":"string","enum":["strict","adapt"]}},"additionalProperties":false}},"anyOf":[{"$ref":"#/components/schemas/V1MessageSendCommand"},{"$ref":"#/components/schemas/V1ReactionSetCommand"},{"$ref":"#/components/schemas/V1ReactionRemoveCommand"},{"$ref":"#/components/schemas/V1MessageReadCommand"},{"$ref":"#/components/schemas/V1TypingStartCommand"},{"$ref":"#/components/schemas/V1MessageEditCommand"},{"$ref":"#/components/schemas/V1MessageUnsendCommand"},{"$ref":"#/components/schemas/V1AppCardUpdateCommand"},{"$ref":"#/components/schemas/V1UntypedCommand"}]},"examples":{"message.send.text":{"summary":"`message.send`: a text into a conversation","value":{"target":{"kind":"conversation","conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Your order shipped."}}},"message.send.recipient":{"summary":"`message.send`: a text to a person, by phone number","value":{"target":{"kind":"recipient","channel":"imessage","recipientExternalId":"+14155550100"},"payload":{"text":"hi"}}},"message.send.effect":{"summary":"`message.send`: an iMessage text with a subject and an effect","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"You are in. See you Saturday.","subject":"Saturday","effect":"confetti"}}},"message.send.formatting":{"summary":"`message.send`: an iMessage text with a bold, animated range","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Your table is ready.","textFormatting":[{"start":14,"length":5,"styles":["bold"],"effect":"jitter"}]}}},"message.send.mention":{"summary":"`message.send`: an iMessage text mentioning the person","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Thanks, Sam!","textFormatting":[{"start":8,"length":3,"mention":"+14155550100"}]}}},"message.send.media":{"summary":"`message.send`: a file by link","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"media","url":"https://example.com/orders/4821/receipt.pdf"}}},"message.send.caption":{"summary":"`message.send`: a photo by link with a caption, where the line carries one","value":{"target":{"channel":"whatsapp","recipientExternalId":"+14155550100"},"payload":{"kind":"media","url":"https://example.com/listings/4821/front.jpg","caption":"The front."}}},"message.send.preview_url":{"summary":"`message.send`: a WhatsApp text that previews its link","value":{"target":{"channel":"whatsapp","recipientExternalId":"+14155550100"},"payload":{"text":"Your receipt: https://example.com/r/4821","platform":{"whatsapp":{"previewUrl":true}}}}},"message.send.sticker":{"summary":"`message.send`: an iMessage sticker stuck onto a message","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"sticker","emoji":"👍","attachToMessageExternalId":"5D1B7E0A-2F3C-4B8E-9A61-1C2D3E4F5A6B","placement":{"x":0.95,"y":0.1,"rotation":12}}}},"message.send.rich_link":{"summary":"`message.send`: an iMessage link as a preview card","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"rich_link","url":"https://example.com/launch"}}},"message.send.multipart":{"summary":"`message.send`: iMessage text and photos as one message","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"multipart","parts":[{"kind":"text","text":"Here they are:"},{"kind":"media","url":"https://example.com/listings/4821/front.jpg"},{"kind":"media","url":"https://example.com/listings/4821/kitchen.jpg"}]}}},"message.send.location_request":{"summary":"`message.send`: an iMessage request to share a location","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"location_request"}}},"message.send.poll":{"summary":"`message.send`: an iMessage poll","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"poll","question":"Lunch?","options":["Tacos","Ramen","Pho"]}}},"message.send.app_card":{"summary":"`message.send`: an iMessage app card","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"kind":"app_card","app":{"name":"Example Games","teamId":"A1B2C3D4E5","bundleId":"com.example.games.MessagesExtension","appStoreId":1234567890},"url":"https://games.example.com/card?game=7f3a","layout":{"caption":"Your move","subcaption":"Tic-tac-toe"},"summary":"Game started"}}},"app_card.update":{"summary":"`app_card.update`: an iMessage app card replaced in place","value":{"target":{"messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65"},"payload":{"url":"https://games.example.com/card?game=7f3a&move=2","layout":{"caption":"Your move","subcaption":"Tic-tac-toe"},"summary":"You played X"}}},"reaction.set":{"summary":"`reaction.set`: a reaction on a message the person sent","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"targetExternalId":"wamid.HBgLMTQxNTU1NTAxMDAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3OEIA","emoji":"👍"}}},"reaction.remove":{"summary":"`reaction.remove`: the line’s reaction taken off, on WhatsApp","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"targetExternalId":"wamid.HBgLMTQxNTU1NTAxMDAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3OEIA"}}},"message.read":{"summary":"`message.read`: a conversation marked read","value":{"target":{"kind":"conversation","conversationId":"a0000000-0000-4000-8000-000000000001"}}},"typing.start":{"summary":"`typing.start`: typing shown in a conversation","value":{"target":{"kind":"conversation","conversationId":"a0000000-0000-4000-8000-000000000001"}}},"message.edit":{"summary":"`message.edit`: a message the line sent, with new text","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001","messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65"},"payload":{"text":"Your order shipped. It arrives Thursday."}}},"message.unsend":{"summary":"`message.unsend`: a message the line sent, taken back","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001","messageId":"0192a7c4-5a31-7bd2-8e6f-1d0c9b8a7f65"}}},"whatsapp.template.send":{"summary":"`whatsapp.template.send`: an approved template, outside the 24-hour window","value":{"target":{"channel":"whatsapp","recipientExternalId":"+447700900123"},"payload":{"name":"booking_reminder","language":"en_GB","components":[{"type":"body","parameters":[{"type":"text","text":"7pm"}]}]}}},"whatsapp.interactive.send":{"summary":"`whatsapp.interactive.send`: two reply buttons","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"interactive":{"type":"button","body":{"text":"Still on for 7pm?"},"action":{"buttons":[{"type":"reply","reply":{"id":"yes","title":"Yes"}},{"type":"reply","reply":{"id":"move","title":"Move it"}}]}}}}},"whatsapp.location.send":{"summary":"`whatsapp.location.send`: a pin with a name and an address","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"latitude":37.7936,"longitude":-122.3958,"name":"Ferry Building","address":"1 Ferry Building, San Francisco"}}},"whatsapp.contacts.send":{"summary":"`whatsapp.contacts.send`: one contact card","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"contacts":[{"name":{"formatted_name":"Front desk"},"phones":[{"phone":"+14155550199","type":"WORK"}]}]}}},"messenger.interactive.send":{"summary":"`messenger.interactive.send`: a text with quick replies","value":{"target":{"conversationId":"a0000000-0000-4000-8000-000000000001"},"payload":{"text":"Which store?","quickReplies":[{"title":"San Francisco","payload":"sf"},{"title":"Oakland","payload":"oak"}]}}}}}}},"responses":{"200":{"description":"Whether the send would be accepted, and if not, its refusal.","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","description":"Whether `POST /v1/commands/{type}` with the same body and headers would be accepted now. Nothing was sent or recorded either way, and an `Idempotency-Key` is read, never used up."},"refusal":{"description":"When `accepted` is false: the error body the send would answer with. Absent when accepted.","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"The `code` the send would answer with, as your version spells it."},"message":{"type":"string","description":"The sentence the send would answer with."},"details":{"description":"The send’s `details`, in the shape that `code` carries on the send."},"requestId":{"type":"string","description":"This check’s own request id, the value of its `x-request-id` header."},"docUrl":{"type":"string","format":"uri","description":"The errors page row for this refusal, as on the send."},"retryable":{"type":"boolean","description":"Whether the send could succeed if made again later, as on the send."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]},"line":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line the send would go out on, as `GET /v1/whoami` lists it."},"selection":{"type":"string","enum":["named","reused_active_chat","new_best_line"],"description":"Why that line, as the 202’s `lineSelection` says it."}},"required":["id","selection"]},{"type":"null"}],"description":"The line the send would use. Null when the request is refused before a line is chosen."},"channel":{"anyOf":[{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},{"type":"null"}],"description":"That line’s channel. Null when the request is refused before a channel is known."},"adaptations":{"description":"With `options.degrade: \"adapt\"`: what the send would change to fit the channel, as its 202 would say. Empty or absent when nothing would be.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field that was changed, dotted — `payload.effect`."},"action":{"type":"string","description":"What was done to it: `dropped` (left out) or `split` (sent as a message of its own). New values may be added; skip one you do not recognise."},"capability":{"description":"The capability the field needed, when it has one — `message.send.media`.","type":"string"},"reason":{"type":"string","description":"Why: `not_on_channel` (the channel cannot carry it) or `no_caption_on_channel` (the channel has no caption). New values may be added."}},"required":["path","action","reason"]}}},"required":["accepted","line","channel"]},"example":{"accepted":true,"line":{"id":"0192a7b1-5b6c-7d7e-9f80-a1b2c3d4e5f6","selection":"named"},"channel":"whatsapp","adaptations":[]}}},"headers":{"x-mapier-idempotency":{"description":"`none` when the request carried no `Idempotency-Key`: a key was minted for this request alone, so a retry of it is a new request. Absent when the request carried a key.","schema":{"type":"string","enum":["none"]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/commands/{commandId}":{"get":{"operationId":"getCommand","tags":["Commands"],"summary":"Read a command","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"What happened to a command, by the `commandId` its 202 handed back: `queued` until it settles, then exactly what its `command` frame on `/v1/response_stream` carried, with `settledAt`. Read it when your agent restarted or lost the stream. A command another project sent, or the other environment, is a 404, the same answer an id that never existed gets. A settled command is kept for ninety days. A read costs a point of the project’s command budget.","parameters":[{"in":"path","name":"commandId","required":true,"description":"The `commandId` a 202 handed back, or a `parts[].commandId`.","schema":{"type":"string","minLength":1}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The command.","content":{"application/json":{"schema":{"type":"object","properties":{"commandId":{"type":"string","description":"The `commandId` the 202 handed back."},"logicalActionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Your `Idempotency-Key` for this command, or the one minted for you, as its `command` frame carries it. Null until the command settles."},"status":{"type":"string","enum":["queued","succeeded","failed","ambiguous","no_effect","cancelled","expired"],"description":"`queued` until the command settles — the 202’s own word — then the terminal status its `command` frame carried."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transport’s own code, verbatim, when the command did not succeed — so a support thread can quote it — and null otherwise. An OPEN string: switch on `failureClass`, and read this for the detail."},"conversationId":{"description":"The thread this command acted on — for a reaction, the thread holding the message it names, and for any command sent to a `target.conversationId`, that thread. `null` — present, not omitted — when no thread of yours is known for it, as for `group.create`, which opens the thread the line then reports.","anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"]},{"type":"null"}],"description":"The command type you sent — the `{type}` of `POST /v1/commands/{type}`, read from this platform’s own record of the command, since a transport’s settlement does not name it. Null only for a settlement this platform cannot match to a command it sent: on a live iMessage line, a `group.create` whose settlement arrived before the 202’s `commandId` was recorded."},"messageId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for the message this command wrote — the one `getMessageReceipts` takes and a later `target.replyToMessageId` names. Null for a command that writes no message, such as a reaction or a group command."},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"deprecated":true,"description":"Deprecated: read `platformMessageId` instead, which carries the same value; this field stays and is never removed. The transport’s own id for the message this command wrote."},"platformMessageId":{"description":"The channel’s own id for the message this command wrote — on a test line, the simulated device’s — the same id a `message` frame carries at `platformMessageId` for a message the contact sent, so you can correlate with anything the channel shows you and name the message in a later command, such as `reaction.set` at `payload.targetExternalId`. Reply to it by `messageId`, not by this. Null when the command wrote no message, when it did not succeed, and when the channel’s settlement named no id for the message it created. `externalId` carries the same value; absent only on an answer from before the field.","anyOf":[{"type":"string"},{"type":"null"}]},"namePhoto":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name people see on the line’s messages — Messages’ display name. Null when none is set."},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s given name, or null."},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s family name, or null."},"hasPhoto":{"type":"boolean","description":"Whether the card carries a photo. The photo itself is not returned; set a new one with `name_photo.set` and `payload.photoUrl`."}},"required":["name","firstName","lastName","hasPhoto"]},{"type":"null"}],"description":"The line’s own Name and Photo card — the name and photo its contacts see — on a `succeeded` `name_photo.get` (the card as it is) or `name_photo.set` (the card read back after the change). Null on every other settlement."},"group":{"anyOf":[{"type":"object","properties":{"conversationId":{"type":"string","description":"Our id for the new group’s conversation — the one `conversation.created` named — so you can send into it with `target.conversationId`."},"inviteLink":{"description":"WhatsApp only: the link people join the group by (`https://chat.whatsapp.com/…`). Nobody is added for you: send it to the people who should join. Keep it — it is served here for as long as this settlement is kept, and not after. Absent on iMessage, whose groups are made with their members.","type":"string"}},"required":["conversationId"]},{"type":"null"}],"description":"The new group on a `succeeded` `group.create` or `whatsapp.group.create`: its `conversationId` and, on WhatsApp, the `inviteLink` people join it by. Null on every other settlement."},"appCard":{"anyOf":[{"type":"object","properties":{"updatable":{"type":"boolean"}},"required":["updatable"]},{"type":"null"}],"description":"On a `succeeded` iMessage app card, whether it can be updated later: false means Messages gave no id, so send a new card to change it. Null on every other settlement."},"projectId":{"type":"string","description":"The project the key that sent the command belongs to."},"lineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The line the command went out on, as `GET /v1/whoami` lists it."},"environment":{"type":"string","enum":["live","test"],"description":"`live` or `test`: the environment the command was sent in. A stream frames only its own key’s environment."},"failureClass":{"anyOf":[{"type":"string","enum":["target","content","capability","line","rate_limited","not_run","transport","unknown"]},{"type":"null"}],"description":"What kind of failure this was, from a CLOSED set, so a handler can decide without learning any transport’s vocabulary: `target` (who or what the command is aimed at cannot take it), `content` (the payload was refused — fix it, then send), `capability` (this line cannot carry the command), `line` (the line cannot send right now), `rate_limited` (wait, then send), `not_run` (it never ran — sending again is safe), `transport` (the transport failed on its side) or `unknown` (read `errorCode`). Null unless `status` is `failed`, `cancelled` or `expired`."},"settledAt":{"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"}],"description":"When the command settled. Null while it is `queued`."}},"required":["commandId","logicalActionId","status","errorCode","type","messageId","externalId","namePhoto","group","appCard","projectId","lineId","environment","failureClass","settledAt"]},"example":{"commandId":"3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71","logicalActionId":null,"status":"succeeded","errorCode":null,"conversationId":"a0000000-0000-4000-8000-000000000001","type":"message.send","messageId":"0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a99","externalId":"wamid.HBgMNDQ3NzAwOTAwMTIzFQIAERgSN0Y0QjJBMUM5RDNFOEI2QTVGAA==","platformMessageId":"wamid.HBgMNDQ3NzAwOTAwMTIzFQIAERgSN0Y0QjJBMUM5RDNFOEI2QTVGAA==","namePhoto":null,"group":null,"appCard":null,"projectId":"0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b","lineId":"0192a7b1-5b6c-7d7e-9f80-a1b2c3d4e5f6","environment":"live","failureClass":null,"settledAt":"2026-10-18T18:01:03.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/response_stream":{"get":{"operationId":"responseStream","tags":["Stream"],"summary":"Everything that happens to this project","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"Server-sent events, served from our own `events` rows in **both** environments (P10). Two frame names are published — `message` for an inbound message and `command` for a terminal command status — plus `error`, which is this platform’s addition: a stream that ends because a key was revoked says so rather than dropping the socket. How long a live iMessage command may wait before its terminal `command` frame depends on its path (`sendCommand` says which path a message takes). On the conversation path a command the line has not taken within 30 seconds expires — its `command` frame settles `expired`, `failureClass: not_run` — where the recipient path waits five minutes; while the line is offline the send is refused at once, a 503 `upstream_unavailable` with `reason: no_live_connector`; and while sending on the line is paused the send is accepted, 202, and its command then expires. A card a person sends from an iMessage app arrives as a message of `kind: \"app_card\"` with an `appCard` block, on the `message` frame, on `message.received` (the webhook and the stream opened with `?events=message.received`) and in the conversation’s history, the same block on each. Any app’s card arrives, registered with us or not, for every organization: receiving is not part of the app cards offer. The message has `text: null`, no attachments (the card’s picture is not published) and is never a reply. `appCard.app` names the app; `url`, `interactive` and `layout` are the card’s own, the `url` null when longer than 16384 characters, and all three null on a card from one of Apple’s own apps, or one the line could not read. The `url` is whatever the sender’s app wrote: treat it as untrusted and expect `data:` as well as `https`. `appCard.updates` is the `messageId` of the first card this one replaces, looked for in the same conversation on the same line only: the card Messages says it replaces, else a card your line sent in the same app session, else null. An app links its card to an earlier one only if it chooses to, so null does not prove the card is new. In a group, `from` is the member who sent it, and a card that replaces one your line sent is `addressed: true`, as a reply to your line’s message is. A line whose Mac does not report cards yet sends such a card as a message with two unreadable characters as its text and the card’s picture as an attachment, with no `kind` and no `appCard`. Open the stream with `?events=receipts` and a `receipt` frame reports each message a recipient’s device delivered or read — in test from the sandbox, and live from what each channel reports: WhatsApp as Meta reports it, and iMessage from Apple’s status of the send, which is first asked about 75 seconds after the send and last about 10 minutes after it — so on iMessage a delivery or a read later than that is never framed, and a read arrives only from a recipient who shares read receipts. Open the stream with `?events=delivery_failures` and a `delivery_failed` frame reports each message the provider accepted and later reported not delivered — Apple’s “Not Delivered” on iMessage and Meta’s `failed` after `sent` on WhatsApp, the same fact as the `message.delivery_failed` webhook, and in test the sandbox’s `not_delivered` delivery knob. That send is not a failed one: the message keeps its status, and its own `command` frame still arrives, possibly after this one. Open the stream with `?events=locations` and a `location` frame reports a contact sharing their location with the line: when the share starts, each new position — on iMessage from Apple’s Find My, about every 30 seconds per contact sharing, and a repeated position is framed once — and when it ends, with the position fields null where the platform sent none; in test, the sandbox phone’s shared location, with `simulated: true`. It is filed only on a one-to-one conversation and a contact this project already holds, so a person who shares before any message between you is not framed. The coordinates are a person’s, and you are responsible for how you store and use them. Open the stream with `?events=moderation` and a `moderation` frame reports a contact editing or unsending a message they sent: on iMessage when the person edits or unsends it on their phone; on Slack and Discord when a message is edited, or deleted from the conversation, which a moderator can do as well as its author; on Telegram when it is edited — Telegram does not tell a bot when a message is deleted; and in test when the sandbox phone does, with `simulated: true`. Each names the message by the `messageId` and `externalId` its `message` frame carried; an edit carries the new `text` and, where the platform kept it, `previousText`. Only a message this platform filed is framed — an edit of one sent before the line was connected is not — and only an edit that changed the text: one that left it as it was, as when only an attachment was removed, is not. The line’s own edits and unsends are `command` frames, never these. The message’s stored text is not rewritten and an unsent message is not deleted. Open the stream with `?events=polls` and a `poll` frame reports a poll in a conversation with the line: when one is created — by a participant or by this line, whose own poll comes back with `actor: line` and the ids its choices were given — when a choice is added (`options` is then the whole list: replace it, never append), when a participant votes (`selectedOptionExternalIds` is everything they hold now) and when one takes their vote back; on iMessage from the line, which streams a poll only while it announces poll readback, and in test the line’s own poll and vote, with `simulated: true` — nobody on the test phone polls or votes. It is filed on the conversation this platform holds for the chat, so a poll in a chat the line has filed no thread for is not framed. On iMessage the poll’s question also arrives as an ordinary `message` from the participant, the text Messages sends beside a poll. The line also reports the poll itself, each added choice and each vote as a `message` with no words; those are not filed once their moment is held, and one that reaches this platform before its moment can still arrive as a `message` with no text, or only the replacement character U+FFFD. This frame is the poll’s record. Open the stream with `?events=reactions` and a `reaction` frame reports a reaction put on or taken off a message, by a person or by your line, in a one-to-one conversation or a group: the message by the `messageId` its frame carried, who reacted as `actor` and, where this project holds them, `contactId`, and whether the conversation is a group as `isGroup`. Only a reaction to a message this platform filed is framed. Where a channel keeps one reaction per person per message, as WhatsApp does, a new one arrives with the one it replaced taken off. Open the stream with `?events=conversations` and a `conversation` frame reports a conversation on the line, each moment the same fact as its webhook and told apart by `type`: `conversation.created` when the line first sees a conversation — a person’s first message, or a group the line is in — with its `kind`, and a group’s `title` where it has one; `conversation.updated` when a group’s name or members change, with the name now, what changed and who joined or left, never the whole membership; and `conversation.status_changed` when a group closes for the line — the line was removed, or the group was deleted, archived or suspended, given as `reason` — or opens again. `GET /v1/conversations/{conversationId}` reads a conversation as it stands, and a command into a closed group is refused `409 conversation_closed`. Open the stream with `?events=gaps` and a `gap` frame reports a window in which some of the line’s traffic may be missing — the channel rate-limited the line, or the connection to it was lost — with `cause`, the conversations it touched where the channel said which, how many messages were `recovered` and whether the window is `complete`. It is sent once, after every message that could be recovered was framed as an ordinary `message` with the time it was sent; a window that lost nothing sends none. When `complete` is false, some messages may be missing for good: read the conversation’s history. Open the stream with `?events=message.received` and a `message.received` frame reports each incoming message under the name and in the shape of the `message.received` webhook: its body less the two keys that name a delivery attempt, `deliveryId` and `attempt` — `id` (the event’s, the same value as the frame’s `id:`), `type`, `environment`, `occurredAt` and `data`, the payload a webhook endpoint subscribed to `message.received` is sent. It is sent instead of that message’s `message` frame on this connection, so each incoming message arrives once, as one or the other; without the option the `message` frame is unchanged. Open the stream with `?events=chat_backgrounds` and a `chat_background` frame reports a conversation’s chat background set or removed on an iMessage line, by a person in the conversation or by this line — your own `chat_background.set` and `chat_background.remove` among them, with `fromMe: true` and `from` the line’s own address, beside the `command` frame that settles each. `background` is null for a removal; for a set it names the preset, null where the line could not tell which background was set, a `photo` by its preset alone — the picture is not available — and a `custom` one’s two colours. It is framed only from a line updated to report the change: one not yet updated instead frames a change in a conversation with one person as a `message` with no text. Group chats are expected to report the same way. It is filed on the conversation this platform holds for the chat, so a change in a chat the line has filed no thread for is not framed. A test line frames none. The options combine, `?events=receipts,delivery_failures,locations,moderation,polls,reactions,conversations,gaps,message.received,chat_backgrounds`. Every frame carries `id:`, and reconnecting with `Last-Event-ID` replays at most 500. If you were further behind than that, nothing is dropped: the rest follows in order on the same stream, 500 at a time, and a `: catching up` comment marks each batch that stopped at the cap. Events are kept for 90 days, which is how far back a `Last-Event-ID` can resume; reconnecting with one older than that is not an error — you are sent everything that remains after it, preceded by a `: replay window exceeded` comment so you can tell it apart from a quiet period. The credential is re-proved every 60 seconds, so a revocation closes the stream within a minute even if nothing else notices. A key may always hold 4 streams open at once; opening more may be refused with a 429 whose `details.reason` is `too_many_streams`, and its short `retryAfter` means close one rather than wait. A personal access token's streams count against its owner: 4 open at once across every token they hold. Its re-check asks the token, the owner’s current role and the project it names, so revoking it, removing its owner or taking the project out of its reach ends the stream with an `error` frame within a minute — what it reads stops at once — and the stream ends with a `: bye` comment at the token’s expiry. One stream per project is all an integration needs. `channel`, `conversationId` and `lineId` narrow what a stream sends, not what it reads: a narrowed stream reads the project’s events as an unnarrowed one does and sends the frames that match, so it costs what any stream costs and counts toward the same 4. Narrow by channel, or follow one conversation; to follow many, open one stream and read `conversationId` off the frames. On a narrowed stream the 500 counts the events a batch read, so a batch may send fewer frames and still be followed by `: catching up`.","parameters":[{"in":"header","name":"last-event-id","required":false,"description":"The `id:` of the last frame you processed. Replays at most 500 after it, then continues in order from the last `id:` you were sent. Events older than 90 days are no longer stored, so a value from before that resumes at the oldest frame that still exists and the stream opens with a `: replay window exceeded` comment.","schema":{"type":"string"}},{"in":"query","name":"events","required":false,"description":"Frames to add beyond `message` and `command`, comma-separated; `message.received` replaces the `message` frame rather than adding beside it. `receipts` adds a `receipt` frame for every message a recipient’s device reported delivered or read — correlate it by `commandId`, the handle the 202 gave you — and a receipt never walks a message backwards. `delivery_failures` adds a `delivery_failed` frame for every message the provider accepted and later reported not delivered (the `message.delivery_failed` webhook) — correlated the same way, and never a failed send: the message keeps its status and the send’s own `command` frame still arrives, possibly after it. `locations` adds a `location` frame for every change to a contact’s shared location — `location.share_started`, `location.updated`, `location.share_ended`, the same facts as those webhooks, which no endpoint receives unless it subscribed to them by name. The coordinates are a person’s, and you are responsible for how you store and use them. `moderation` adds a `moderation` frame for every message a contact edited or unsent after sending it to the line — `message.edited` and `message.unsent`, the same facts as those webhooks, which no endpoint receives unless it subscribed to them by name. The message itself is not changed: an edit’s new text arrives here alone, and an unsent message is not deleted. `polls` adds a `poll` frame for every moment of a poll in a conversation — `poll.created`, `poll.options_changed`, `poll.voted`, `poll.vote_cleared`, the same facts as those webhooks, which no endpoint receives unless it subscribed to them by name. Your own poll streams here too, with `actor: line`: its `pollExternalId` — which its `command.settled` also carries as `externalId` — and its choices’ `optionExternalId`s — what `poll.vote` takes — the choices’ ids arriving on this frame and nowhere else. `reactions` adds a `reaction` frame for every reaction put on or taken off a message in a conversation on the line, a group’s included — `reaction.added` and `reaction.removed`, the same facts as those webhooks. `conversations` adds a `conversation` frame for what happens to a conversation on the line — `conversation.created`, `conversation.updated`, `conversation.status_changed`, the same facts as those webhooks. `gaps` adds a `gap` frame for every window in which some of the line’s traffic may be missing — `line.gap`, the same fact as that webhook — sent after the messages that could be recovered from it. `message.received` replaces the `message` frame on that connection with a `message.received` frame for every incoming message, the `message.received` webhook’s body less `deliveryId` and `attempt`, so each incoming message arrives once, never as both. `chat_backgrounds` adds a `chat_background` frame for every change to a conversation’s chat background — `conversation.background_changed`, the same fact as that webhook, which no endpoint receives unless it subscribed to it by name. Your own `chat_background.set` and `chat_background.remove` come back here with `fromMe: true` as well as settling as a `command` frame. Omit it and the stream is exactly the two frames. A value not listed here is a 422 `validation_failed` whose entry names it in `unknown` and the values it frames in `supported`, rather than a stream that is silently not the one you asked for.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["receipts","delivery_failures","locations","moderation","polls","reactions","conversations","gaps","message.received","chat_backgrounds"]}}},{"in":"query","name":"channel","required":false,"description":"Send only the frames about conversations on this channel. A frame’s channel is its conversation’s, so a `command` frame for a command that names no conversation is on the stream without `channel` and on no channel’s. One value: more than one, or a value not listed here, is a 422 `validation_failed` at `channel` — an unknown one named in `unknown` beside the channels in `supported`.","schema":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},{"in":"query","name":"conversationId","required":false,"description":"Send only the frames about this conversation — its inbound messages, the commands that name it and, on a stream opened with an `events` option, the `receipt`, `delivery_failed`, `location`, `moderation`, `poll`, `reaction`, `conversation`, `gap`, `message.received`, `chat_background` frames about it; a `gap` that names no conversation is about every conversation on its line. It must be a conversation in this key’s project and environment, and on `channel` when you give both: otherwise a 422 `validation_failed` at `conversationId`, or at `channel` with the channel the conversation is on in the entry’s own `channel` — never a stream that could not frame anything.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"lineId","required":false,"description":"Send only the frames about one line — its `id` as `GET /v1/whoami` lists it, the `lineId` every frame carries: at the top level of its `data:`, and inside `data` on a `message.received` frame, as the webhook carries it. A line this key cannot use is a 403 `line_not_allowed`; not a uuid, or more than one, is a 422 `validation_failed` at `lineId`. With `channel` it must be on that channel, and with `conversationId` it must be that conversation’s line — otherwise a 422 naming what it is, never a stream that could not frame anything.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"An open stream. It ends with an `error` frame or with the socket.","content":{"text/event-stream":{"schema":{"oneOf":[{"$ref":"#/components/schemas/V1MessageFrame"},{"$ref":"#/components/schemas/V1CommandFrame"},{"$ref":"#/components/schemas/V1ErrorFrame"},{"$ref":"#/components/schemas/V1ReceiptFrame"},{"$ref":"#/components/schemas/V1DeliveryFailedFrame"},{"$ref":"#/components/schemas/V1LocationFrame"},{"$ref":"#/components/schemas/V1MessageEditedFrame"},{"$ref":"#/components/schemas/V1MessageUnsentFrame"},{"$ref":"#/components/schemas/V1PollFrame"},{"$ref":"#/components/schemas/V1ReactionFrame"},{"$ref":"#/components/schemas/V1ConversationCreatedFrame"},{"$ref":"#/components/schemas/V1ConversationUpdatedFrame"},{"$ref":"#/components/schemas/V1ConversationStatusChangedFrame"},{"$ref":"#/components/schemas/V1GapFrame"},{"$ref":"#/components/schemas/V1MessageReceivedFrame"},{"$ref":"#/components/schemas/V1ChatBackgroundFrame"}],"description":"One frame’s `data:`, JSON-encoded. The SSE `event:` name says which: `message` for `V1MessageFrame`, `command` for `V1CommandFrame`, `error` for `V1ErrorFrame`, and — on a stream opened with the option named — `receipt` for `V1ReceiptFrame` (`?events=receipts`), `delivery_failed` for `V1DeliveryFailedFrame` (`?events=delivery_failures`), `location` for `V1LocationFrame` (`?events=locations`), `moderation` for `V1MessageEditedFrame` or `V1MessageUnsentFrame` (`?events=moderation`), `poll` for `V1PollFrame` (`?events=polls`), `reaction` for `V1ReactionFrame` (`?events=reactions`), `conversation` for `V1ConversationCreatedFrame` or `V1ConversationUpdatedFrame` or `V1ConversationStatusChangedFrame` (`?events=conversations`), `gap` for `V1GapFrame` (`?events=gaps`), `message.received` for `V1MessageReceivedFrame` (`?events=message.received`), `chat_background` for `V1ChatBackgroundFrame` (`?events=chat_backgrounds`). The response body itself is a `text/event-stream`, not a single JSON document."}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`, `line_not_allowed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope","line_not_allowed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","not_owned","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line id the command named at `target.lineId`. `GET /v1/whoami` lists the lines this key can use."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["too_many_streams"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/whoami":{"get":{"operationId":"whoami","tags":["Project"],"summary":"What this key is","description":"The first call a new integration makes, and the one that answers \"did I paste the live key or the test one?\" without sending anything to anybody. `lines` excludes released lines: a released line has been retired from the project and cannot carry a message.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The project, the environment, and what it can send from.","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The project this key belongs to."},"environment":{"type":"string","enum":["live","test"],"description":"Which world this key reaches. `test` is the sandbox and touches no real handset; the two see none of each other’s data. This is the field that answers \"did I paste the live key or the test one?\"."},"keyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The id of the key you authenticated with — not the key itself."},"key":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The id of the key you authenticated with — the same value as `keyId`."},"scopes":{"type":"array","items":{"type":"string","enum":["messages:send","messages:read","lines:write","webhooks:write"]},"description":"What this key may do, chosen when it was created: `messages:send`, `messages:read`, `lines:write` and `webhooks:write`. A route that needs one the key lacks answers 403 `insufficient_scope`. A key keeps its scopes for life; to change them, create a new key."}},"required":["id","scopes"],"description":"The key you authenticated with."},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"This line’s id."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel this line is on."},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The address your recipients see this line’s messages come from, in the channel’s own form. Null while it is still being provisioned."},"status":{"type":"string","enum":["provisioning","active","paused","released"],"description":"Only `active` can carry a message. A `paused` line is one you paused and can resume; a `released` line has been retired from this project and never returns, so `whoami` never lists one."},"capabilities":{"type":"array","items":{"type":"string"},"description":"What this line can actually do — command types it will carry, plus platform facts like `handle_check`, `receipts` and `service_window`. **This is the feature-detection your client should branch on**: a command type published in the enum is one the platform knows, not one this line can do. A test line lists what the sandbox performs, which can be less than a live line of the same channel lists: a command its channel carries and the sandbox does not is still accepted, and settles `failed` with `unsupported_capability` — except a command done in a group chat: a test line has no group chat, so a well-formed iMessage `group.update` or `group.leave` is a 422 `validation_failed` at `target.conversationId` there — so read a live key’s list before switching a feature off. Treat a value you do not recognise as a capability you do not use; the list grows."},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How this line’s account is attached, when the channel has modes. On WhatsApp both setup paths put the number in your own WhatsApp Business Account. Null for a test line, for a channel without modes, iMessage among them, and for a line whose account has no mode recorded yet. Branch on `capabilities` for what the line can do, never on this."},"contactsAssigned":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many contacts this line counts: everyone pinned to it — by your first message to them, or by theirs to it — plus everyone pinned to another line who has a conversation on this one, opened by a send naming this line (`target.lineId`) or by their own first message to it, each counted once; sandbox contacts are not counted, and neither is a group chat, even one whose first message arrived before the line knew it was a group. Can read past `maxContacts`: somebody who writes to a full line is still answered on it and counted. A recount by Mapier support counts only the people pinned to the line."},"maxContacts":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many contacts this line can hold. A line at or past it is handed no new person."},"takesNewContacts":{"type":"boolean","description":"Whether a first message to somebody new could be sent from this line right now: the line is `active`, its connection is up, and it is below `maxContacts`. `GET /v1/lines/available` names the one such line a new person would be handed."},"reputation":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["HEALTHY","AT_RISK","CRITICAL","FLAGGED"],"description":"How an iMessage line is doing with recipients and Apple: `HEALTHY` (send normally), `AT_RISK` (slow down on new cold chats, keep replying), `CRITICAL` (stop opening cold chats; replies and warm chats are fine) or `FLAGGED` (rest the line; use another line for new chats). The worse of the line’s load (what it sends) and quality (how recipients react)."},"confidence":{"type":"string","enum":["ok","insufficient"],"description":"`ok`, or `insufficient` when the line has too little recent traffic to grade it well — fewer than 20 checked sends or 10 active chats in 7 days, or a gap in what the line received. Low confidence lowers the claim, never the risk."},"computedAt":{"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":"When the reading was computed."}},"required":["status","confidence","computedAt"]},{"type":"null"}],"description":"The line’s latest reputation reading — its status, confidence and when it was computed — or null when it has none yet: a test line, a line not on iMessage, or a live line not yet read. The full reading, with every measure against its limit and what to do, is `GET /v1/lines/{lineId}/reputation`."},"shared":{"description":"Present only on a test line on a shared number, which Mapier connects people to one project at a time. On such a line, people write first and some commands are refused with `reason: shared_line`.","type":"object","properties":{"maxPeople":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"How many people can be connected to this test line at once."}},"required":["maxPeople"]}},"required":["id","channel","address","status","capabilities","mode","contactsAssigned","maxContacts","takesNewContacts","reputation"]},"description":"What this project can send from. Live: every line that has not been released. Test: the sandbox’s lines — one per channel its world holds, all on one number. A released line is excluded because it cannot carry a message."},"limits":{"type":"object","properties":{"commandsPerMinute":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"How many commands (`POST /v1/commands/{type}`) this project may send in a minute in this key’s environment. Every key of the project spends the same budget, and live and test have one each; a command past it is a 429 `rate_limited`, and the `retry-after` header says when the minute ends. Your project’s own ceiling when one has been set for it, and the platform default otherwise."}},"required":["commandsPerMinute"],"description":"The request quotas this key’s project is held to in this environment."}},"required":["projectId","environment","keyId","key","lines","limits"]},"example":{"projectId":"0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b","environment":"live","keyId":"0192a7b0-2d3e-7f40-9b5c-6d7e8f9a0b1c","key":{"id":"0192a7b0-2d3e-7f40-9b5c-6d7e8f9a0b1c","scopes":["messages:send","messages:read","lines:write"]},"lines":[{"id":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","channel":"imessage","address":"+14155550142","status":"active","capabilities":["message.send.text","reaction.tapback","typing.start","message.read","receipts"],"mode":null,"reputation":{"status":"HEALTHY","confidence":"ok","computedAt":"2026-10-18T18:00:00.000Z"},"contactsAssigned":12,"maxContacts":1000,"takesNewContacts":true}],"limits":{"commandsPerMinute":600}}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/lines/available":{"get":{"operationId":"availableLine","tags":["Project"],"summary":"Which line a new person would be handed","security":[{"apiKey":[]},{"personalToken":["lines:read"]}],"description":"The line to show somebody who has not written to you yet — a sign-up page, a QR code, a \"Message us\" button. It is the line a first message to a new person would be sent from right now, chosen exactly as the send chooses: of this project’s `active` lines on the channel whose connection is up and that are below their contact limit, the one with the healthiest connection, then one that has not reached today’s new-contact pace, then the one with the most contacts left before its limit, then the oldest. Nothing is reserved: another send may take the line to its limit before the person writes, and a person new to this project on this channel who writes to the line is pinned to it and counted as one of its contacts whether or not it was at its limit; somebody already pinned to another of its lines stays pinned there, and is counted on this one too with their first message to it. When no line qualifies, the answer is the refusal that first message would get. Omit `channel` and the project’s lines decide it, as a send decides it; a project with lines on more than one channel is a 422 listing them. A test key is handed the sandbox’s line for the channel. A personal access token needs `lines:read` and, since this is the line a send would take, the developer or admin role.","parameters":[{"in":"query","name":"channel","required":false,"description":"The channel to show a line on. Omit it when the project sends on one channel only.","schema":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: `capacity_exhausted` where an older version answers `no_line_capacity`, and under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The line a new person would be handed now.","content":{"application/json":{"schema":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line’s id, as `GET /v1/whoami` lists it and `target.lineId` names it."},"address":{"type":"string","description":"The address to show somebody who has not written to you yet — the number or handle their first message should go to, in the channel’s own form."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel this line speaks: the one asked for, or the one inferred."}},"required":["lineId","address","channel"]},"example":{"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","address":"+14155550142","channel":"imessage"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `capacity_exhausted`, `line_unavailable`, `no_line`, `no_line_capacity`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["capacity_exhausted","line_unavailable","no_line","no_line_capacity","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `all_lines_full`, `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `transport_down` and `transport_unconfigured` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/handle-check":{"post":{"operationId":"handleCheck","tags":["Project"],"summary":"Is this address reachable","security":[{"apiKey":["messages:send"]},{"personalToken":["messages:send"]}],"deprecated":true,"description":"Asks the channel whether an address can receive on it. Nothing is pinned and no line is claimed — a check is not a send, and claiming a line for somebody a customer merely asked about would spend a slot on a person they never message. `GET /v1/reachability?channel=&to=&registered=true` answers this as `registered`; this route keeps serving.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"The address to ask about.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":320,"description":"The address to ask about, in any form the channel accepts."},"channel":{"description":"Which channel to ask. Optional, and resolved from the project’s lines when omitted — the same question can have different answers on two channels, because an address reachable on one is not thereby reachable on another.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["address"]},"example":{"address":"+14155550100","channel":"imessage"}}}},"responses":{"200":{"description":"`reason` is present when unavailable, so \"not on this channel\" and \"we could not tell\" are distinguishable.","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"The address as this platform normalised it."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel this answer is about, whether you named it or not."},"available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the transport believes this address can receive. **Null is not false**: it means this transport cannot answer the question synchronously, which is the honest answer for WhatsApp — the Cloud API has no reachability probe, and a number is only known to be reachable once a message to it is accepted. A client that renders null as unreachable is making a claim the platform refused to make."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why not, when `available` is false, or why the transport could not say, when it is null — which is what separates \"not on this channel\" from \"we could not tell\". Usually null when the address is available, but a transport may add a caveat to a yes — `marketing_opt_out` on WhatsApp is a number that can receive and has opted out of marketing templates — so a reason is not by itself a no: `available` is the answer, and this is what rides beside it."}},"required":["address","channel","available","reason"]},"example":{"address":"+14155550100","channel":"imessage","available":true,"reason":null}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`, `unsupported_command`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found","unsupported_command"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `shared_line` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"With `not_on_channel`: the channel of the line the command was aimed at, which carries no such command on any line. With `not_on_line`: that line’s channel, which does."},"capability":{"type":"string","description":"With `not_on_channel` or `not_on_line`: the capability the command needs and that channel, or that line, lacks."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `not_on_line`: the line that cannot carry the command."},"alternatives":{"type":"array","items":{"type":"string"},"description":"With `not_on_channel` or `not_on_line`: capabilities the line does carry that come close. Empty when none does."},"remedy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"With `not_on_channel` or `not_on_line`: what to do next — another command, an option, or a line that carries it."},"use":{"type":"string","description":"With `command_retired`, when the transport names a successor: the command type to send instead. Always one of the published command types."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `no_line`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","no_line","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/conversation-lookup":{"post":{"operationId":"lookupConversation","tags":["Messages"],"summary":"Find a line’s conversation with an address","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:send"]}],"description":"The id of the one-to-one conversation a line has with an address — the id `target.conversationId`, the history read and the stream name — for a client that needs it before the person writes again, such as one moving its own history onto this API. On iMessage the line’s transport is asked too, and it knows conversations from before the line’s first message through this platform: when it knows one this line has no conversation for yet, the conversation is opened here as a first send would open it, and `conversation.created` is emitted. Nothing is sent, no contact is created and no line is claimed. `404 not_found` means the line has never had a conversation with the address — its transport said so, or the line’s channel keeps no history to ask and this platform has none — or that the line is not one this key can see; a transport that could not be asked is never a 404. A test key finds the sandbox’s conversations.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"The line, and the address of the person on the other end.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line, as `GET /v1/whoami` lists it."},"address":{"type":"string","minLength":1,"maxLength":320,"description":"The other person’s address, in any form the line’s channel accepts — on iMessage an E.164 number or an Apple ID email."}},"required":["lineId","address"]},"example":{"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","address":"+14155550123"}}}},"responses":{"200":{"description":"The line’s conversation with the address.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The conversation’s id: what `target.conversationId`, `GET /v1/conversations/{conversationId}/messages` and the stream’s frames name."},"isGroup":{"type":"boolean","description":"Always false: this finds the one-to-one conversation with an address."},"firstObservedAt":{"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"}],"description":"When the line’s transport first saw this conversation, as it reports it — on iMessage possibly before the line’s first message through this platform. Null when the transport does not say: a channel whose transport keeps no history, a test key, or a transport that could not be asked this time."}},"required":["id","isGroup","firstObservedAt"]},"example":{"id":"a0000000-0000-4000-8000-000000000001","isGroup":false,"firstObservedAt":"2026-07-14T09:30:00.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`, `unsupported_command`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found","unsupported_command"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `shared_line` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"With `not_on_channel`: the channel of the line the command was aimed at, which carries no such command on any line. With `not_on_line`: that line’s channel, which does."},"capability":{"type":"string","description":"With `not_on_channel` or `not_on_line`: the capability the command needs and that channel, or that line, lacks."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `not_on_line`: the line that cannot carry the command."},"alternatives":{"type":"array","items":{"type":"string"},"description":"With `not_on_channel` or `not_on_line`: capabilities the line does carry that come close. Empty when none does."},"remedy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"With `not_on_channel` or `not_on_line`: what to do next — another command, an option, or a line that carries it."},"use":{"type":"string","description":"With `command_retired`, when the transport names a successor: the command type to send instead. Always one of the published command types."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/attachments/{id}":{"get":{"operationId":"getAttachment","tags":["Messages"],"summary":"Fetch an attachment","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"The bytes, proxied, with the channel’s own caching headers. The line comes from the message carrying the id — or, for a `photo` chat background’s picture, the conversation whose background it is — so an id your key cannot already read is a 404 before any upstream call. Test mode carries no attachments, so in test this is always a 404.","parameters":[{"in":"path","name":"id","required":true,"description":"An id from a message frame’s `attachmentIds`, or a `chat_background` frame’s `background.attachmentId`.","schema":{"type":"string"}},{"in":"header","name":"if-none-match","required":false,"description":"Passed through. A matching entity tag answers 304 with no body.","schema":{"type":"string"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The bytes. `content-type` is whatever the channel reported.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Not modified — your `If-None-Match` still holds."},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/messages/{messageId}/receipts":{"get":{"operationId":"getMessageReceipts","tags":["Messages"],"summary":"Ask what a message’s receipts say","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"Asked now, stored never (P12). `delivered` and `read` are nullable because \"we asked and the channel does not know\" is a real answer from a line that was offline, and folding it into `false` would report a delivered message as undelivered. `upstreamStatus` is the channel’s own word, verbatim, so a support thread can quote it. `messageId` is the message you asked about, by our id; the channel’s own id for it, when it named one, is `upstreamMessageId`. A 404 carries the channel’s `details.reason` when it has one: `not_settled` means it knows the message and has not settled it — ask again shortly — while `not_a_send` and `no_echo_guid` mean this message will never have receipts. A 404 with no reason is a message this key cannot read, or one the channel does not know.","parameters":[{"in":"path","name":"messageId","required":true,"description":"A message id this key can read.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"What the channel can prove, as of `checkedAt`.","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The message asked about: our id for it, the one in the path — never the transport’s."},"upstreamMessageId":{"description":"The transport’s own id for this message — an iMessage GUID, a WhatsApp `wamid.` — as the transport named it in this answer, for quoting to that platform. Null when it named none. Store and ask with `messageId`, never this.","anyOf":[{"type":"string"},{"type":"null"}]},"delivered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null means the transport does not know — a real answer from a line that was offline, and NOT the same as false. Folding null into false would report a delivered message as undelivered."},"read":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null carries the same meaning as on `delivered`."},"checkedAt":{"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":"When this answer was obtained. Receipts are asked for now and stored never, so this is always the moment of the request."},"upstreamStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The transport’s own status word, verbatim, so a support thread can quote it."},"deliveryService":{"description":"The service an iMessage line’s send went out over: `iMessage`, or `SMS` or `RCS` when it went through the carrier instead. Absent when the line did not say — another channel, a test receipt, or a service it does not name — so never read absent as `iMessage`.","type":"string","enum":["iMessage","SMS","RCS"]}},"required":["messageId","delivered","read","checkedAt","upstreamStatus"]},"example":{"messageId":"0192a7c4-5b1e-7c3d-9f2a-6e8d4b1c0a99","upstreamMessageId":"guid-1","delivered":true,"read":null,"checkedAt":"2026-10-18T18:09:40.000Z","upstreamStatus":"delivered"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `conflict`, `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict","project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `no_command` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `idempotency_key_reused`, `idempotency_key_failed` or `idempotency_key_unresolved`: the message an earlier send wrote under this `Idempotency-Key`. Read it before deciding to send again. With any other reason — a transport’s own refusal of this send, on `sendCommand`: the message THIS send wrote before the transport refused it, which the `message.failed` or `message.needs_reconcile` event for it names too. A transport that refuses a send with one of the first three words names no message here; a retry under the same key answers `idempotency_key_failed` or `idempotency_key_unresolved` with it."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"With `idempotency_key_failed` or `idempotency_key_unresolved`: the error code that message settled with — the transport’s refusal, or `gateway_response_lost` when nothing came back — or null for an attempt that died before any answer and has not been reconciled yet."},"failureClass":{"anyOf":[{"type":"string","enum":["target","content","capability","line","rate_limited","not_run","transport","unknown"]},{"type":"null"}],"description":"With `idempotency_key_failed`: the class of the first send’s refusal, from the closed set `command` frames carry — its `errorCode`, read with the reason the refusal carried where that reason and not the code says what to do, as the `message.failed` for the same refusal was. Null with `idempotency_key_unresolved`, whose outcome is unproven rather than failed."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"With a transport’s own reason, on a command it refused only for now and said how long: the seconds to wait before trying the command again."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/conversations":{"get":{"operationId":"listConversations","tags":["Messages"],"summary":"List conversations","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"The conversations this key can read, newest first by when this platform first held them: every group, channel or room a line is in, and every person a line talks to. Each is the conversation as `GET /v1/conversations/{conversationId}` reads it, with the number of members a group has as `participantCount` instead of the members themselves. Narrow it with `lineId`, `kind` and `status`, which combine. A `lineId` that is not one of this key’s lines is a 403 `line_not_allowed`. Page with `cursor`: pass each answer’s `nextCursor` back until it is null.","parameters":[{"in":"query","name":"lineId","required":false,"description":"Only this line’s conversations: one of the lines `GET /v1/whoami` lists.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"kind","required":false,"description":"`direct` for one-to-one conversations, `group` for groups, channels and rooms.","schema":{"type":"string","enum":["direct","group"]}},{"in":"query","name":"status","required":false,"description":"`active`, or `closed` for conversations the line can no longer send to (`statusReason` says why).","schema":{"type":"string","enum":["active","closed"]}},{"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the page before, to read the next, older page. Omit it for the newest page.","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","required":false,"description":"How many conversations a page holds.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"One page of conversations, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, the `target.conversationId` a send names."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the conversation is on."},"lineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The line the conversation is on. Null only when that line was released from the project."},"kind":{"type":"string","enum":["direct","group"],"description":"`direct` — one person and the line; `group` — a group, channel or room the line is in."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The group’s name as the platform shows it. Null for a direct conversation, and for a group with no name."},"status":{"type":"string","enum":["active","closed"],"description":"`active`, or `closed` when the line can no longer reach the group: a send into a closed conversation is refused with `409 conversation_closed`. A closed group is active again once the line is added back or a message arrives in it."},"statusReason":{"anyOf":[{"type":"string","enum":["removed","deleted","archived","suspended"],"description":"Why the group is closed: `removed` — the line is no longer in it (removed, its access lost, or a send answered that it cannot be reached); `deleted` — the platform deleted it; `archived` — a Slack channel was archived; `suspended` — WhatsApp suspended it."},{"type":"null"}],"description":"Why the group is closed. Null while the conversation is active."},"peerAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person a direct conversation is with, as the platform names them. Null for a group."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When this platform first held the conversation."},"lastMessageAt":{"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"}],"description":"When the newest message in it was sent or received. Null when it has none."},"participantCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many members of a group this platform knows, the line itself excluded (as `participants` on the one-conversation read). 0 for a direct conversation."}},"required":["conversationId","channel","lineId","kind","title","status","statusReason","peerAddress","createdAt","lastMessageAt","participantCount"]},"description":"Newest created first. Empty when nothing matches, or past the last page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass it back as `cursor` for the next, older page. Null on the last page. Opaque: never build or parse one."}},"required":["conversations","nextCursor"]},"example":{"conversations":[{"conversationId":"a0000000-0000-4000-8000-000000000001","channel":"imessage","lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","kind":"group","title":"Trip to Lisbon","status":"active","statusReason":null,"peerAddress":null,"participantCount":2,"createdAt":"2026-10-18T17:55:02.000Z","lastMessageAt":"2026-10-18T18:03:11.000Z"}],"nextCursor":null}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`, `line_not_allowed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope","line_not_allowed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","not_owned","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line id the command named at `target.lineId`. `GET /v1/whoami` lists the lines this key can use."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/conversations/{conversationId}":{"get":{"operationId":"getConversation","tags":["Messages"],"summary":"Read a conversation","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"One conversation as this platform holds it: for a group, its name, its members as known and whether the line can still reach it; for a direct conversation, the person it is with. A group is `closed` once the line was removed from it or it was deleted, archived or suspended — `statusReason` says which, `conversation.status_changed` announced it, and a send into it is a 409 `conversation_closed` — and `active` again once the line is added back or a message arrives in it. Its name and members move with the room, announced by `conversation.updated`. A conversation this key cannot read — another project’s, or the other environment’s — is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"conversationId","required":true,"description":"A conversation id this key can read — the `conversationId` of a `message` or `command` frame.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The conversation.","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the conversation, the `target.conversationId` a send names."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the conversation is on."},"lineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The line the conversation is on. Null only when that line was released from the project."},"kind":{"type":"string","enum":["direct","group"],"description":"`direct` — one person and the line; `group` — a group, channel or room the line is in."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The group’s name as the platform shows it. Null for a direct conversation, and for a group with no name."},"status":{"type":"string","enum":["active","closed"],"description":"`active`, or `closed` when the line can no longer reach the group: a send into a closed conversation is refused with `409 conversation_closed`. A closed group is active again once the line is added back or a message arrives in it."},"statusReason":{"anyOf":[{"type":"string","enum":["removed","deleted","archived","suspended"],"description":"Why the group is closed: `removed` — the line is no longer in it (removed, its access lost, or a send answered that it cannot be reached); `deleted` — the platform deleted it; `archived` — a Slack channel was archived; `suspended` — WhatsApp suspended it."},{"type":"null"}],"description":"Why the group is closed. Null while the conversation is active."},"peerAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The person a direct conversation is with, as the platform names them. Null for a group."},"participants":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"The member as the platform names them: the `from` their messages carry in this conversation."},"contactId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Our id for this member, as the contacts routes name them. Null when this project has no contact for them."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name the platform shows for this member, or their contact’s name. Null when neither is known."}},"required":["address","contactId","displayName"]},"description":"A group’s members as this platform knows them, the line itself excluded: the whole membership where the channel reports it, otherwise the people who have joined or written since the line was in the group. Empty for a direct conversation."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When this platform first held the conversation."},"lastMessageAt":{"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"}],"description":"When the newest message in it was sent or received. Null when it has none."}},"required":["conversationId","channel","lineId","kind","title","status","statusReason","peerAddress","participants","createdAt","lastMessageAt"]},"example":{"conversationId":"a0000000-0000-4000-8000-000000000001","channel":"imessage","lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","kind":"group","title":"Trip to Lisbon","status":"active","statusReason":null,"peerAddress":null,"participants":[{"address":"+14155550100","contactId":"0192a7c0-4444-7555-8666-777788889999","displayName":null},{"address":"sam@icloud.com","contactId":null,"displayName":null}],"createdAt":"2026-10-18T17:55:02.000Z","lastMessageAt":"2026-10-18T18:03:11.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/conversations/{conversationId}/messages":{"get":{"operationId":"listConversationMessages","tags":["Messages"],"summary":"Read a conversation’s messages","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"A conversation’s history, newest first, both ways: what the contact sent you and what you sent them. This is how to read what was said before you were streaming — the stream starts from now, or from an event id you already hold. Live catch-up after a dropped connection is still `Last-Event-ID` on `/v1/response_stream`, which replays every event, not only messages. Each row is the `message` frame the stream carries, with the same ids — `messageId` is the one to reply to — plus `direction`, and for an outbound message its `status` and the `commandId` its 202 handed back. An inbound row carries what its `message` frame carried — `addressed`, `fromDisplayName`, `platform`, `contactId` and the rest — except `optedOut`, which was the sender’s choice at that moment, and each attachment’s `isSticker`, which no row keeps. A row recorded before a field was kept does not carry it: there a missing `addressed` means it was not recorded, not that the message was for your line. A live key’s history is complete — live messages are kept for ever, where the stream replays 90 days of events; a test key’s messages are kept 30 days, the newest each way in each conversation kept longer. Page with `cursor`: pass each answer’s `nextCursor` back until it is null; a cursor past the last page answers an empty page. A conversation this key cannot read — another project’s, or the other environment’s — is a 404, the same answer an id that never existed gets. A test key reads the sandbox’s conversations.","parameters":[{"in":"path","name":"conversationId","required":true,"description":"A conversation id this key can read — the `conversationId` of a `message` or `command` frame.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the page before, to read the next, older page. Omit it for the newest page.","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","required":false,"description":"How many messages a page holds.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"One page of the conversation, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string","description":"The thread this arrived on. Send back to it with this id."},"from":{"type":"string","description":"Who sent it, normalised: the contact’s address for an inbound message, and your line’s address for an outbound one. Empty when the platform recorded no sender address."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null for a message that carried no text — attachments alone, for one. On iMessage it is also null, among others, for the message a chat background change leaves in a conversation with one person on a line whose device predates the `chat_background` frame, which `sendCommand` describes, and for a poll’s own row that reached this platform before the poll’s moment, which the `polls` option of `/v1/response_stream` describes."},"externalId":{"type":"string","deprecated":true,"description":"Deprecated: read `platformMessageId` instead, which carries the same value; this field stays and is never removed. The transport’s own id for this message, or our `messageId` when it supplied none."},"replyToExternalId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The message being replied to. Unlike `externalId` this is always OUR message id, never the transport’s: the `messageId` of that message’s own `message` frame when the contact sent it, and the `messageId` its `command` frame carried when you did. Null when the message is not a reply, or when it replies to a message this platform does not hold."},"occurredAt":{"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":"When the transport says it happened, which is not when you received this frame."},"attachmentIds":{"type":"array","items":{"type":"string"},"description":"Fetch each with `GET /v1/attachments/{id}`. Always empty in test mode."},"platformMessageId":{"description":"The channel’s own id for this message — on a test line, the simulated device’s — so you can correlate with anything you already hold, and name the message by it in a later command, such as `reaction.set`. It falls back to our `messageId` only when the channel supplied none, since an empty string here would be a frame you cannot correlate at all. Reply by `messageId`, not by this. `externalId` carries the same value; absent only on an answer from before the field.","type":"string"},"messageId":{"type":"string","description":"Our id for this message. Reply to it by naming this at `target.replyToMessageId`, and match a later message’s `replyToExternalId` against it."},"lineId":{"description":"The line the message is on — its `id` as `GET /v1/whoami` lists it: the line an inbound message arrived on (and a reply to the conversation goes out on), or the line an outbound one went out on. Absent on a row whose line no longer exists.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the message is on — the `channel` of its conversation, and of its line as `GET /v1/whoami` lists it: `imessage`, `whatsapp` and so on. Always present."},"isGroup":{"description":"Whether the conversation this message arrived in is a group chat, as the channel reported it: `true` for a group, `false` for a one-to-one conversation, and absent when the channel has not said. A group’s messages arrive under the group’s own `conversationId`, never under the sender’s one-to-one conversation.","type":"boolean"},"addressed":{"description":"On a group message, whether it is for your line: `true` when it names your line, replies to a message your line sent, is an iMessage app card that replaces one your line sent, sits in a thread your line posted in, or, on Telegram, is a command to it. `false` only where the channel read the message and found none of these, as Slack, Discord and Telegram do. Absent means nobody could tell — on iMessage and WhatsApp, a group message that neither mentions nor replies to your line — so treat the message as addressed. Only `false` means it was not addressed to the line. Never on a one-to-one message.","type":"boolean"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Fetch it with `GET /v1/attachments/{id}`; the same id `attachmentIds` lists."},"mimeType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The type the sender’s device declared, as `type/subtype`, or the type its declared kind (Apple’s UTI) names — `audio/x-caf` for a voice memo; null when neither says. Not necessarily the `content-type` `GET /v1/attachments/{id}` answers, which is read from the bytes."},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The file’s name as the sender’s device gave it, or null."},"byteSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The file’s size in bytes, or null."},"kind":{"description":"`voice_note` when the channel reported the message as a voice memo and this is its recording. Absent otherwise — never read absent as \"not a voice note\". New kinds may be added.","type":"string","enum":["voice_note"]}},"required":["id","mimeType","filename","byteSize"]},"description":"What `attachmentIds` lists, one entry per id in the same order, with what the sender’s device declared about each: its type, name and size. Always empty in test mode."},"isVoiceMemo":{"description":"`true` when the channel reported the message as a voice memo — the recording is among its attachments, marked `attachments[].kind: voice_note` when it is the only one, and `text` may carry the channel’s transcript. Absent otherwise, which includes a channel that does not report it: never read absent as `false`.","type":"boolean","const":true},"effect":{"description":"The expressive effect the sender chose, as the channel names it — on iMessage a bubble or screen effect by its short name (`impact`, `confetti`, `shootingstar`, …), most of which `message.send` takes back but not all, or Apple’s own identifier verbatim for an effect the sender’s device does not know: tolerate a value you do not recognise. Absent when the message was sent with none, or the channel did not say.","type":"string"},"service":{"description":"The service an iMessage line received the message over: `iMessage`, or `SMS` or `RCS` when the sender’s phone sent it through their carrier instead. Absent when the line did not say — a line not yet updated to report it, another channel, or a service it does not name — so never read absent as `iMessage`.","type":"string","enum":["iMessage","SMS","RCS"]},"contactId":{"description":"Our id for the contact who sent the message — the `contactId` the `location.*` events, reactions and the console name them by. Absent on a message received before the field existed, and on a history row whose sender this project no longer holds.","type":"string"},"optedOut":{"description":"Whether the sender is opted out once this message is recorded. `true` when this message, or an earlier one it did not undo, was an opt-out keyword on a phone channel: the whole message, in capitals, one of STOP, UNSUBSCRIBE, OPTOUT, CANCEL, END or QUIT, ignoring spaces around it and any trailing `.`, `!` or `?`. A near-miss — \"stop\", \"Stop\" or \"STOP please\" — changes nothing. A send to them is then refused with `recipient_not_allowed`. `false` otherwise — including when this message opted them back in: START or UNSTOP, or anything else they wrote one-to-one that carries no opt-out word. A keyword typed in a group chat changes nothing. Absent on a message received before the field existed, and on a conversation history row.","type":"boolean"},"kind":{"description":"What the message is, where the channel said: `text`, `media`, `location`, `contact`, `interactive_reply` (a button or quick reply the person tapped; see `interactiveReply`), `template_reply`, `app_card` (a card from an iMessage app; see `appCard`) and so on. Absent when the channel did not say. New kinds may be added: treat one you do not recognise as `unsupported`.","type":"string","enum":["text","media","location","contact","system","unsupported","template","interactive","interactive_reply","template_reply","sticker","rich_link","multipart","location_request","poll","app_card","reaction"]},"appCard":{"description":"With `kind` `app_card`, on an iMessage line: the card a person sent from an iMessage app. `text` is null, `attachments` is empty (the card’s picture is not published) and the card is never a reply. Absent on every other message, and on a card received by a line not yet updated to report cards, which arrives as a message with unreadable text and a picture.","type":"object","properties":{"app":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The app’s name as the card carried it, or null."},"teamId":{"type":"string","description":"The Apple team id of the app’s developer. Apple’s own apps use `0000000000`."},"bundleId":{"type":"string","description":"The bundle id of the app’s Messages extension."},"appStoreId":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The app’s App Store id as the card carried it, or null."}},"required":["name","teamId","bundleId","appStoreId"],"description":"The app the card came from. Any app a person has can send one, registered with us or not."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The app’s own state, as the sender’s app wrote it: often an `https` link, sometimes a `data:` URL. Treat it as untrusted input; we never fetch it. Null when the card carried none, when it is longer than 16384 characters, and on a card from one of Apple’s own apps."},"interactive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"`true` when the app draws the card itself on a phone that has it; `false` for a plain card; null when the line could not read the card’s contents, as on a card from one of Apple’s own apps."},"layout":{"anyOf":[{"type":"object","properties":{"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s first line, or null."},"subcaption":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The card’s second line, or null."}},"required":["caption","subcaption"]},{"type":"null"}],"description":"The card’s words. Null when the card carried none, and on a card from one of Apple’s own apps."},"updates":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `messageId` of the first card this one replaces in the conversation, when we can tell: one your line sent, or an earlier one the person sent. Name it at `target.messageId` of `app_card.update` to answer on a card of yours. Null for a new card, and when the app did not link its card to the one before, which is the app’s choice, so null does not prove the card is new."}},"required":["app","url","interactive","layout","updates"]},"interactiveReply":{"description":"With `kind` `interactive_reply`: the button, quick reply or action the person tapped. Absent otherwise.","type":"object","properties":{"id":{"type":"string","maxLength":256,"description":"The id you gave the button, quick reply or action when you sent it."},"title":{"type":"string","maxLength":256,"description":"The words the person saw on what they tapped."},"sourceMessageId":{"description":"Our `messageId` of the message that carried the buttons, when this platform holds it.","type":"string"}},"required":["id","title"]},"fromDisplayName":{"description":"The name the sender’s platform shows for them, as it said it. A label to show, never an identity: anyone can change it, so match people by `from` or `contactId`. Absent when the platform gave none.","type":"string","maxLength":256},"replyTo":{"description":"The message this one replies to, and how. Absent when it is not a reply we can name.","type":"object","properties":{"messageId":{"type":"string","description":"Our id for the message replied to — the same value as `replyToExternalId`."},"style":{"type":"string","enum":["quote","thread"],"description":"`quote` for a reply that quotes one message, `thread` for one posted in a message’s thread, as Slack replies are. New styles may be added."}},"required":["messageId","style"]},"textFormat":{"description":"The markup `text` is written in, as the channel delivered it: `plain`, or the channel’s own — Slack’s mrkdwn, Discord’s markdown, Telegram’s HTML. Absent means plain. New formats may be added; `textPlain` always reads without markup.","type":"string","enum":["plain","slack_mrkdwn","discord_markdown","telegram_html"]},"textPlain":{"description":"`text` with the markup taken out, when `textFormat` is not `plain`. Absent otherwise.","type":"string"},"platform":{"description":"The arriving channel’s own ids for the message, under that channel’s key alone — `platform.slack` on a Slack message. Never the platform’s raw payload. Keys may be added. Absent when there are none.","type":"object","properties":{"whatsapp":{"description":"On a WhatsApp message.","type":"object","properties":{"waId":{"description":"The sender’s WhatsApp id, when Meta sent one.","type":"string"},"bsuid":{"description":"The sender’s business-scoped user id, when Meta sent one.","type":"string"},"contextMessageId":{"description":"The WhatsApp id of the message this replies to.","type":"string"},"referral":{"description":"The ad or link the person came from, as Meta described it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"location":{"description":"On a `location` message: the place the person shared. When it answers your location request, `contextMessageId` names that request.","type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Degrees north, from -90 to 90."},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Degrees east, from -180 to 180."},"name":{"description":"The place’s name, when the person picked one.","type":"string","maxLength":1024},"address":{"description":"The place’s address, when WhatsApp sent one.","type":"string","maxLength":1024},"url":{"description":"The place’s link, when WhatsApp sent one.","type":"string","maxLength":2048}},"required":["latitude","longitude"]}}},"slack":{"description":"On a Slack message.","type":"object","properties":{"teamId":{"type":"string","description":"The Slack workspace id."},"channelId":{"type":"string","description":"The Slack channel or direct message id."},"userId":{"type":"string","description":"The sender’s Slack user id."},"threadTs":{"description":"The thread’s timestamp, when the message is in a thread.","type":"string"}},"required":["teamId","channelId","userId"]},"discord":{"description":"On a Discord message.","type":"object","properties":{"channelId":{"type":"string","description":"The Discord channel or direct message id."},"guildId":{"description":"The server id, when the message is in a server.","type":"string"},"threadId":{"description":"The thread the message was written in, when it is in one. The conversation is the channel’s: every thread of a channel arrives under its `conversationId`.","type":"string"},"parentChannelId":{"description":"The channel the thread hangs off, when the message is in a thread.","type":"string"}},"required":["channelId"]},"telegram":{"description":"On a Telegram message.","type":"object","properties":{"chatId":{"type":"string","description":"The Telegram chat id."},"username":{"description":"The sender’s @username, when they have one. Display only.","type":"string"},"messageThreadId":{"description":"The forum topic the message was written in, when the group is a forum. The conversation is the group’s: every topic arrives under its `conversationId`.","type":"string"}},"required":["chatId"]},"messenger":{"description":"On a Messenger message.","type":"object","properties":{"pageId":{"type":"string","description":"The Facebook Page the message was sent to."},"psid":{"type":"string","description":"The sender’s page-scoped id."}},"required":["pageId","psid"]}}},"direction":{"type":"string","enum":["inbound","outbound"],"description":"`inbound` for a message the contact sent you, `outbound` for one you (or the console) sent."},"status":{"anyOf":[{"type":"string","enum":["queued","sending","sent","delivered","read","failed","needs_reconcile"]},{"type":"null"}],"description":"Where an outbound message stands now: `queued` and `sending` before the transport took it, `sent` once it did, `delivered` and `read` as the receipts arrived (the `receipts` option of `/v1/response_stream` frames each one), `failed` when it did not go, and `needs_reconcile` when it left and was never confirmed — the outcome the `message.needs_reconcile` event announces. Null for an inbound message."},"commandId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `commandId` the 202 handed back for this send — the correlator the `command` frame carried. Null for an inbound message, and for an outbound one no transport ever took (a refused send)."},"deliveryService":{"description":"The service an iMessage line’s send went out over: `iMessage`, or `SMS` or `RCS` when it went through the carrier instead. Absent when the line did not say — another channel, a test receipt, or a service it does not name — so never read absent as `iMessage`.","type":"string","enum":["iMessage","SMS","RCS"]},"deliveryError":{"description":"The iMessage line’s own error code for the delivery, as text — `4` — for quoting to support. Absent when there was none. Never branch on it: the status says what happened.","type":"string","maxLength":64}},"required":["conversationId","from","text","externalId","replyToExternalId","occurredAt","attachmentIds","messageId","channel","attachments","direction","status","commandId"]},"description":"Newest first. Empty when the conversation has no messages, or past the last page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass it back as `cursor` for the next, older page. Null on the last page. Opaque: never build or parse one."}},"required":["messages","nextCursor"]},"example":{"messages":[{"conversationId":"a0000000-0000-4000-8000-000000000001","channel":"imessage","from":"+14155550100","text":"is it here yet?","externalId":"guid-1","platformMessageId":"guid-1","replyToExternalId":null,"occurredAt":"2026-10-18T18:03:11.000Z","attachmentIds":[],"attachments":[],"messageId":"0192a7c4-6a02-7e11-8c4d-2b9f7e3a5d22","direction":"inbound","status":null,"commandId":null}],"nextCursor":null}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/events":{"get":{"operationId":"listEvents","tags":["Stream"],"summary":"Read the project’s events","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"The project’s event history in this key’s environment, newest first: the events its webhooks are sent and its stream frames, read back. This is how to catch up on what happened before you were listening — the stream starts from now or from an id you hold, and a webhook endpoint is sent only what happens after it subscribes. Any `id` you have read is a `Last-Event-ID` `/v1/response_stream` resumes after, so you can read back and then follow — but resume from one a few seconds older than the newest you read and deduplicate on `id`: an event’s `id` is taken as it is written and the event is listed once that write commits, so an event can appear with an `id` a moment older than one you have already read. Omit `type` and the list is every type a new webhook endpoint is subscribed to by default — every type but `location.share_started`, `location.updated`, `location.share_ended`, `message.edited`, `message.unsent`, `poll.created`, `poll.options_changed`, `poll.voted`, `poll.vote_cleared`, `conversation.updated` and `conversation.background_changed`, which are listed only when `type` names them, as a webhook endpoint and the stream treat them. Each event is its `id`, `type`, `occurredAt` and `data`, one shape per event: `message.received` is a `V1MessageFrame`, `command.settled` is a `V1CommandFrame`, `message.delivered` and `message.read` a `V1ReceiptFrame`, `message.delivery_failed` a `V1DeliveryFailedFrame`, `location.share_started`, `location.updated` and `location.share_ended` a `V1LocationFrame`, `message.edited` and `message.unsent` a `V1MessageEditedFrame` or `V1MessageUnsentFrame`, `poll.created`, `poll.options_changed`, `poll.voted` and `poll.vote_cleared` a `V1PollFrame`, `reaction.added` and `reaction.removed` a `V1ReactionFrame`, `conversation.created`, `conversation.updated` and `conversation.status_changed` a `V1ConversationCreatedFrame` or `V1ConversationUpdatedFrame` or `V1ConversationStatusChangedFrame`, `line.gap` a `V1GapFrame`, `conversation.background_changed` a `V1ChatBackgroundFrame`; every other type’s `data` is the `data` a webhook subscribed to it is sent. `from` and `to` filter on when an event was recorded, which is its `occurredAt` for most events and later for an inbound one — a message, a receipt, a reaction — by however long the platform took to tell us: usually seconds, longer after a connection outage, so a `to` copied from an inbound event’s `occurredAt` can leave that event out. Events are kept at least 90 days; some events are kept longer. Page with `cursor`: pass each answer’s `nextCursor` back, with the same filters, until it is null; a cursor past the last page answers an empty page. A test key reads the sandbox’s events.","parameters":[{"in":"query","name":"type","required":false,"description":"The event types to list, comma-separated. Omit it for the default subscription above. A value that is not an event type is a 422 `validation_failed` at `type` whose entry names it in `unknown`, rather than a list that is silently not the one you asked for.","style":"form","explode":false,"schema":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]}}},{"in":"query","name":"resourceId","required":false,"description":"Only the events about one thing, by the id its events name it by: a message’s `messageId` — its receipts, reactions, edits and the `command.settled` of the send that wrote it — a conversation’s `conversationId` for `conversation.created`, its locations and its polls, a line’s `lineId` and a contact’s `contactId` for `contact.opt_out_changed`. Not a uuid is a 422 at `resourceId`.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"from","required":false,"description":"Only events recorded at or after this instant, to the millisecond: ISO-8601 with its zone, like `2026-10-17T04:00:12.345Z`. A value with no zone, or after `to`, is a 422 at `from`.","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"to","required":false,"description":"Only events recorded at or before this instant, to the millisecond — written as `from` is. Alone, it is a jump: the first page is the newest events recorded by then. A value with no zone is a 422 at `to`.","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the page before, to read the next, older page. Omit it for the newest page.","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","required":false,"description":"How many events a page holds.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"One page of the project’s events, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The event’s id: the `id:` the stream framed it with, and the `id` (and `mapier-event-id` header) a webhook endpoint is sent it under — deduplicate across all three on it."},"type":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"],"description":"What happened. The same string a webhook subscription names."},"occurredAt":{"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":"When it happened, to the millisecond, in UTC. For an inbound event this is the platform’s own instant, which can be earlier than when the event was recorded — the time `from` and `to` filter on."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The event’s own fields, by `type`. For a type `/v1/response_stream` frames, exactly the `data:` of that frame — the operation’s description names the frame each type is; for any other type, the `data` a webhook endpoint subscribed to it is sent."}},"required":["id","type","occurredAt","data"]},"description":"Newest first. Empty when nothing matches, or past the last page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass it back as `cursor`, with the same filters, for the next, older page. Null on the last page. Opaque: never build or parse one."}},"required":["events","nextCursor"]},"example":{"events":[{"id":"0192a7e0-1a2b-7c3d-8e4f-5a6b7c8d9e0f","type":"contact.opt_out_changed","occurredAt":"2026-10-18T18:04:00.000Z","data":{"contactId":"0192a7c0-2222-7333-8444-555566667777","personId":"0192a7c0-1111-7222-8333-444455556666","optedOut":true,"source":"keyword"}}],"nextCursor":null}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/lines/{lineId}/reputation":{"get":{"operationId":"getLineReputation","tags":["Project"],"summary":"How a line is doing","security":[{"apiKey":[]},{"personalToken":["lines:read"]}],"description":"The line’s latest reputation reading and its last seven days. An iMessage line is graded on two axes: load — what it sends before anyone reacts: new chats, sends per day and per hour, people reached — and quality — how recipients and Apple react: delivered share, sends with no known outcome, reply rate, opt-outs. Each measure is published beside the limit it is read against, so a slow-down never surprises you: `38 of 50 new chats` is a reading you can act on before the status moves. The status is the worse of the two axes, and `actionItems` say what to do. A reading is taken about every 15 minutes; a line with none yet — a Sandbox line, a test line on a shared number, a line not on iMessage, or a live line not read yet — answers `reputation: null`. A line this key cannot see — another project’s, or the other environment’s — is a 404, the same answer an id that never existed gets. `GET /v1/whoami` carries each line’s status in a word. Also served as `GET /v1/lines/{lineId}/health`, the name to use; this path keeps answering.","parameters":[{"in":"path","name":"lineId","required":true,"description":"A line id this key can see — the `id` `GET /v1/whoami` lists under `lines`.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The latest reading, or null, and the seven-day trend.","content":{"application/json":{"schema":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this reading is about."},"reputation":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["HEALTHY","AT_RISK","CRITICAL","FLAGGED"],"description":"How an iMessage line is doing with recipients and Apple: `HEALTHY` (send normally), `AT_RISK` (slow down on new cold chats, keep replying), `CRITICAL` (stop opening cold chats; replies and warm chats are fine) or `FLAGGED` (rest the line; use another line for new chats). The worse of the line’s load (what it sends) and quality (how recipients react)."},"confidence":{"type":"string","enum":["ok","insufficient"],"description":"`ok`, or `insufficient` when the line has too little recent traffic to grade it well — fewer than 20 checked sends or 10 active chats in 7 days, or a gap in what the line received. Low confidence lowers the claim, never the risk."},"confidenceReasons":{"type":"array","items":{"type":"string"},"description":"Why the confidence is `insufficient`, as short keys; empty when it is `ok`."},"computedAt":{"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":"When the reading was computed."},"policyVersion":{"type":"string","description":"The grading policy the reading was computed under; it changes when a band or limit moves."},"primaryDriver":{"anyOf":[{"type":"object","properties":{"axis":{"type":"string","description":"`load`, `quality` or `terminal`."},"key":{"type":"string","description":"The measure that drives the status."},"summary":{"type":"string","description":"One sentence with the numbers, for example \"38 of 50 new chats in the last 24 hours\"."}},"required":["axis","key","summary"]},{"type":"null"}],"description":"What drives the status, or null on a healthy line."},"load":{"type":"object","properties":{"status":{"type":"string","description":"This axis on its own: `HEALTHY`, `AT_RISK` or `CRITICAL`."},"components":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Which measure this is, for example `new_chats_24h` or `reply_rate_72h`. The list grows."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The measured value, or null when the window held too little to measure it."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"What the value is read against: a ceiling for a count (it warns at 60% and goes past it above), a floor for a rate. Null for a reading shown for information only."},"unit":{"type":"string","description":"`count`, `ratio`, `share`, `seconds` or `days`."},"status":{"type":"string","enum":["ok","warn","hard","unknown"],"description":"`ok`, `warn` (inside the warning band), `hard` (past the limit) or `unknown`."},"note":{"description":"What the limit is and any gate on it, in a sentence.","type":"string"}},"required":["key","value","limit","unit","status"]},"description":"Every measure on this axis, each beside its limit."}},"required":["status","components"],"description":"What the line sends, before anyone reacts: new chats, sends per day and per hour, people reached."},"quality":{"type":"object","properties":{"status":{"type":"string","description":"This axis on its own: `HEALTHY`, `AT_RISK` or `CRITICAL`."},"components":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Which measure this is, for example `new_chats_24h` or `reply_rate_72h`. The list grows."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The measured value, or null when the window held too little to measure it."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"What the value is read against: a ceiling for a count (it warns at 60% and goes past it above), a floor for a rate. Null for a reading shown for information only."},"unit":{"type":"string","description":"`count`, `ratio`, `share`, `seconds` or `days`."},"status":{"type":"string","enum":["ok","warn","hard","unknown"],"description":"`ok`, `warn` (inside the warning band), `hard` (past the limit) or `unknown`."},"note":{"description":"What the limit is and any gate on it, in a sentence.","type":"string"}},"required":["key","value","limit","unit","status"]},"description":"Every measure on this axis, each beside its limit."}},"required":["status","components"],"description":"How recipients and Apple react: delivered share, sends with no known outcome, reply rate, opt-outs."},"chats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"One-to-one chats with a message in the last 7 days."},"counts":{"type":"object","properties":{"HEALTHY":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `HEALTHY`."},"AT_RISK":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `AT_RISK`."},"CRITICAL":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `CRITICAL`."},"OPTED_OUT":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `OPTED_OUT`."}},"required":["HEALTHY","AT_RISK","CRITICAL","OPTED_OUT"],"description":"The recent chats by their own grade."}},"required":["active","counts"],"description":"The line’s one-to-one chats."},"actionItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"A stable key for the action."},"title":{"type":"string","description":"What to do, in a few words."},"detail":{"type":"string","description":"Why, and how, in a sentence."}},"required":["key","title","detail"]},"description":"What to do about the reading, most important first; empty on a healthy line."}},"required":["status","confidence","confidenceReasons","computedAt","policyVersion","primaryDriver","load","quality","chats","actionItems"]},{"type":"null"}],"description":"The latest reading, or null when the line has none yet — a test line, a line not on iMessage, or a live line not yet read."},"history":{"type":"array","items":{"type":"object","properties":{"computedAt":{"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":"When that reading was computed."},"status":{"type":"string","enum":["HEALTHY","AT_RISK","CRITICAL","FLAGGED"],"description":"How an iMessage line is doing with recipients and Apple: `HEALTHY` (send normally), `AT_RISK` (slow down on new cold chats, keep replying), `CRITICAL` (stop opening cold chats; replies and warm chats are fine) or `FLAGGED` (rest the line; use another line for new chats). The worse of the line’s load (what it sends) and quality (how recipients react)."}},"required":["computedAt","status"]},"description":"Every reading of the last 7 days, oldest first — about one every 15 minutes; empty with none."}},"required":["lineId","reputation","history"]},"example":{"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","reputation":{"status":"HEALTHY","confidence":"ok","confidenceReasons":[],"computedAt":"2026-10-18T18:00:00.000Z","policyVersion":"1","primaryDriver":null,"load":{"status":"ok","components":[{"key":"new_contacts_today","value":14,"limit":40,"unit":"contacts","status":"ok"}]},"quality":{"status":"ok","components":[{"key":"reply_rate_7d","value":0.62,"limit":0.2,"unit":"ratio","status":"ok"}]},"chats":{"active":31,"counts":{"HEALTHY":29,"AT_RISK":2,"CRITICAL":0,"OPTED_OUT":0}},"actionItems":[]},"history":[{"computedAt":"2026-10-17T18:00:00.000Z","status":"HEALTHY"}]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}},"deprecated":true}},"/v1/lines/{lineId}/health":{"get":{"operationId":"getLineHealth","tags":["Project"],"summary":"How a line is doing","security":[{"apiKey":[]},{"personalToken":["lines:read"]}],"description":"The line’s latest reputation reading and its last seven days. An iMessage line is graded on two axes: load — what it sends before anyone reacts: new chats, sends per day and per hour, people reached — and quality — how recipients and Apple react: delivered share, sends with no known outcome, reply rate, opt-outs. Each measure is published beside the limit it is read against, so a slow-down never surprises you: `38 of 50 new chats` is a reading you can act on before the status moves. The status is the worse of the two axes, and `actionItems` say what to do. A reading is taken about every 15 minutes; a line with none yet — a Sandbox line, a test line on a shared number, a line not on iMessage, or a live line not read yet — answers `reputation: null`. A line this key cannot see — another project’s, or the other environment’s — is a 404, the same answer an id that never existed gets. `GET /v1/whoami` carries each line’s status in a word. The same answer as `GET /v1/lines/{lineId}/reputation`.","parameters":[{"in":"path","name":"lineId","required":true,"description":"A line id this key can see — the `id` `GET /v1/whoami` lists under `lines`.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The latest reading, or null, and the seven-day trend.","content":{"application/json":{"schema":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line this reading is about."},"reputation":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["HEALTHY","AT_RISK","CRITICAL","FLAGGED"],"description":"How an iMessage line is doing with recipients and Apple: `HEALTHY` (send normally), `AT_RISK` (slow down on new cold chats, keep replying), `CRITICAL` (stop opening cold chats; replies and warm chats are fine) or `FLAGGED` (rest the line; use another line for new chats). The worse of the line’s load (what it sends) and quality (how recipients react)."},"confidence":{"type":"string","enum":["ok","insufficient"],"description":"`ok`, or `insufficient` when the line has too little recent traffic to grade it well — fewer than 20 checked sends or 10 active chats in 7 days, or a gap in what the line received. Low confidence lowers the claim, never the risk."},"confidenceReasons":{"type":"array","items":{"type":"string"},"description":"Why the confidence is `insufficient`, as short keys; empty when it is `ok`."},"computedAt":{"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":"When the reading was computed."},"policyVersion":{"type":"string","description":"The grading policy the reading was computed under; it changes when a band or limit moves."},"primaryDriver":{"anyOf":[{"type":"object","properties":{"axis":{"type":"string","description":"`load`, `quality` or `terminal`."},"key":{"type":"string","description":"The measure that drives the status."},"summary":{"type":"string","description":"One sentence with the numbers, for example \"38 of 50 new chats in the last 24 hours\"."}},"required":["axis","key","summary"]},{"type":"null"}],"description":"What drives the status, or null on a healthy line."},"load":{"type":"object","properties":{"status":{"type":"string","description":"This axis on its own: `HEALTHY`, `AT_RISK` or `CRITICAL`."},"components":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Which measure this is, for example `new_chats_24h` or `reply_rate_72h`. The list grows."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The measured value, or null when the window held too little to measure it."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"What the value is read against: a ceiling for a count (it warns at 60% and goes past it above), a floor for a rate. Null for a reading shown for information only."},"unit":{"type":"string","description":"`count`, `ratio`, `share`, `seconds` or `days`."},"status":{"type":"string","enum":["ok","warn","hard","unknown"],"description":"`ok`, `warn` (inside the warning band), `hard` (past the limit) or `unknown`."},"note":{"description":"What the limit is and any gate on it, in a sentence.","type":"string"}},"required":["key","value","limit","unit","status"]},"description":"Every measure on this axis, each beside its limit."}},"required":["status","components"],"description":"What the line sends, before anyone reacts: new chats, sends per day and per hour, people reached."},"quality":{"type":"object","properties":{"status":{"type":"string","description":"This axis on its own: `HEALTHY`, `AT_RISK` or `CRITICAL`."},"components":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Which measure this is, for example `new_chats_24h` or `reply_rate_72h`. The list grows."},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The measured value, or null when the window held too little to measure it."},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"What the value is read against: a ceiling for a count (it warns at 60% and goes past it above), a floor for a rate. Null for a reading shown for information only."},"unit":{"type":"string","description":"`count`, `ratio`, `share`, `seconds` or `days`."},"status":{"type":"string","enum":["ok","warn","hard","unknown"],"description":"`ok`, `warn` (inside the warning band), `hard` (past the limit) or `unknown`."},"note":{"description":"What the limit is and any gate on it, in a sentence.","type":"string"}},"required":["key","value","limit","unit","status"]},"description":"Every measure on this axis, each beside its limit."}},"required":["status","components"],"description":"How recipients and Apple react: delivered share, sends with no known outcome, reply rate, opt-outs."},"chats":{"type":"object","properties":{"active":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"One-to-one chats with a message in the last 7 days."},"counts":{"type":"object","properties":{"HEALTHY":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `HEALTHY`."},"AT_RISK":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `AT_RISK`."},"CRITICAL":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `CRITICAL`."},"OPTED_OUT":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Chats graded `OPTED_OUT`."}},"required":["HEALTHY","AT_RISK","CRITICAL","OPTED_OUT"],"description":"The recent chats by their own grade."}},"required":["active","counts"],"description":"The line’s one-to-one chats."},"actionItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"A stable key for the action."},"title":{"type":"string","description":"What to do, in a few words."},"detail":{"type":"string","description":"Why, and how, in a sentence."}},"required":["key","title","detail"]},"description":"What to do about the reading, most important first; empty on a healthy line."}},"required":["status","confidence","confidenceReasons","computedAt","policyVersion","primaryDriver","load","quality","chats","actionItems"]},{"type":"null"}],"description":"The latest reading, or null when the line has none yet — a test line, a line not on iMessage, or a live line not yet read."},"history":{"type":"array","items":{"type":"object","properties":{"computedAt":{"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":"When that reading was computed."},"status":{"type":"string","enum":["HEALTHY","AT_RISK","CRITICAL","FLAGGED"],"description":"How an iMessage line is doing with recipients and Apple: `HEALTHY` (send normally), `AT_RISK` (slow down on new cold chats, keep replying), `CRITICAL` (stop opening cold chats; replies and warm chats are fine) or `FLAGGED` (rest the line; use another line for new chats). The worse of the line’s load (what it sends) and quality (how recipients react)."}},"required":["computedAt","status"]},"description":"Every reading of the last 7 days, oldest first — about one every 15 minutes; empty with none."}},"required":["lineId","reputation","history"]},"example":{"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","reputation":{"status":"HEALTHY","confidence":"ok","confidenceReasons":[],"computedAt":"2026-10-18T18:00:00.000Z","policyVersion":"1","primaryDriver":null,"load":{"status":"ok","components":[{"key":"new_contacts_today","value":14,"limit":40,"unit":"contacts","status":"ok"}]},"quality":{"status":"ok","components":[{"key":"reply_rate_7d","value":0.62,"limit":0.2,"unit":"ratio","status":"ok"}]},"chats":{"active":31,"counts":{"HEALTHY":29,"AT_RISK":2,"CRITICAL":0,"OPTED_OUT":0}},"actionItems":[]},"history":[{"computedAt":"2026-10-17T18:00:00.000Z","status":"HEALTHY"}]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/contacts/{contactId}":{"get":{"operationId":"getContact","tags":["People"],"summary":"Read a contact","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"One address of one person, on one channel: the `contactId` every `message` frame carries. `optedOut` is the person’s, on every channel, not this address alone. A contact this key cannot see — another project’s, or the other environment’s — is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"contactId","required":true,"description":"A contact id — the `contactId` of a `message` frame.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The contact.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the contact — the `contactId` message frames carry."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the address is on."},"address":{"type":"string","description":"The address, normalised — `+14155550100`, `U07ABC123`, `tg:123456`."},"addressKind":{"type":"string","description":"What kind of address it is: `phone`, `email`, `handle`, `slack_user`, `discord_user`, `messenger_psid` and so on. New kinds may be added."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name you or the platform gave them, or null."},"personId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The person this address belongs to, or null if none yet."},"lineId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The line they last wrote to or were written from, or null."},"optedOut":{"type":"boolean","description":"Whether the person is opted out — on every channel, not this address alone."},"firstSeenAt":{"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":"When this platform first recorded the address."},"lastInboundAt":{"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"}],"description":"When they last wrote, or null if they never have."},"lastOutboundAt":{"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"}],"description":"When a line last wrote to them, or null."}},"required":["id","channel","address","addressKind","displayName","personId","lineId","optedOut","firstSeenAt","lastInboundAt","lastOutboundAt"]},"example":{"id":"0192a7c0-2222-7333-8444-555566667777","channel":"whatsapp","address":"+447700900123","addressKind":"phone","displayName":"Ada","personId":"0192a7c0-1111-7222-8333-444455556666","lineId":"0192a7b1-5b6c-7d7e-9f80-a1b2c3d4e5f6","optedOut":false,"firstSeenAt":"2026-10-01T09:12:00.000Z","lastInboundAt":"2026-10-18T17:55:00.000Z","lastOutboundAt":"2026-10-18T17:56:10.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/people/{personId}":{"get":{"operationId":"getPerson","tags":["People"],"summary":"Read a person","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"The person behind one or more contacts — the same human on iMessage and WhatsApp, say — with each address and, for each of your active lines on its channel, whether that line can write to them now and why not. A phone number or an email links contacts to one person automatically; any other link is made in the console. A person since merged into another answers as that one, with the id you asked for in `mergedFrom`. A person this key cannot see is a 404.","parameters":[{"in":"path","name":"personId","required":true,"description":"A person id — the `personId` of `GET /v1/contacts/{contactId}`.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The person and their contacts.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the person — the one they were merged into, if they were."},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name you gave them, or null."},"optedOut":{"type":"boolean","description":"Whether the person is opted out. It covers every contact below."},"optedOutAt":{"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"}],"description":"When they were opted out, or null."},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Our id for the contact."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel the address is on."},"address":{"type":"string","description":"The address, normalised."},"addressKind":{"type":"string","description":"What kind of address it is, as on `GET /v1/contacts/{contactId}`."},"reachability":{"type":"array","items":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line asked about, as `GET /v1/whoami` lists it."},"canSend":{"type":"object","properties":{"freeform":{"type":"boolean","description":"Whether an ordinary message — text, media — would be sent now."},"template":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an approved WhatsApp template would be sent now. Null off WhatsApp."}},"required":["freeform","template"],"description":"What the line may send this person now."},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","deprecated":true,"description":"Deprecated: read `reason` instead, which carries the same value; this field stays and is never removed. The refusal reason."},"reason":{"description":"The refusal reason — `outside_service_window`, `opted_out` and so on. `code` carries the same value; absent only on an answer from before the field.","type":"string"},"docUrl":{"type":"string","format":"uri","description":"The errors page row for that reason."}},"required":["code","docUrl"]},"description":"Why a send would be refused, one entry per reason. Empty when nothing stands in the way."}},"required":["lineId","canSend","reasons"]},"description":"For each of your lines on that channel: whether it can write to them now, and if not, why."}},"required":["id","channel","address","addressKind","reachability"]},"description":"Every address of theirs this project holds, on every channel."},"mergedFrom":{"description":"When you asked for a person since merged into this one: the id you asked for. Absent otherwise.","type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","displayName","optedOut","optedOutAt","contacts"]},"example":{"id":"0192a7c0-1111-7222-8333-444455556666","displayName":"Ada","optedOut":false,"optedOutAt":null,"contacts":[{"id":"0192a7c0-2222-7333-8444-555566667777","channel":"whatsapp","address":"+447700900123","addressKind":"phone","reachability":[{"lineId":"0192a7b1-5b6c-7d7e-9f80-a1b2c3d4e5f6","canSend":{"freeform":true,"template":true},"reasons":[]}]},{"id":"0192a7c0-3333-7444-9555-666677778888","channel":"imessage","address":"ada@icloud.com","addressKind":"email","reachability":[{"lineId":"0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d","canSend":{"freeform":true,"template":null},"reasons":[]}]}]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/contacts/{contactId}/consent":{"post":{"operationId":"recordConsent","tags":["People"],"summary":"Opt a person out","security":[{"apiKey":["messages:send"]},{"personalToken":["messages:send"]}],"description":"Records that a person asked you to stop, when they said so in words a keyword cannot catch — and on Slack, Discord, Telegram and Messenger, where a typed STOP opts nobody out, this is the only way. It covers the person on every channel: every later message to any of their contacts is refused `403 recipient_not_allowed` (`opted_out`), and `contact.opt_out_changed` fires with `source: api`. Calling it again on somebody already opted out changes nothing and answers with the first opt-out’s time. `optedOut: false` is refused: only the person opts back in, by replying START or writing again on iMessage or WhatsApp. `Idempotency-Key` is optional; a request without one is answered `x-mapier-idempotency: none`.","parameters":[{"in":"path","name":"contactId","required":true,"description":"The contact who asked — the `contactId` of their `message` frame.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"idempotency-key","required":false,"description":"Optional. The call is idempotent whatever you send: a repeat answers the first opt-out. A request without one is answered `x-mapier-idempotency: none`. A key is 1 to 200 characters, none of them a control character (U+0000–U+001F or U+007F), and no whitespace at either end; one outside that is a 422 `validation_failed` at `Idempotency-Key`, and a key is never trimmed: a trimmed key is a different key.","schema":{"type":"string","minLength":1,"maxLength":200},"example":"3c9a1e7b-2f4d-4b8a-9e6c-5d1f2a3b4c5e"},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"The opt-out, and why.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"optedOut":{"type":"boolean","const":true,"description":"Always `true`. Only the person can opt back in — by replying START, or writing again."},"reason":{"type":"string","minLength":1,"maxLength":500,"description":"Why, in a sentence, for your records and the audit log — \"Asked in chat to stop messaging\"."}},"required":["optedOut","reason"],"additionalProperties":false},"example":{"optedOut":true,"reason":"Asked us by email to stop messaging them."}}}},"responses":{"200":{"description":"The person is opted out.","content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The contact the call named."},"personId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The person that contact belongs to. The opt-out covers all their contacts."},"optedOut":{"type":"boolean","const":true,"description":"Always `true`."},"scope":{"type":"string","const":"person","description":"Always `person`: no line, on any channel, will message them."},"optedOutAt":{"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":"When the person was opted out — the first time, when they already were. Calling again changes nothing."},"source":{"type":"string","description":"How they were opted out: `api` by a call like this one, `inbound` by their own STOP, `console` by your team. New values may be added."}},"required":["contactId","personId","optedOut","scope","optedOutAt","source"]},"example":{"contactId":"0192a7c0-2222-7333-8444-555566667777","personId":"0192a7c0-1111-7222-8333-444455556666","optedOut":true,"scope":"person","optedOutAt":"2026-10-18T18:04:00.000Z","source":"api"}}},"headers":{"x-mapier-idempotency":{"description":"`none` when the request carried no `Idempotency-Key`: a key was minted for this request alone, so a retry of it is a new request. Absent when the request carried a key.","schema":{"type":"string","enum":["none"]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/capabilities":{"get":{"operationId":"getCapabilities","tags":["Project"],"summary":"What works where","security":[{"apiKey":[]},{"personalToken":[]}],"description":"Every command type and capability, with its cell on every channel Mapier offers or plans to: `yes` (it works), `coming_soon` (not yet) or `not_supported` (the platform has no such thing). A command whose cell on a channel is not `yes` is refused there with a 404 `unsupported_command`: `reason: not_on_channel`, or `not_on_line` where only some of the channel’s lines carry it. Each channel also lists its limits and rules, each with what a call that breaks one answers. What one line can do is `GET /v1/whoami`’s `lines[].capabilities`. Any key or personal access token can read this, whatever its scopes. The body is the same at every `x-mapier-version`, and `factsHash` changes whenever anything in it does. Text fields may be reworded at any time: key your code on `id`, `state`, `kind` and the numbers.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The capability matrix, version 2.","content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"number","const":2},"factsHash":{"type":"string","description":"`sha256:<hex>` of this document without this field. It changes whenever anything else does."},"modeWhenUnset":{"type":"string"},"capabilityIds":{"type":"array","items":{"type":"string"},"description":"Every capability id, in one order every list here keeps."},"receiveCapabilityIds":{"type":"array","items":{"type":"string"},"description":"The ids about what a line receives rather than sends."},"commandTypes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The `{type}` of `POST /v1/commands/{type}`."},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The one channel the type belongs to, or null for a core type."},"carriedBy":{"type":"array","items":{"type":"string"},"description":"A line carries the type when its list holds any of these."},"tier":{"type":"string","enum":["universal","shared_optional","platform_only"]},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["yes","coming_soon","not_supported"],"description":"`yes` (works), `coming_soon` (not yet) or `not_supported` (the platform has no such thing). A gap is refused as the cell’s `refusal` says."},"description":"The type’s cell on each channel."},"refusal":{"type":"object","properties":{"code":{"type":"string","const":"unsupported_command"},"reason":{"type":"string","const":"not_on_channel"}},"required":["code","reason"],"description":"What a send of the type answers on a channel whose cell is not `yes`."}},"required":["type","channel","carriedBy","tier","channels","refusal"],"additionalProperties":{}},"description":"Every command type, with its cell on every channel."},"cellStateLabels":{"type":"object","properties":{"yes":{"type":"string"},"coming_soon":{"type":"string"},"not_supported":{"type":"string"}},"required":["yes","coming_soon","not_supported"],"description":"The word for each cell state."},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"label":{"type":"string"},"releaseState":{"type":"string","description":"How far the channel is offered. New values may be added."},"releaseWord":{"type":"string"},"offeredModes":{"type":"array","items":{"type":"string"}},"initiation":{"type":"string","description":"Who may write first. New values may be added."},"receiptCeiling":{"type":"string","description":"The highest receipt status a message on it reaches."},"textLimit":{"type":"object","properties":{"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string"}},"required":["max","unit"],"additionalProperties":{}},"cells":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["yes","coming_soon","not_supported"],"description":"`yes` (works), `coming_soon` (not yet) or `not_supported` (the platform has no such thing). A gap is refused as the cell’s `refusal` says."},"description":"Every capability id’s cell."},"absent":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"state":{"type":"string","enum":["coming_soon","not_supported"]},"reason":{"type":"string"},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["state","reason","sourceUrl"],"additionalProperties":{}},"description":"Why each gap is one."},"featureCells":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"state":{"type":"string","enum":["yes","coming_soon","not_supported"],"description":"`yes` (works), `coming_soon` (not yet) or `not_supported` (the platform has no such thing). A gap is refused as the cell’s `refusal` says."},"word":{"type":"string"},"ifYouTry":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"The `error.code` a call answers with."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Its `details.reason`, or null where the code alone is the refusal."},"httpStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"docUrl":{"type":"string","description":"The errors page’s row for it."}},"required":["code","reason","httpStatus","docUrl"],"additionalProperties":{}},{"type":"null"}]},"via":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The capability id that carries the feature on this channel when it is none of the feature’s own `capabilityIds` (an iMessage location is sent as a link, `message.send.rich_link`), or null."}},"required":["state","word","ifYouTry","via"],"additionalProperties":{}}},"restrictions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","description":"New kinds may be added."},"enforcement":{"type":"object","properties":{"mode":{"type":"string"}},"required":["mode"],"additionalProperties":{}}},"required":["id","kind","enforcement"],"additionalProperties":{}}},"docsSlug":{"type":"string"}},"required":["channel","label","releaseState","releaseWord","offeredModes","initiation","receiptCeiling","textLimit","cells","absent","featureCells","restrictions","docsSlug"],"additionalProperties":{}},"description":"Every channel Mapier offers or plans to."},"features":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"tier":{"type":"string","enum":["universal","shared_optional","platform_only"]},"carriers":{"type":"array","items":{"type":"string"}}},"required":["id","label","tier","carriers"],"additionalProperties":{}}},"refusals":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The `error.code` a call answers with."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Its `details.reason`, or null where the code alone is the refusal."},"httpStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"docUrl":{"type":"string","description":"The errors page’s row for it."}},"required":["code","reason","httpStatus","docUrl"],"additionalProperties":{}},"description":"Every refusal a cell or restriction names, once."}},"required":["schemaVersion","factsHash","modeWhenUnset","capabilityIds","receiveCapabilityIds","commandTypes","cellStateLabels","channels","features","refusals"],"additionalProperties":{}},"examples":{"getCapabilities":{"summary":"Trimmed to iMessage and WhatsApp, two features and two refusals; the answer lists them all.","value":{"schemaVersion":2,"factsHash":"sha256:ee0b1c3dfaf074ad67fbc616e24bc913b227639275631741329c5bcc75163f00","modeWhenUnset":"mapier_cloud","capabilityIds":["message.send.text","message.send.media","message.send.sticker","message.send.rich_link","message.send.multipart","message.send.location_request","message.send.poll","message.send.app_card","app_card.update","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","handle_check","attachments","receipts","events.delivered","events.read","events.location","events.moderation","events.poll","events.chat_background","service_window","messenger.interactive.send"],"receiveCapabilityIds":["attachments","receipts","events.delivered","events.read","events.location","events.moderation","events.poll","events.chat_background","service_window"],"commandTypes":[{"type":"message.send","channel":null,"carriedBy":["message.send.text","message.send.media","message.send.sticker","message.send.rich_link","message.send.multipart","message.send.location_request","message.send.poll","message.send.app_card"],"tier":"universal","channels":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"reaction.set","channel":null,"carriedBy":["reaction.set"],"tier":"universal","channels":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"reaction.remove","channel":null,"carriedBy":["reaction.remove"],"tier":"universal","channels":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"message.read","channel":null,"carriedBy":["message.read"],"tier":"universal","channels":{"imessage":"yes","whatsapp":"yes","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"typing.start","channel":null,"carriedBy":["typing.start"],"tier":"universal","channels":{"imessage":"yes","whatsapp":"yes","telegram":"yes","discord":"yes","slack":"yes","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"message.edit","channel":null,"carriedBy":["message.edit"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"yes","discord":"yes","slack":"yes","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"message.unsend","channel":null,"carriedBy":["message.unsend"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"yes","discord":"yes","slack":"yes","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"name_photo.get","channel":null,"carriedBy":["name_photo.get"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"name_photo.set","channel":null,"carriedBy":["name_photo.set"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"poll.vote","channel":null,"carriedBy":["poll.vote"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"chat_background.set","channel":null,"carriedBy":["chat_background.set"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"chat_background.remove","channel":null,"carriedBy":["chat_background.remove"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"app_card.update","channel":null,"carriedBy":["app_card.update"],"tier":"shared_optional","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"reaction.tapback","channel":"imessage","carriedBy":["reaction.tapback"],"tier":"platform_only","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"name_photo.share","channel":"imessage","carriedBy":["name_photo.share"],"tier":"platform_only","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"group.create","channel":"imessage","carriedBy":["group.create"],"tier":"platform_only","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"group.update","channel":"imessage","carriedBy":["group.update"],"tier":"platform_only","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"group.leave","channel":"imessage","carriedBy":["group.leave"],"tier":"platform_only","channels":{"imessage":"yes","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"whatsapp.template.send","channel":"whatsapp","carriedBy":["whatsapp.template.send"],"tier":"platform_only","channels":{"imessage":"not_supported","whatsapp":"yes","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"whatsapp.interactive.send","channel":"whatsapp","carriedBy":["whatsapp.interactive.send"],"tier":"platform_only","channels":{"imessage":"not_supported","whatsapp":"yes","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"whatsapp.location.send","channel":"whatsapp","carriedBy":["whatsapp.location.send"],"tier":"platform_only","channels":{"imessage":"not_supported","whatsapp":"yes","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"whatsapp.contacts.send","channel":"whatsapp","carriedBy":["whatsapp.contacts.send"],"tier":"platform_only","channels":{"imessage":"not_supported","whatsapp":"yes","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"whatsapp.group.create","channel":"whatsapp","carriedBy":["whatsapp.group.create"],"tier":"platform_only","channels":{"imessage":"not_supported","whatsapp":"coming_soon","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"not_supported"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}},{"type":"messenger.interactive.send","channel":"messenger","carriedBy":["messenger.interactive.send"],"tier":"platform_only","channels":{"imessage":"not_supported","whatsapp":"not_supported","telegram":"not_supported","discord":"not_supported","slack":"not_supported","messenger":"yes"},"refusal":{"code":"unsupported_command","reason":"not_on_channel"}}],"cellStateLabels":{"yes":"Yes","coming_soon":"Coming soon","not_supported":"Not supported"},"channels":[{"channel":"imessage","label":"iMessage","addressHint":"Use the full number with a plus sign and country code, such as +14155550123, or an Apple ID email. A ten-digit number is read as a US number.","addressKinds":["phone","email"],"messageRecipientKinds":{"live":["phone"],"test":["phone","email"]},"serviceWindowHours":null,"modes":[{"mode":null,"label":null,"capabilities":["message.send.text","message.send.media","message.send.sticker","message.send.rich_link","message.send.multipart","message.send.location_request","message.send.poll","message.send.app_card","app_card.update","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","reaction.tapback","name_photo.share","group.create","group.update","group.leave","handle_check","attachments","receipts","events.delivered","events.read","events.location","events.moderation","events.poll","events.chat_background"],"commandTypes":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave"]}],"sandbox":{"capabilities":["message.send.text","message.send.sticker","message.send.rich_link","message.send.multipart","message.send.location_request","message.send.poll","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","reaction.tapback","name_photo.share","handle_check","receipts","events.delivered","events.read","events.location","events.moderation","events.poll"],"commandTypes":["message.send","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","reaction.tapback","name_photo.share"]},"releaseState":"ga","offeredModes":[],"initiation":"none","receiptCeiling":"read","receiptCeilingByService":{"iMessage":"read","SMS":"sent","RCS":"sent"},"textLimit":{"max":65536,"unit":"utf8_bytes","advice":null},"setupMethods":[{"method":"operator","isDefault":true,"docsAnchor":"request-a-line","title":"Add an iMessage line","summary":"Ask for a line and we set it up for you.","youBring":[],"stepTemplates":["request"],"checkAnchors":["request-a-line"]}],"cells":{"message.send.text":"yes","message.send.media":"yes","message.send.sticker":"yes","message.send.rich_link":"yes","message.send.multipart":"yes","message.send.location_request":"yes","message.send.poll":"yes","message.send.app_card":"yes","app_card.update":"yes","reaction.set":"yes","reaction.remove":"yes","message.read":"yes","typing.start":"yes","message.edit":"yes","message.unsend":"yes","name_photo.get":"yes","name_photo.set":"yes","poll.vote":"yes","chat_background.set":"yes","chat_background.remove":"yes","reaction.tapback":"yes","name_photo.share":"yes","group.create":"yes","group.update":"yes","group.leave":"yes","whatsapp.template.send":"not_supported","whatsapp.interactive.send":"not_supported","whatsapp.location.send":"not_supported","whatsapp.contacts.send":"not_supported","whatsapp.group.create":"not_supported","handle_check":"yes","attachments":"yes","receipts":"yes","events.delivered":"yes","events.read":"yes","events.location":"yes","events.moderation":"yes","events.poll":"yes","events.chat_background":"yes","service_window":"not_supported","messenger.interactive.send":"not_supported"},"absent":{"whatsapp.template.send":{"state":"not_supported","reason":"iMessage has no such feature.","sourceUrl":null},"whatsapp.interactive.send":{"state":"not_supported","reason":"iMessage has no such feature.","sourceUrl":null},"whatsapp.location.send":{"state":"not_supported","reason":"iMessage has no such feature.","sourceUrl":null},"whatsapp.contacts.send":{"state":"not_supported","reason":"iMessage has no such feature.","sourceUrl":null},"whatsapp.group.create":{"state":"not_supported","reason":"iMessage has no such feature.","sourceUrl":null},"service_window":{"state":"not_supported","reason":"iMessage has no reply window. Your agent can write at any time.","sourceUrl":null},"messenger.interactive.send":{"state":"not_supported","reason":"iMessage has no such feature.","sourceUrl":null}},"policyNotes":[],"docsSlug":"imessage","releaseWord":"Available","lineNoun":"iMessage number","mainRule":"Your agent texts from a US number Mapier provides.","keywordOptOut":true,"conversationScope":{"scope":"direct_and_group","why":null},"platformNotes":[],"platformCheckedAt":null,"mediaLimit":{"deliveredBy":["link"],"mapierMaxBytes":8388608,"ceilingEnforcedAt":"request","platform":[],"captionMax":null},"featureCells":{"text":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":["text_limit"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"media_send":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":["caption","media"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"media_receive":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"reactions":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"typing":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"mark_read":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"edit":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":["edit_window"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"unsend":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":["edit_window"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"groups":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"stickers":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"rich_links":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"multipart":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"location_request":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"polls":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"app_cards":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"name_photo":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"chat_background":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"tapbacks":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"contact_card":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"templates":{"state":"not_supported","word":"Not supported by iMessage","note":"iMessage has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"buttons":{"state":"not_supported","word":"Not supported by iMessage","note":"iMessage has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"quick_replies":{"state":"not_supported","word":"Not supported by iMessage","note":"iMessage has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"location_send":{"state":"yes","word":"Works on iMessage","note":"Send an Apple Maps link as a link message. iMessage shows it as a map pin.","restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":"message.send.rich_link"},"contacts_send":{"state":"yes","word":"Works on iMessage","note":"Send a .vcf file as media. iMessage shows it as a contact card.","restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":"message.send.media"},"whatsapp_groups":{"state":"not_supported","word":"Not supported by iMessage","note":"iMessage has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"delivered":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":["receipt_ceiling.SMS","receipt_ceiling.RCS"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"read":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":["receipt_ceiling.SMS","receipt_ceiling.RCS"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"location_receive":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"moderation_receive":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"poll_receive":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"chat_background_receive":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"handle_check":{"state":"yes","word":"Works on iMessage","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null}},"restrictions":[{"id":"text_limit","kind":"text_limit","max":65536,"unit":"utf8_bytes","advice":null,"appliesTo":["text"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":null,"httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed"}},"text":{"short":"Up to 64 KB of text","long":"Text up to 65,536 bytes of UTF-8.","agent":"Keep `payload.text` within 65,536 bytes of UTF-8; longer is refused 422 `validation_failed` at `payload.text`."},"source":{"code":"MESSAGE_TEXT_MAX_BYTES"},"verified":true},{"id":"caption","kind":"caption","max":null,"appliesTo":["media_send"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":null,"httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed"}},"text":{"short":"No captions","long":"No captions. Send the text as its own message.","agent":"Leave out `payload.caption` and send the words as a text message; a caption is refused 422 `validation_failed`."},"source":{"code":"MEDIA_LIMITS.captionMax"},"verified":true},{"id":"media","kind":"media","deliveredBy":["link"],"mapierMaxBytes":8388608,"appliesTo":["media_send"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":"media_too_large","httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed.media_too_large"}},"text":{"short":"Files by https link","long":"Send files as an https link, up to 8 MB.","agent":"Put an https link in `payload.url`; Mapier fetches at most 8 MB."},"source":{"code":"MEDIA_LIMITS"},"verified":true},{"id":"edit_window","kind":"edit_window","editMs":900000,"unsendMs":120000,"appliesTo":["edit","unsend"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":"window_elapsed","httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed.window_elapsed"}},"text":{"short":"Edit within 15 min","long":"Edit within 15 minutes and unsend within 2 minutes of sending.","agent":"Send `message.edit` within 15 minutes and `message.unsend` within 2 minutes of the original; later is refused 422 `validation_failed` (`window_elapsed`)."},"source":{"code":"EDIT_WINDOWS"},"verified":true},{"id":"receipt_ceiling.SMS","kind":"receipt_ceiling","ceiling":"sent","service":"SMS","appliesTo":["delivered","read"],"enforcement":{"mode":"informational"},"text":{"short":"Sent as SMS","long":"Sent as SMS. The highest status it shows is Sent.","agent":"Treat `message.sent` as final when the message’s `deliveryService` is `SMS`."},"source":{"code":"REGISTRY.receiptCeilingByService"},"verified":true},{"id":"receipt_ceiling.RCS","kind":"receipt_ceiling","ceiling":"sent","service":"RCS","appliesTo":["delivered","read"],"enforcement":{"mode":"informational"},"text":{"short":"Sent as RCS","long":"Sent as RCS. The highest status it shows is Sent.","agent":"Treat `message.sent` as final when the message’s `deliveryService` is `RCS`."},"source":{"code":"REGISTRY.receiptCeilingByService"},"verified":true},{"id":"opt_out","kind":"opt_out","style":"keywords","words":["STOP","UNSUBSCRIBE","OPTOUT","CANCEL","END","QUIT"],"appliesTo":[],"enforcement":{"mode":"refused","refusal":{"code":"recipient_not_allowed","reason":"opted_out","httpStatus":403,"docUrl":"https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.opted_out"}},"text":{"short":"STOP opts out","long":"STOP, UNSUBSCRIBE, OPTOUT, CANCEL, END or QUIT in capitals, as the whole message, opts a person out.","agent":"A message that is exactly STOP, UNSUBSCRIBE, OPTOUT, CANCEL, END or QUIT opts the person out; later sends are refused 403 `recipient_not_allowed` (`opted_out`)."},"source":{"code":"OPT_OUT_KEYWORDS"},"verified":true}],"receiptText":{"ceiling":{"short":"Highest status: Read","long":"Highest status you’ll see: Read.","agent":"Treat `message.read` as final; iMessage reports no later status."},"byService":{"SMS":{"short":"Sent as SMS","long":"Sent as SMS. The highest status it shows is Sent.","agent":"Treat `message.sent` as final when the message’s `deliveryService` is `SMS`."},"RCS":{"short":"Sent as RCS","long":"Sent as RCS. The highest status it shows is Sent.","agent":"Treat `message.sent` as final when the message’s `deliveryService` is `RCS`."}}},"liveOnlyFeatures":["media_send","media_receive","reactions","groups","app_cards","contacts_send","chat_background_receive"]},{"channel":"whatsapp","label":"WhatsApp","addressHint":"Use the full number with a plus sign and country code, such as +14155550123. A number without a country code is rejected.","addressKinds":["phone","bsuid"],"messageRecipientKinds":{"live":["phone","bsuid"],"test":["phone","bsuid"]},"serviceWindowHours":24,"modes":[{"mode":"mapier_cloud","label":"Number from Mapier","capabilities":["message.send.text","message.send.media","message.send.sticker","message.send.rich_link","message.send.location_request","reaction.set","reaction.remove","message.read","typing.start","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","attachments","receipts","events.delivered","events.read","service_window"],"commandTypes":["message.send","reaction.set","reaction.remove","message.read","typing.start","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create"]},{"mode":"customer_cloud","label":"Your own account","capabilities":["message.send.text","message.send.media","message.send.sticker","message.send.rich_link","message.send.location_request","reaction.set","reaction.remove","message.read","typing.start","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","attachments","receipts","events.delivered","events.read","service_window"],"commandTypes":["message.send","reaction.set","reaction.remove","message.read","typing.start","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create"]},{"mode":"linked","label":"Linked device","capabilities":[],"commandTypes":[]}],"sandbox":{"capabilities":["message.send.text","message.send.media","message.send.sticker","message.send.rich_link","receipts","events.delivered","events.read","service_window"],"commandTypes":["message.send"]},"releaseState":"beta","offeredModes":["customer_cloud"],"initiation":"template","receiptCeiling":"read","receiptCeilingByService":null,"textLimit":{"max":4096,"unit":"chars","advice":null},"setupMethods":[{"method":"byo_meta_app","isDefault":true,"docsAnchor":"own-number","title":"Use a number you already have","summary":"A number in your own WhatsApp Business Account. You keep it if you leave.","youBring":["A Meta business portfolio","A Meta app made only for Mapier, with the use case \"Connect with customers through WhatsApp\"","A number on the Cloud API in your WhatsApp Business Account (App Dashboard → Use cases → Connect on WhatsApp → Customize → Step 2 Production setup → Register your WhatsApp phone number). Not in the WhatsApp Business phone app, and not a Mapier iMessage number.","A system user access token that never expires, with both WhatsApp permissions. Its system user must be assigned this app and your WhatsApp Business Account.","Your app published (App Dashboard → Publish), with a privacy policy URL in App settings → Basic","A payment method on your WhatsApp Business Account, for conversations your agent starts (templates). Replies to people who message you are free."],"stepTemplates":["form","paste_back"],"checkAnchors":["own-number-check-credentials","own-number-check-webhook","own-number-check-platform_approval","own-number-check-policy_ack"]},{"method":"mapier_number","isDefault":false,"docsAnchor":"number-from-mapier","title":"Get a US number from Mapier","summary":"We buy a new US number and add it to your WhatsApp Business Account. Then we confirm it with Meta’s code.","youBring":["A Meta business portfolio","A WhatsApp Business Account in Business settings → Accounts → Messaging accounts. Not Meta’s Test account.","A Meta app made only for Mapier, with the use case \"Connect with customers through WhatsApp\"","A system user access token that never expires, with both WhatsApp permissions. Its system user must be assigned this app and your WhatsApp Business Account.","Your app published (App Dashboard → Publish), with a privacy policy URL in App settings → Basic","A payment method on your WhatsApp Business Account, for conversations your agent starts (templates). Replies to people who message you are free."],"stepTemplates":["form","paste_back"],"checkAnchors":["number-from-mapier-check-credentials","number-from-mapier-check-webhook","number-from-mapier-check-platform_approval","number-from-mapier-check-policy_ack"]}],"cells":{"message.send.text":"yes","message.send.media":"yes","message.send.sticker":"yes","message.send.rich_link":"yes","message.send.multipart":"not_supported","message.send.location_request":"yes","message.send.poll":"not_supported","message.send.app_card":"not_supported","app_card.update":"not_supported","reaction.set":"yes","reaction.remove":"yes","message.read":"yes","typing.start":"yes","message.edit":"not_supported","message.unsend":"not_supported","name_photo.get":"not_supported","name_photo.set":"not_supported","poll.vote":"not_supported","chat_background.set":"not_supported","chat_background.remove":"not_supported","reaction.tapback":"not_supported","name_photo.share":"not_supported","group.create":"not_supported","group.update":"not_supported","group.leave":"not_supported","whatsapp.template.send":"yes","whatsapp.interactive.send":"yes","whatsapp.location.send":"yes","whatsapp.contacts.send":"yes","whatsapp.group.create":"coming_soon","handle_check":"not_supported","attachments":"yes","receipts":"yes","events.delivered":"yes","events.read":"yes","events.location":"not_supported","events.moderation":"not_supported","events.poll":"not_supported","events.chat_background":"not_supported","service_window":"yes","messenger.interactive.send":"not_supported"},"absent":{"message.send.multipart":{"state":"not_supported","reason":"WhatsApp carries one photo or file per message, with an optional caption.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"message.send.poll":{"state":"not_supported","reason":"WhatsApp business accounts cannot send polls.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"message.send.app_card":{"state":"not_supported","reason":"iMessage app cards exist only on iMessage.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"app_card.update":{"state":"not_supported","reason":"iMessage app cards exist only on iMessage.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"message.edit":{"state":"not_supported","reason":"WhatsApp does not let a business edit a message it sent.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"message.unsend":{"state":"not_supported","reason":"WhatsApp does not let a business take back a message it sent.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"name_photo.get":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null},"name_photo.set":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null},"poll.vote":{"state":"not_supported","reason":"WhatsApp business accounts cannot vote in polls.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages"},"chat_background.set":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null},"chat_background.remove":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null},"reaction.tapback":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null},"name_photo.share":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null},"group.create":{"state":"not_supported","reason":"WhatsApp groups use their own command, whatsapp.group.create, which is coming soon.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/groups"},"group.update":{"state":"not_supported","reason":"WhatsApp groups use their own command, whatsapp.group.create, which is coming soon.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/groups"},"group.leave":{"state":"not_supported","reason":"WhatsApp groups use their own command, whatsapp.group.create, which is coming soon.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/groups"},"whatsapp.group.create":{"state":"coming_soon","reason":"This needs a number Meta has made an Official Business Account.","sourceUrl":null},"handle_check":{"state":"not_supported","reason":"WhatsApp does not let a business check whether a number uses WhatsApp before writing to it.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes"},"events.location":{"state":"not_supported","reason":"WhatsApp does not tell a business when someone shares their live location.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/location"},"events.moderation":{"state":"not_supported","reason":"WhatsApp does not tell a business when someone edits or deletes a message.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/unsupported"},"events.poll":{"state":"not_supported","reason":"WhatsApp business accounts do not receive polls or votes.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/unsupported"},"events.chat_background":{"state":"not_supported","reason":"WhatsApp does not tell a business when someone changes a chat’s wallpaper.","sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages"},"messenger.interactive.send":{"state":"not_supported","reason":"WhatsApp has no such feature.","sourceUrl":null}},"policyNotes":["WhatsApp lines are for your own business’s agent, not a general-purpose AI assistant.","Groups need a number Meta has made an Official Business Account. People join by invite link, and a group holds at most 8 members."],"docsSlug":"whatsapp","releaseWord":"Beta","lineNoun":"WhatsApp number","mainRule":"Connect a WhatsApp Business number you own, or get one from Mapier.","keywordOptOut":true,"conversationScope":{"scope":"direct","why":"coming_soon"},"platformNotes":[],"platformCheckedAt":null,"mediaLimit":{"deliveredBy":["link"],"mapierMaxBytes":null,"ceilingEnforcedAt":null,"platform":[{"kind":"image","maxBytes":5242880,"types":["image/jpeg","image/png"],"sourceUrl":"https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types","verified":false},{"kind":"video","maxBytes":16777216,"types":["video/mp4","video/3gpp"],"sourceUrl":"https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types","verified":false},{"kind":"audio","maxBytes":16777216,"types":["audio/aac","audio/mp4","audio/mpeg","audio/ogg"],"sourceUrl":"https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types","verified":false},{"kind":"file","maxBytes":104857600,"types":[],"sourceUrl":"https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types","verified":false}],"captionMax":1024},"featureCells":{"text":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window","text_limit"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"media_send":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window","caption","media"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"media_receive":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"reactions":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"typing":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"mark_read":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"edit":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp does not let a business edit a message it sent.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages","via":null},"unsend":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp does not let a business take back a message it sent.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages","via":null},"groups":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp groups use their own command, whatsapp.group.create, which is coming soon.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/groups","via":null},"stickers":{"state":"yes","word":"Works on WhatsApp","note":"A WebP image by link: 512×512, up to 100 KB static or 500 KB animated.","restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"rich_links":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"multipart":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp carries one photo or file per message, with an optional caption.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages","via":null},"location_request":{"state":"yes","word":"Works on WhatsApp","note":"WhatsApp asks with a one-tap Send location button, in a one-to-one chat only.","restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"polls":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp business accounts cannot send polls.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages","via":null},"app_cards":{"state":"not_supported","word":"Not supported by WhatsApp","note":"iMessage app cards exist only on iMessage.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/send-messages","via":null},"name_photo":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"chat_background":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"tapbacks":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"contact_card":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"templates":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"buttons":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window","interactive_bounds.whatsapp.interactive.send"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"quick_replies":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp has no such feature.","restrictionIds":[],"ifYouTry":{"code":"unsupported_command","reason":"not_on_channel","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_channel"},"liveOnly":false,"sourceUrl":null,"via":null},"location_send":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"contacts_send":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":["service_window"],"ifYouTry":null,"liveOnly":true,"sourceUrl":null,"via":null},"whatsapp_groups":{"state":"coming_soon","word":"Coming soon on WhatsApp","note":"This needs a number Meta has made an Official Business Account.","restrictionIds":["service_window"],"ifYouTry":{"code":"unsupported_command","reason":"not_on_line","httpStatus":404,"docUrl":"https://docs.mapier.ai/convo/api/errors#unsupported_command.not_on_line"},"liveOnly":false,"sourceUrl":null,"via":null},"delivered":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"read":{"state":"yes","word":"Works on WhatsApp","note":null,"restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":null,"via":null},"location_receive":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp does not tell a business when someone shares their live location.","restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/location","via":null},"moderation_receive":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp does not tell a business when someone edits or deletes a message.","restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/unsupported","via":null},"poll_receive":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp business accounts do not receive polls or votes.","restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/unsupported","via":null},"chat_background_receive":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp does not tell a business when someone changes a chat’s wallpaper.","restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages","via":null},"handle_check":{"state":"not_supported","word":"Not supported by WhatsApp","note":"WhatsApp does not let a business check whether a number uses WhatsApp before writing to it.","restrictionIds":[],"ifYouTry":null,"liveOnly":false,"sourceUrl":"https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes","via":null}},"restrictions":[{"id":"service_window","kind":"service_window","hours":24,"opener":"whatsapp.template.send","appliesTo":["text","media_send","reactions","typing","mark_read","stickers","rich_links","location_request","buttons","location_send","contacts_send","whatsapp_groups"],"enforcement":{"mode":"refused","refusal":{"code":"recipient_not_allowed","reason":"outside_service_window","httpStatus":403,"docUrl":"https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.outside_service_window"}},"text":{"short":"Reply window: 24 hours","long":"Reply within 24 hours of their last message. After that, send an approved template.","agent":"Outside 24 hours of the person’s last message, send `whatsapp.template.send`; anything else is refused 403 `recipient_not_allowed` (`outside_service_window`)."},"source":{"code":"serviceWindowHours"},"verified":true},{"id":"direct_only","kind":"direct_only","why":"coming_soon","appliesTo":[],"enforcement":{"mode":"informational"},"text":{"short":"Direct messages only","long":"Direct messages only for now.","agent":"Talk to people in direct messages; group conversations do not reach the API yet."},"source":{"code":"REGISTRY.conversationScope"},"verified":true},{"id":"text_limit","kind":"text_limit","max":4096,"unit":"chars","advice":null,"appliesTo":["text"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":null,"httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed"}},"text":{"short":"Up to 4,096 characters","long":"Text up to 4,096 characters.","agent":"Keep `payload.text` within 4,096 characters; longer is refused 422 `validation_failed` at `payload.text`."},"source":{"code":"MESSAGE_TEXT_MAX"},"verified":true},{"id":"caption","kind":"caption","max":1024,"appliesTo":["media_send"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":null,"httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed"}},"text":{"short":"Captions up to 1,024 characters","long":"A file can carry a caption of up to 1,024 characters.","agent":"Keep `payload.caption` within 1,024 characters; longer is refused 422 `validation_failed`."},"source":{"code":"MEDIA_LIMITS.captionMax"},"verified":true},{"id":"media","kind":"media","deliveredBy":["link"],"mapierMaxBytes":null,"appliesTo":["media_send"],"enforcement":{"mode":"advisory"},"text":{"short":"Files by https link","long":"Send files as a public https link. WhatsApp fetches it.","agent":"Put a public https link in `payload.url`; WhatsApp downloads it, and its own size limits apply."},"source":{"code":"MEDIA_LIMITS"},"verified":true},{"id":"interactive_bounds.whatsapp.interactive.send","kind":"interactive_bounds","commandType":"whatsapp.interactive.send","buttonsMax":3,"rowsMax":10,"quickRepliesMax":null,"appliesTo":["buttons"],"enforcement":{"mode":"refused","refusal":{"code":"validation_failed","reason":null,"httpStatus":422,"docUrl":"https://docs.mapier.ai/convo/api/errors#validation_failed"}},"text":{"short":"Up to 3 buttons","long":"Up to 3 buttons, or a list of up to 10 rows.","agent":"Send at most 3 buttons or 10 list rows in `whatsapp.interactive.send`; more is refused 422 `validation_failed` at the field."},"source":{"code":"INTERACTIVE_BOUNDS"},"verified":true},{"id":"opt_out","kind":"opt_out","style":"keywords","words":["STOP","UNSUBSCRIBE","OPTOUT","CANCEL","END","QUIT"],"appliesTo":[],"enforcement":{"mode":"refused","refusal":{"code":"recipient_not_allowed","reason":"opted_out","httpStatus":403,"docUrl":"https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.opted_out"}},"text":{"short":"STOP opts out","long":"STOP, UNSUBSCRIBE, OPTOUT, CANCEL, END or QUIT in capitals, as the whole message, opts a person out.","agent":"A message that is exactly STOP, UNSUBSCRIBE, OPTOUT, CANCEL, END or QUIT opts the person out; later sends are refused 403 `recipient_not_allowed` (`opted_out`)."},"source":{"code":"OPT_OUT_KEYWORDS"},"verified":true}],"receiptText":{"ceiling":{"short":"Highest status: Read","long":"Highest status you’ll see: Read.","agent":"Treat `message.read` as final; WhatsApp reports no later status."},"byService":{}},"liveOnlyFeatures":["media_receive","reactions","typing","mark_read","location_request","templates","buttons","location_send","contacts_send"]}],"words":{"cellStateSentences":{"yes":"Works on {label}","coming_soon":"Coming soon on {label}","not_supported":"Not supported by {label}"},"releaseStates":{"not_planned":"Not planned","planned":"Soon","private_beta":"Private beta","beta":"Beta","ga":"Available"},"direction":{"send":"Your agent can send","receive":"Your agent will receive"},"tiers":{"universal":"Every channel","shared_optional":"Some channels","platform_only":"Only on {label}"},"worksOn":"Works on: {labels}","notOn":"Not on: {labels}","docsBlocks":{"onlyHere":"Only on {label}","notEverywhere":"Works here, not everywhere","notHere":"Not available here"},"allChannels":"All channels","docsShortcuts":{"prefix":"Docs:","whatWorks":"What works","connect":"Setup guide","limits":"Limits","errorsAndFixes":"Errors and fixes"},"liveOnly":"Live only","highestStatus":"Highest status you’ll see","receipts":{"sent":"Sent","delivered":"Delivered","read":"Read"}},"features":[{"id":"text","label":"Text messages","direction":"send","capabilityIds":["message.send.text"],"commandTypes":["message.send"],"tier":"universal","onlyOn":null,"carriers":["imessage","whatsapp"]},{"id":"media_send","label":"Images and files","direction":"send","capabilityIds":["message.send.media"],"commandTypes":["message.send"],"tier":"universal","onlyOn":null,"carriers":["imessage","whatsapp"]}],"refusals":[{"code":"recipient_not_allowed","reason":"opted_out","httpStatus":403,"docUrl":"https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.opted_out"},{"code":"recipient_not_allowed","reason":"outside_service_window","httpStatus":403,"docUrl":"https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.outside_service_window"}]}}}}},"headers":{"Cache-Control":{"description":"Always `max-age=300`: the body may be reused for five minutes.","schema":{"type":"string"}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/line-setups":{"post":{"operationId":"createLineSetup","tags":["Lines"],"summary":"Start setting up a line","security":[{"apiKey":["lines:write"]},{"personalToken":["lines:write"]}],"description":"Starts adding a line on one channel, by one method: `key` is `<channel>/<method>`. The body takes only what is not secret. When the method needs secrets — a token, an app secret — the answer carries `handoffUrl`, a page where the person who holds the account pastes them; give them the link and do not ask them for the token. A body naming a secret's field (`appSecret`, `botToken`, `configToken`, `pageToken`, `signingSecret`, `token`) is a 422 at that field with `expected: \"handoff\"`. Nothing is bought, and no account is created, until the person finishes on that page. Follow the setup with `GET /v1/line-setups/{setupId}` or the `line.setup_changed` webhook; a line it binds is used for new contacts once the setup is `verified`, the console’s Line added. `handoffUrl` is in the answer that made it and in no other: a retry with the same `Idempotency-Key` answers the same setup with `handoffUrl: null`. Without a key, every request is a new setup. Test keys cannot set up lines: a test line comes from the Sandbox. A personal access token sets up lines in `live` too, and needs `lines:write` and the developer or admin role. A request for a dedicated iMessage line (`imessage/operator`) past the lines the organization pays for is a 409 `limit_reached` naming `purchasedLines`, and one while a payment has failed is a 409 `conflict` until it is paid; lines it already holds are never affected.","parameters":[{"in":"header","name":"idempotency-key","required":false,"description":"A key of your choosing. On a create, the same key from the same API key answers the setup it made the first time instead of making a second one; from a personal access token, the same key from the same token in the same project and environment. **Omit it and every create is a new setup**; the answer then carries `x-mapier-idempotency: none`. A re-check and a cancel do the same thing however often they are sent. A key is 1 to 200 characters, none of them a control character (U+0000–U+001F or U+007F), and no whitespace at either end; one outside that is a 422 `validation_failed` at `Idempotency-Key`, and a key is never trimmed: a trimmed key is a different key.","schema":{"type":"string","minLength":1,"maxLength":200},"example":"setup-slack-support-1"},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"The channel and method, and the non-secret details.","required":false,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","const":"imessage/operator"},"displayName":{"type":"string","minLength":1,"maxLength":80},"quantity":{"type":"integer","minimum":1,"maximum":5},"reason":{"type":"string","enum":["first_line","capacity","dedicated","region","other"]},"note":{"type":"string","maxLength":500},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"whatsapp/byo_meta_app"},"displayName":{"type":"string","minLength":1,"maxLength":80},"phoneNumberId":{"type":"string","pattern":"^[0-9]{1,32}$"},"wabaId":{"type":"string","pattern":"^[0-9]{1,32}$"},"metaAppId":{"type":"string","pattern":"^[0-9]{1,32}$"},"policyAck":{"type":"object","properties":{"useCase":{"type":"string","enum":["support","booking","notifications","other"]},"useCaseOther":{"type":"string","maxLength":200},"ownBusinessAgent":{"type":"boolean","const":true},"noModelTraining":{"type":"boolean","const":true}},"required":["ownBusinessAgent","noModelTraining"],"additionalProperties":false},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","phoneNumberId","wabaId","metaAppId","policyAck"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"whatsapp/mapier_number"},"displayName":{"type":"string","minLength":1,"maxLength":80},"wabaId":{"type":"string","pattern":"^[0-9]{1,32}$"},"metaAppId":{"type":"string","pattern":"^[0-9]{1,32}$"},"verifiedName":{"type":"string","minLength":1,"maxLength":512},"country":{"type":"string","enum":["US","GB"],"description":"Where the number is from: `US`, a local number in an area code, or `GB`, a UK mobile number. A UK number is not on for every organization yet."},"areaCode":{"description":"With `country` `US` only: the area code to look for a number in. Leave it out for any.","type":"string","pattern":"^[2-9][0-9]{2}$"},"policyAck":{"type":"object","properties":{"useCase":{"type":"string","enum":["support","booking","notifications","other"]},"useCaseOther":{"type":"string","maxLength":200},"ownBusinessAgent":{"type":"boolean","const":true},"noModelTraining":{"type":"boolean","const":true}},"required":["ownBusinessAgent","noModelTraining"],"additionalProperties":false},"costAck":{"type":"boolean","const":true},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","wabaId","metaAppId","verifiedName","country","policyAck","costAck"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"messenger/byo_meta_app"},"displayName":{"type":"string","minLength":1,"maxLength":80},"pageId":{"type":"string","pattern":"^[0-9]{1,32}$"},"metaAppId":{"type":"string","pattern":"^[0-9]{1,32}$"},"policyAck":{"type":"object","properties":{"discloseAutomation":{"type":"boolean","const":true},"respondWithin30s":{"type":"boolean","const":true}},"required":["discloseAutomation","respondWithin30s"],"additionalProperties":false},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key","pageId","metaAppId","policyAck"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"slack/manifest_api"},"displayName":{"type":"string","minLength":1,"maxLength":80},"appName":{"type":"string","minLength":1,"maxLength":35},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"slack/byo_token"},"displayName":{"type":"string","minLength":1,"maxLength":80},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"discord/byo_token"},"displayName":{"type":"string","minLength":1,"maxLength":80},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"telegram/managed_bot"},"displayName":{"type":"string","minLength":1,"maxLength":80},"suggestedName":{"type":"string","minLength":1,"maxLength":64},"suggestedUsername":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{3,28}bot$"},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","const":"telegram/byo_token"},"displayName":{"type":"string","minLength":1,"maxLength":80},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["key"],"additionalProperties":false}]},"example":{"key":"whatsapp/byo_meta_app","displayName":"Support","phoneNumberId":"106540352242922","wabaId":"102290129340398","metaAppId":"1234567890123456","policyAck":{"ownBusinessAgent":true,"noModelTraining":true}}}}},"responses":{"201":{"description":"The setup, with `handoffUrl` when a person has secrets to enter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LineSetup"},"example":{"id":"0192a7d0-7a8b-7c9d-8eaf-b0c1d2e3f405","channel":"whatsapp","method":"byo_meta_app","purpose":"connect","state":"awaiting_input","checks":{"credentials":{"state":"pending","detail":"Waiting for your details.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-credentials","fixUrl":null,"sub":null},"webhook":{"state":"pending","detail":"Waiting for messages from Meta to reach us.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-webhook","fixUrl":null,"sub":null},"platform_approval":{"state":"pending","detail":"Waiting for Meta to let this number send.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-platform_approval","fixUrl":null,"sub":null},"policy_ack":{"state":"ok","detail":"Rules accepted.","reason":null,"retryable":false,"checkedAt":"2026-10-18T17:02:11.000Z","docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-policy_ack","fixUrl":null,"sub":null},"inbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null},"outbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null}},"nextStep":null,"handoffUrl":"https://convo.mapier.ai/app/setup/hs_Q2hhbmdlTWVJbkFQcm9kdWN0aW9uS2V5MDEyMzQ1Njc4OWE","handoffExpiresAt":"2026-10-19T17:02:11.000Z","identity":null,"lineId":null,"number":null,"failureReason":null,"createdAt":"2026-10-18T17:02:11.000Z","updatedAt":"2026-10-18T17:02:11.000Z","expiresAt":"2026-10-19T17:02:11.000Z"}}},"headers":{"x-mapier-idempotency":{"description":"`none` when the request carried no `Idempotency-Key`: a key was minted for this request alone, so a retry of it is a new request. Absent when the request carried a key.","schema":{"type":"string","enum":["none"]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `channel_not_entitled`, `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["channel_not_entitled","forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","not_entitled","planned","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"With `outside_service_window`, `recipient_must_write_first`, `thread_not_owned` or `group_member_not_test_contact`: the channel whose rule it is. With `not_entitled` or `planned`: the channel your organization may not set up a line on yet."},"method":{"type":"string","description":"With `not_entitled`, when what is off is a setup method with a switch of its own beside its channel: `mapier_number` (a WhatsApp number from Mapier) or `managed_bot` (a Telegram bot managed by Mapier)."},"country":{"type":"string","enum":["US","GB"],"description":"With `not_entitled` and `method` `mapier_number`, when what is off is one country of a number from Mapier: `GB`, a UK number. A US number is offered wherever the method is."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `conflict`, `limit_reached`, `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict","limit_reached","project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `idempotency_key_reused`, `idempotency_key_failed` or `idempotency_key_unresolved`: the message an earlier send wrote under this `Idempotency-Key`. Read it before deciding to send again. With any other reason — a transport’s own refusal of this send, on `sendCommand`: the message THIS send wrote before the transport refused it, which the `message.failed` or `message.needs_reconcile` event for it names too. A transport that refuses a send with one of the first three words names no message here; a retry under the same key answers `idempotency_key_failed` or `idempotency_key_unresolved` with it."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"With `idempotency_key_failed` or `idempotency_key_unresolved`: the error code that message settled with — the transport’s refusal, or `gateway_response_lost` when nothing came back — or null for an attempt that died before any answer and has not been reconciled yet."},"failureClass":{"anyOf":[{"type":"string","enum":["target","content","capability","line","rate_limited","not_run","transport","unknown"]},{"type":"null"}],"description":"With `idempotency_key_failed`: the class of the first send’s refusal, from the closed set `command` frames carry — its `errorCode`, read with the reason the refusal carried where that reason and not the code says what to do, as the `message.failed` for the same refusal was. Null with `idempotency_key_unresolved`, whose outcome is unproven rather than failed."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"With a transport’s own reason, on a command it refused only for now and said how long: the seconds to wait before trying the command again."},"limit":{"type":"string","description":"Which limit was reached: on a send to a test line, `sharedLineSendsPerDay` or `sharedLineNonRepliesPerDay`; on a line setup, `purchasedLines`, the dedicated lines the organization pays for."},"maximum":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"That limit’s value. A test line’s two reset at 00:00 UTC; `purchasedLines` moves when the organization adds lines on its Billing page."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `transport_down` and `transport_unconfigured` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/line-setups/{setupId}":{"get":{"operationId":"getLineSetup","tags":["Lines"],"summary":"Read a line setup","security":[{"apiKey":["lines:write"]},{"personalToken":["lines:write"]}],"description":"The setup as it stands: its state, its six checks, the step a person must take next, and the line it bound. `verified` means the line is added — the console’s Line added — and takes new contacts; `failed` names its reason in `failureReason`. `handoffUrl` is always null here.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}},{"schema":{"type":"string"},"in":"path","name":"setupId","required":true}],"responses":{"200":{"description":"The setup.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LineSetup"},"example":{"id":"0192a7d0-7a8b-7c9d-8eaf-b0c1d2e3f405","channel":"whatsapp","method":"byo_meta_app","purpose":"connect","state":"awaiting_input","checks":{"credentials":{"state":"pending","detail":"Waiting for your details.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-credentials","fixUrl":null,"sub":null},"webhook":{"state":"pending","detail":"Waiting for messages from Meta to reach us.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-webhook","fixUrl":null,"sub":null},"platform_approval":{"state":"pending","detail":"Waiting for Meta to let this number send.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-platform_approval","fixUrl":null,"sub":null},"policy_ack":{"state":"ok","detail":"Rules accepted.","reason":null,"retryable":false,"checkedAt":"2026-10-18T17:02:11.000Z","docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-policy_ack","fixUrl":null,"sub":null},"inbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null},"outbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null}},"nextStep":null,"handoffUrl":null,"handoffExpiresAt":"2026-10-19T17:02:11.000Z","identity":null,"lineId":null,"number":null,"failureReason":null,"createdAt":"2026-10-18T17:02:11.000Z","updatedAt":"2026-10-18T17:02:11.000Z","expiresAt":"2026-10-19T17:02:11.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/line-setups/{setupId}/checks":{"post":{"operationId":"checkLineSetup","tags":["Lines"],"summary":"Run a line setup’s checks again","security":[{"apiKey":["lines:write"]},{"personalToken":["lines:write"]}],"description":"Asks the platform again for every check that can run now and answers the setup. Once per setup every ten seconds; sooner is a 429 with `retryAfter`.","parameters":[{"in":"header","name":"idempotency-key","required":false,"description":"A key of your choosing. On a create, the same key from the same API key answers the setup it made the first time instead of making a second one; from a personal access token, the same key from the same token in the same project and environment. **Omit it and every create is a new setup**; the answer then carries `x-mapier-idempotency: none`. A re-check and a cancel do the same thing however often they are sent. A key is 1 to 200 characters, none of them a control character (U+0000–U+001F or U+007F), and no whitespace at either end; one outside that is a 422 `validation_failed` at `Idempotency-Key`, and a key is never trimmed: a trimmed key is a different key.","schema":{"type":"string","minLength":1,"maxLength":200},"example":"setup-slack-support-1"},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}},{"schema":{"type":"string"},"in":"path","name":"setupId","required":true}],"responses":{"200":{"description":"The setup after the checks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LineSetup"},"example":{"id":"0192a7d0-7a8b-7c9d-8eaf-b0c1d2e3f405","channel":"whatsapp","method":"byo_meta_app","purpose":"connect","state":"awaiting_input","checks":{"credentials":{"state":"pending","detail":"Waiting for your details.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-credentials","fixUrl":null,"sub":null},"webhook":{"state":"pending","detail":"Waiting for messages from Meta to reach us.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-webhook","fixUrl":null,"sub":null},"platform_approval":{"state":"pending","detail":"Waiting for Meta to let this number send.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-platform_approval","fixUrl":null,"sub":null},"policy_ack":{"state":"ok","detail":"Rules accepted.","reason":null,"retryable":false,"checkedAt":"2026-10-18T17:02:11.000Z","docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-policy_ack","fixUrl":null,"sub":null},"inbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null},"outbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null}},"nextStep":null,"handoffUrl":null,"handoffExpiresAt":"2026-10-19T17:02:11.000Z","identity":null,"lineId":null,"number":null,"failureReason":null,"createdAt":"2026-10-18T17:02:11.000Z","updatedAt":"2026-10-18T17:02:11.000Z","expiresAt":"2026-10-19T17:02:11.000Z"}}},"headers":{"x-mapier-idempotency":{"description":"`none` when the request carried no `Idempotency-Key`: a key was minted for this request alone, so a retry of it is a new request. Absent when the request carried a key.","schema":{"type":"string","enum":["none"]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `conflict`, `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict","project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `idempotency_key_reused`, `idempotency_key_failed` or `idempotency_key_unresolved`: the message an earlier send wrote under this `Idempotency-Key`. Read it before deciding to send again. With any other reason — a transport’s own refusal of this send, on `sendCommand`: the message THIS send wrote before the transport refused it, which the `message.failed` or `message.needs_reconcile` event for it names too. A transport that refuses a send with one of the first three words names no message here; a retry under the same key answers `idempotency_key_failed` or `idempotency_key_unresolved` with it."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"With `idempotency_key_failed` or `idempotency_key_unresolved`: the error code that message settled with — the transport’s refusal, or `gateway_response_lost` when nothing came back — or null for an attempt that died before any answer and has not been reconciled yet."},"failureClass":{"anyOf":[{"type":"string","enum":["target","content","capability","line","rate_limited","not_run","transport","unknown"]},{"type":"null"}],"description":"With `idempotency_key_failed`: the class of the first send’s refusal, from the closed set `command` frames carry — its `errorCode`, read with the reason the refusal carried where that reason and not the code says what to do, as the `message.failed` for the same refusal was. Null with `idempotency_key_unresolved`, whose outcome is unproven rather than failed."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"With a transport’s own reason, on a command it refused only for now and said how long: the seconds to wait before trying the command again."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `transport_down` and `transport_unconfigured` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/line-setups/{setupId}/cancel":{"post":{"operationId":"cancelLineSetup","tags":["Lines"],"summary":"Cancel a line setup","security":[{"apiKey":["lines:write"]},{"personalToken":["lines:write"]}],"description":"Stops an open setup; its link stops working. A setup already closed answers as it is. A setup that bound its line is refused with a 409: disconnect the line instead.","parameters":[{"in":"header","name":"idempotency-key","required":false,"description":"A key of your choosing. On a create, the same key from the same API key answers the setup it made the first time instead of making a second one; from a personal access token, the same key from the same token in the same project and environment. **Omit it and every create is a new setup**; the answer then carries `x-mapier-idempotency: none`. A re-check and a cancel do the same thing however often they are sent. A key is 1 to 200 characters, none of them a control character (U+0000–U+001F or U+007F), and no whitespace at either end; one outside that is a 422 `validation_failed` at `Idempotency-Key`, and a key is never trimmed: a trimmed key is a different key.","schema":{"type":"string","minLength":1,"maxLength":200},"example":"setup-slack-support-1"},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}},{"schema":{"type":"string"},"in":"path","name":"setupId","required":true}],"responses":{"200":{"description":"The setup, cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LineSetup"},"example":{"id":"0192a7d0-7a8b-7c9d-8eaf-b0c1d2e3f405","channel":"whatsapp","method":"byo_meta_app","purpose":"connect","state":"cancelled","checks":{"credentials":{"state":"pending","detail":"Waiting for your details.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-credentials","fixUrl":null,"sub":null},"webhook":{"state":"pending","detail":"Waiting for messages from Meta to reach us.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-webhook","fixUrl":null,"sub":null},"platform_approval":{"state":"pending","detail":"Waiting for Meta to let this number send.","reason":null,"retryable":true,"checkedAt":null,"docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-platform_approval","fixUrl":null,"sub":null},"policy_ack":{"state":"ok","detail":"Rules accepted.","reason":null,"retryable":false,"checkedAt":"2026-10-18T17:02:11.000Z","docUrl":"https://docs.mapier.ai/convo/channels/whatsapp/connect#own-number-check-policy_ack","fixUrl":null,"sub":null},"inbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null},"outbound_proof":{"state":"n/a","detail":"Not needed.","reason":null,"retryable":false,"checkedAt":null,"docUrl":null,"fixUrl":null,"sub":null}},"nextStep":null,"handoffUrl":null,"handoffExpiresAt":"2026-10-19T17:02:11.000Z","identity":null,"lineId":null,"number":null,"failureReason":null,"createdAt":"2026-10-18T17:02:11.000Z","updatedAt":"2026-10-18T17:10:00.000Z","expiresAt":null}}},"headers":{"x-mapier-idempotency":{"description":"`none` when the request carried no `Idempotency-Key`: a key was minted for this request alone, so a retry of it is a new request. Absent when the request carried a key.","schema":{"type":"string","enum":["none"]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `conflict`, `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["conflict","project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/reachability":{"get":{"operationId":"getReachability","tags":["Project"],"summary":"Can this line reach this person now","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"Whether a message from this line would reach this person right now, and if not, why and what to do. It applies the same rules a send does, in the same order: the person is blocked, paused or opted out; the channel needs them to write first (Telegram, Messenger) and they have not written to this line (a message in a group the line is in does not count); the channel’s reply window (WhatsApp, Messenger) has shut on this line; another app holds the Messenger conversation. `reasons` lists every rule that stands, `canSend` sums them up — on WhatsApp `canSend.template` says whether an approved template would still go out — and `remedy` says what to do about the first. Each line keeps its own window and its own first message, so two lines on one channel can answer differently for one person. A refused send carries this same object at `details.reachability`. Nothing is sent and nothing is written. A person this project has never messaged is answered like anyone else: nothing written yet, no window open. A line this key cannot see — another project’s, or the other environment’s — is a 404, the same answer an id that never existed gets. Leave `lineId` out and name `channel` instead, and the answer is about the line a `message.send` naming no line would send from now — the line the person last wrote in on, else the one they are pinned to, else the one a first message would be handed — with nothing claimed; when no line can take them, the answer is the refusal that send would get. Add `registered=true` to also ask the channel live whether the address can receive, as `POST /v1/handle-check` does, on the line this answer is about: it needs `messages:send` and counts against that route’s budget, and the answer then carries `registered` and `registeredReason`.","parameters":[{"in":"query","name":"lineId","required":false,"description":"A line id this key can see — the `id` `GET /v1/whoami` lists under `lines`. Optional: when omitted, `channel` is required and the line is the one a `message.send` naming no line would take, and nothing is claimed.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"channel","required":false,"description":"The channel to ask on, when `lineId` is omitted. Beside a `lineId` it is not read: the line says its channel.","schema":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},{"in":"query","name":"to","required":false,"description":"The person’s address on that channel, written as a send’s `target.to` is. One of `to` and `recipient` is required; beside a `lineId`, `recipient` is read when both are sent.","schema":{"type":"string"}},{"in":"query","name":"recipient","required":false,"deprecated":true,"description":"Deprecated: use `to`. The same address, under its old name; it keeps working.","schema":{"type":"string"}},{"in":"query","name":"registered","required":false,"description":"`true` asks the channel live, as `POST /v1/handle-check` does, on the line this answer is about, and adds `registered` and `registeredReason`. Needs `messages:send`; counts against handle-check’s per-minute budget. Default `false`.","schema":{"type":"string","enum":["true","false"]}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: `capacity_exhausted` where an older version answers `no_line_capacity`, and under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"What this line may send this person now, and why not.","content":{"application/json":{"schema":{"type":"object","properties":{"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line asked about, as `GET /v1/whoami` lists it."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"That line’s channel."},"recipient":{"type":"string","deprecated":true,"description":"Deprecated: read `to` instead, which carries the same value; this field stays and is never removed. The person’s address on that channel, normalised."},"to":{"description":"The person’s address on that channel, normalised. `recipient` carries the same value; absent only on an answer from before the field.","type":"string"},"canSend":{"type":"object","properties":{"freeform":{"type":"boolean","description":"Whether an ordinary message — text, media — would be sent now."},"template":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether an approved WhatsApp template would be sent now. Null off WhatsApp."}},"required":["freeform","template"],"description":"What the line may send this person now."},"reasons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","deprecated":true,"description":"Deprecated: read `reason` instead, which carries the same value; this field stays and is never removed. The refusal reason."},"reason":{"description":"The refusal reason — `outside_service_window`, `opted_out` and so on. `code` carries the same value; absent only on an answer from before the field.","type":"string"},"docUrl":{"type":"string","format":"uri","description":"The errors page row for that reason."}},"required":["code","docUrl"]},"description":"Why a send would be refused, one entry per reason. Empty when nothing stands in the way."},"serviceWindow":{"type":"object","properties":{"applies":{"type":"boolean","description":"Whether this channel has a window at all — WhatsApp and Messenger do."},"expiresAt":{"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"}],"description":"When the window closes, or closed. Null when it does not apply or never opened."}},"required":["applies","expiresAt"],"description":"The channel’s window for ordinary messages after the person last wrote."},"initiation":{"type":"object","properties":{"required":{"type":"string","enum":["none","template","recipient_first","unknown"],"description":"Who must write first on this channel: `none`, `template` (an approved template opens the conversation), `recipient_first` (the person must write first) or `unknown`. New rules may be added."},"satisfied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether that has happened. Null when the channel cannot tell — Discord, for one."}},"required":["required","satisfied"],"description":"Whether this line may start the conversation."},"consent":{"type":"object","properties":{"optedOut":{"type":"boolean","description":"Whether the person is opted out. An opt-out applies on every channel."},"scope":{"type":"string","const":"person","description":"Always `person`: an opt-out covers the person, not one address."}},"required":["optedOut","scope"],"description":"The person’s opt-out."},"remedy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"What to do next, as data: a command `type` to send instead, or an `action` — `connect_line`, `wait_for_recipient`, `set_option`, `shorten` or `use_line`. New actions may be added; skip one you do not recognise."},{"type":"null"}],"description":"What to do next when a send would be refused. Null when nothing stands in the way, or nothing helps."},"evidenceAt":{"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"}],"description":"When the newest fact this answer rests on was recorded — the person’s last message. Null if none."},"registered":{"description":"Present only when `registered=true` was asked. Whether the channel believes this address can receive, asked live on this line as `POST /v1/handle-check` asks it. **Null is not false**: it means this transport cannot answer the question synchronously, which is the honest answer for WhatsApp — the Cloud API has no reachability probe, and a number is only known to be reachable once a message to it is accepted. Always null on Messenger, Discord, Telegram and Slack, which have no probe to ask, with `registeredReason` `unverified`.","anyOf":[{"type":"boolean"},{"type":"null"}]},"registeredReason":{"description":"Present only when `registered=true` was asked. Why not, when `registered` is false, or why the transport could not say, when it is null. Usually null when the address can receive, but a transport may add a caveat to a yes — `marketing_opt_out` on WhatsApp — so a reason is not by itself a no: `registered` is the answer, and this is what rides beside it.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["lineId","channel","recipient","canSend","reasons","serviceWindow","initiation","consent","remedy","evidenceAt"]},"example":{"lineId":"0192a7b1-5b6c-7d7e-9f80-a1b2c3d4e5f6","channel":"whatsapp","recipient":"+447700900456","canSend":{"freeform":false,"template":true},"reasons":[{"code":"outside_service_window","reason":"outside_service_window","docUrl":"https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.outside_service_window"}],"serviceWindow":{"applies":true,"expiresAt":"2026-10-17T09:30:00.000Z"},"initiation":{"required":"template","satisfied":false},"consent":{"optedOut":false,"scope":"person"},"remedy":{"type":"whatsapp.template.send"},"evidenceAt":"2026-10-16T09:30:00.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `capacity_exhausted`, `line_unavailable`, `no_line`, `no_line_capacity`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["capacity_exhausted","line_unavailable","no_line","no_line_capacity","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `all_lines_full`, `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/lines/{lineId}/templates":{"get":{"operationId":"listLineTemplates","tags":["Lines"],"summary":"List a WhatsApp line’s templates","security":[{"apiKey":["messages:read"]},{"personalToken":["messages:read"]}],"description":"The message templates of the WhatsApp Business Account behind a WhatsApp line, as Meta lists them: name, language, status, category and how many parameters each takes. Only an `APPROVED` template can be sent with `whatsapp.template.send`, and you need one to message someone who has not written to you in the last 24 hours. `status` and `category` are Meta’s own words and open: treat a status you do not know as not usable yet. Create and edit templates in WhatsApp Manager; the list follows within minutes. A test line lists none. A line of another channel is a 404 `unsupported_command` with `reason: \"not_on_channel\"`; a line this key cannot see is a 404 `not_found`.","parameters":[{"in":"path","name":"lineId","required":true,"description":"A WhatsApp line id this key can see — the `id` `GET /v1/whoami` lists under `lines`.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. From `2026-10-15`, a refusal speaks the transport-neutral vocabulary: under `line_unavailable` the reasons `transport_down`, `transport_unconfigured` and `line_retired` where an older version answers `relay_down`, `relay_unconfigured` and `line_released`. Same status, same remedy; you receive one word of each pair, never both. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The line’s templates, possibly none.","content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"language":{"type":"string","minLength":1,"maxLength":32},"status":{"type":"string","pattern":"^[A-Z][A-Z_]{0,63}$"},"category":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z_]{0,63}$"},{"type":"null"}]},"paramCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","language","status","category","paramCount"]}}},"required":["templates"]},"example":{"templates":[{"name":"booking_reminder","language":"en_GB","status":"APPROVED","category":"UTILITY","paramCount":1}]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `missing_header` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`, `unsupported_command`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found","unsupported_command"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `not_on_channel` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"With `not_on_channel`: the channel of the line the command was aimed at, which carries no such command on any line. With `not_on_line`: that line’s channel, which does."},"capability":{"type":"string","description":"With `not_on_channel` or `not_on_line`: the capability the command needs and that channel, or that line, lacks."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `not_on_line`: the line that cannot carry the command."},"alternatives":{"type":"array","items":{"type":"string"},"description":"With `not_on_channel` or `not_on_line`: capabilities the line does carry that come close. Empty when none does."},"remedy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}],"description":"With `not_on_channel` or `not_on_line`: what to do next — another command, an option, or a line that carries it."},"use":{"type":"string","description":"With `command_retired`, when the transport names a successor: the command type to send instead. Always one of the published command types."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. This platform mints none of its own here: the value is always the channel’s own token, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds to wait before trying again, when the refusal can say: the open-stream cap puts it here, so does an `error_budget` hold (about ten minutes), so does an app card over its hourly update cap (`card_update_limit`), and so may a transport’s own rate limit. A refusal that names it here repeats it in the `retry-after` header. This platform’s per-route request quotas put it in that header alone."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `line_unavailable`, `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["line_unavailable","service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Which refusal this is. Switch on `reason` to pick the remedy.","type":"object","properties":{"reason":{"type":"string","description":"Why this was refused. The values this platform mints are `channel_not_available`, `line_paused`, `line_released`, `line_retired`, `media_not_staged`, `network`, `redirect`, `relay_down`, `relay_unconfigured`, `sandbox_world_missing`, `status_5xx`, `timeout`, `transport_down`, `transport_unconfigured`, `unexpected_status` and `unspecified` — but the channel may supply its own token instead, so treat this as an OPEN string and fall back to `code` for anything you do not recognise."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_paused`, or with `line_released` (`line_retired` at `2026-10-15` or later): the line that cannot send. Your Lines page names it."},"conversationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With `line_released` on a thread (`line_retired` at `2026-10-15` or later): the conversation whose line has gone, so nothing more can be sent into it. Start a new one with the recipient instead."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."},"statusReason":{"type":"string","description":"With `line_paused`: why the line is paused — `token_revoked` when the platform stopped accepting its credentials, for one. The `message` says how to fix it. New reasons may be added."},"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/projects":{"get":{"operationId":"listProjects","tags":["Organization"],"summary":"List projects","security":[{"personalToken":["projects:read"]}],"description":"The projects of your organization this personal access token reaches: the ones it was made for that you can still open, or — for a token made for all projects — every project you can open now. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The projects, oldest first.","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The project’s id."},"slug":{"type":"string","description":"The project’s slug, as the console’s address for it spells it."},"name":{"type":"string","description":"The project’s name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the project is for, when somebody wrote it down."},"archivedAt":{"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"}],"description":"When the project was archived, or null. An archived project’s keys stop working until it is restored."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When the project was created."}},"required":["id","slug","name","description","archivedAt","createdAt"]},"description":"Oldest first. The projects of the token’s organization this token reaches: those it was made for that its owner can still open, or — for a token made for all projects — every project its owner can open now."}},"required":["projects"]},"example":{"projects":[{"id":"0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b","slug":"support-bot","name":"Support bot","description":null,"archivedAt":null,"createdAt":"2026-09-02T14:05:00.000Z"}]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/projects/{projectId}":{"get":{"operationId":"getProject","tags":["Organization"],"summary":"Read a project","security":[{"personalToken":["projects:read"]}],"description":"One project this personal access token reaches. A project it does not — another organization’s, one you cannot open, or one a token made for chosen projects was not made for — is a 404, the same answer an id that never existed gets. A personal access token only.","parameters":[{"in":"path","name":"projectId","required":true,"description":"A project id, as `GET /v1/projects` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The project.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The project’s id."},"slug":{"type":"string","description":"The project’s slug, as the console’s address for it spells it."},"name":{"type":"string","description":"The project’s name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the project is for, when somebody wrote it down."},"archivedAt":{"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"}],"description":"When the project was archived, or null. An archived project’s keys stop working until it is restored."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When the project was created."}},"required":["id","slug","name","description","archivedAt","createdAt"]},"example":{"id":"0192a7b0-1c2d-7e3f-8a4b-5c6d7e8f9a0b","slug":"support-bot","name":"Support bot","description":null,"archivedAt":null,"createdAt":"2026-09-02T14:05:00.000Z"}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/members":{"get":{"operationId":"listMembers","tags":["Organization"],"summary":"List members","security":[{"personalToken":["members:read"]}],"description":"Everyone in your organization and their role in it now. `members:read` reads the whole organization, so only a token made for all projects can carry it. A personal access token only.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The members, earliest to join first.","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The person’s id, as `GET /v1/whoami` names a token’s owner."},"email":{"type":"string","description":"The address they sign in with."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their name, when their profile carries one."},"role":{"type":"string","enum":["member","developer","admin"],"description":"Their role in this organization now: `member`, `developer` or `admin`."},"joinedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When they joined this organization."}},"required":["userId","email","name","role","joinedAt"]},"description":"Earliest to join first, every member in one list."}},"required":["members"]},"example":{"members":[{"userId":"0192a7e0-1a2b-7c3d-8e4f-5a6b7c8d9e0f","email":"ada@example.com","name":"Ada Lovelace","role":"admin","joinedAt":"2026-09-01T10:00:00.000Z"}]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/audit-logs":{"get":{"operationId":"listAuditLogs","tags":["Organization"],"summary":"List audit log entries","security":[{"personalToken":["audit:read"]}],"description":"Your organization’s audit log, newest first: who did what, to what, and when. It needs `audit:read` on the token AND an admin’s role now — a token whose owner stopped being an admin is a 403 `forbidden` with `reason: \"role\"` until they are one again. Narrow it with `action` and `actorUserId`; page with `cursor`, passing each answer’s `nextCursor` back until it is null. A personal access token only.","parameters":[{"in":"query","name":"action","required":false,"description":"Only these actions, comma-separated: `project.created,personal_token.revoked`. An action the log does not record is a 422.","schema":{"type":"string"}},{"in":"query","name":"actorUserId","required":false,"description":"Only what this person did: a `userId` as `GET /v1/members` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the page before, to read the next, older page. Omit it for the newest page.","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","required":false,"description":"How many entries a page holds.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"One page of entries, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"auditLogs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The entry’s id. Ids sort in the order the entries were written."},"action":{"type":"string","description":"What happened, as a dotted word: `project.created`, `personal_token.revoked`."},"actor":{"type":"object","properties":{"userId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The person who did it, or null when nobody signed in did."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Their name, or their address when their profile has no name."},"apiKeyId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The project key that did it, when a key did."},"personalTokenId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}],"description":"The personal access token it was done through, when a person used one: `userId` is that person."}},"required":["userId","name","apiKeyId","personalTokenId"],"description":"Who did it."},"targetType":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The kind of thing it was done to: `project`, `member`, …"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Which one: an id or a slug, as the action records it."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"What the action recorded about itself."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it happened."}},"required":["id","action","actor","targetType","targetId","metadata","createdAt"]},"description":"Newest first. Empty when nothing matches, or past the last page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass it back as `cursor` for the next, older page. Null on the last page. Opaque: never build or parse one."}},"required":["auditLogs","nextCursor"]},"example":{"auditLogs":[{"id":"0192a7e1-2b3c-7d4e-9f50-6b7c8d9e0f1a","action":"project.created","actor":{"userId":"0192a7e0-1a2b-7c3d-8e4f-5a6b7c8d9e0f","name":"Ada Lovelace","apiKeyId":null,"personalTokenId":null},"targetType":"project","targetId":"support-bot","metadata":{},"createdAt":"2026-09-02T14:05:00.000Z"}],"nextCursor":null}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"summary":"List webhook endpoints","security":[{"personalToken":["webhooks:read"]}],"description":"Every webhook endpoint of the project in the call’s environment, newest first: five at most, so one list. The signing secret is never in it, only its first ten characters. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The endpoints, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"webhookEndpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The endpoint’s id."},"url":{"type":"string","description":"Where each event is POSTed. https in `live`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What it is for, when somebody wrote it down."},"eventTypes":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]},"description":"The event types it is sent. Nothing else reaches it."},"enabled":{"type":"boolean","description":"Whether it is sent anything. A disabled endpoint keeps its history."},"signingSecretPreview":{"type":"string","description":"The first ten characters of the signing secret: enough to tell two apart, not to sign with."},"previousSecretExpiresAt":{"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"}],"description":"After a rotation, when the previous secret stops being accepted; until then each delivery carries two `v1=` signatures. Null when no rotated-out secret is still in use."},"lastDeliveryAt":{"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"}],"description":"When it was last sent something, or null."},"lastDeliveryStatus":{"anyOf":[{"type":"string","enum":["pending","succeeded","failed","exhausted"]},{"type":"null"}],"description":"How that last attempt ended, or null."},"failingSince":{"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"}],"description":"When its current run of failed attempts began, or null when the last attempt succeeded."},"consecutiveFailures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many attempts in a row have failed. 0 after a success."},"autoDisabledAt":{"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"}],"description":"When Mapier switched it off because every attempt had failed for 72 hours, 10 or more in a row. Null otherwise, including when a person disabled it. Setting `enabled` to true clears it."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it last changed."}},"required":["id","url","description","eventTypes","enabled","signingSecretPreview","previousSecretExpiresAt","lastDeliveryAt","lastDeliveryStatus","failingSince","consecutiveFailures","autoDisabledAt","createdAt","updatedAt"]},"description":"Newest first: every endpoint of the project in the call’s environment, five at most."}},"required":["webhookEndpoints"]},"example":{"webhookEndpoints":[{"id":"0192a7f0-3c4d-7e5f-8a60-7c8d9e0f1a2b","url":"https://example.com/mapier/webhooks","description":"Support bot inbox","eventTypes":["message.received","message.failed"],"enabled":true,"signingSecretPreview":"whsec_exam","previousSecretExpiresAt":null,"lastDeliveryAt":null,"lastDeliveryStatus":null,"failingSince":null,"consecutiveFailures":0,"autoDisabledAt":null,"createdAt":"2026-09-02T14:10:00.000Z","updatedAt":"2026-09-02T14:10:00.000Z"}]}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}},"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"summary":"Create a webhook endpoint","security":[{"personalToken":["webhooks:write"]}],"description":"Adds an endpoint in the call’s project and environment and answers its signing secret, `signingSecret`, in this answer only: no request returns it again, so store it now. Sign-check each delivery with it. A `live` endpoint must be https; no URL may carry a username or password or point at a private address. A project holds five endpoints an environment; a sixth is a 409 `limit_reached`. Needs `webhooks:write` on the token and the developer or admin role. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"Where to send, and which events.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Where to POST each event: https in `live`, http or https in `test`. No username or password."},"description":{"description":"What it is for. Up to 500 characters.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"eventTypes":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]},"description":"The event types to send it, at least one."}},"required":["url","eventTypes"]},"example":{"url":"https://example.com/mapier/webhooks","description":"Support bot inbox","eventTypes":["message.received","message.failed"]}}}},"responses":{"201":{"description":"The endpoint, with its signing secret, once.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The endpoint’s id."},"url":{"type":"string","description":"Where each event is POSTed. https in `live`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What it is for, when somebody wrote it down."},"eventTypes":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]},"description":"The event types it is sent. Nothing else reaches it."},"enabled":{"type":"boolean","description":"Whether it is sent anything. A disabled endpoint keeps its history."},"signingSecretPreview":{"type":"string","description":"The first ten characters of the signing secret: enough to tell two apart, not to sign with."},"previousSecretExpiresAt":{"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"}],"description":"After a rotation, when the previous secret stops being accepted; until then each delivery carries two `v1=` signatures. Null when no rotated-out secret is still in use."},"lastDeliveryAt":{"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"}],"description":"When it was last sent something, or null."},"lastDeliveryStatus":{"anyOf":[{"type":"string","enum":["pending","succeeded","failed","exhausted"]},{"type":"null"}],"description":"How that last attempt ended, or null."},"failingSince":{"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"}],"description":"When its current run of failed attempts began, or null when the last attempt succeeded."},"consecutiveFailures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many attempts in a row have failed. 0 after a success."},"autoDisabledAt":{"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"}],"description":"When Mapier switched it off because every attempt had failed for 72 hours, 10 or more in a row. Null otherwise, including when a person disabled it. Setting `enabled` to true clears it."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it last changed."},"signingSecret":{"type":"string","description":"The signing secret, `whsec_` and 43 characters. In this answer only: no request returns it again. Rotating makes a new one."}},"required":["id","url","description","eventTypes","enabled","signingSecretPreview","previousSecretExpiresAt","lastDeliveryAt","lastDeliveryStatus","failingSince","consecutiveFailures","autoDisabledAt","createdAt","updatedAt","signingSecret"]},"example":{"id":"0192a7f0-3c4d-7e5f-8a60-7c8d9e0f1a2b","url":"https://example.com/mapier/webhooks","description":"Support bot inbox","eventTypes":["message.received","message.failed"],"enabled":true,"signingSecretPreview":"whsec_exam","previousSecretExpiresAt":null,"lastDeliveryAt":null,"lastDeliveryStatus":null,"failingSince":null,"consecutiveFailures":0,"autoDisabledAt":null,"createdAt":"2026-09-02T14:10:00.000Z","updatedAt":"2026-09-02T14:10:00.000Z","signingSecret":"whsec_example-not-a-real-secret"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `limit_reached`, `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["limit_reached","project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"limit":{"type":"string","description":"Which limit was reached: on a send to a test line, `sharedLineSendsPerDay` or `sharedLineNonRepliesPerDay`; on a line setup, `purchasedLines`, the dedicated lines the organization pays for."},"maximum":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"That limit’s value. A test line’s two reset at 00:00 UTC; `purchasedLines` moves when the organization adds lines on its Billing page."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints/{endpointId}":{"get":{"operationId":"getWebhookEndpoint","tags":["Webhooks"],"summary":"Read a webhook endpoint","security":[{"personalToken":["webhooks:read"]}],"description":"One endpoint, without its signing secret. A deleted one is a 404. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"endpointId","required":true,"description":"An endpoint id, as `GET /v1/webhook-endpoints` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The endpoint’s id."},"url":{"type":"string","description":"Where each event is POSTed. https in `live`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What it is for, when somebody wrote it down."},"eventTypes":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]},"description":"The event types it is sent. Nothing else reaches it."},"enabled":{"type":"boolean","description":"Whether it is sent anything. A disabled endpoint keeps its history."},"signingSecretPreview":{"type":"string","description":"The first ten characters of the signing secret: enough to tell two apart, not to sign with."},"previousSecretExpiresAt":{"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"}],"description":"After a rotation, when the previous secret stops being accepted; until then each delivery carries two `v1=` signatures. Null when no rotated-out secret is still in use."},"lastDeliveryAt":{"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"}],"description":"When it was last sent something, or null."},"lastDeliveryStatus":{"anyOf":[{"type":"string","enum":["pending","succeeded","failed","exhausted"]},{"type":"null"}],"description":"How that last attempt ended, or null."},"failingSince":{"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"}],"description":"When its current run of failed attempts began, or null when the last attempt succeeded."},"consecutiveFailures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many attempts in a row have failed. 0 after a success."},"autoDisabledAt":{"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"}],"description":"When Mapier switched it off because every attempt had failed for 72 hours, 10 or more in a row. Null otherwise, including when a person disabled it. Setting `enabled` to true clears it."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it last changed."}},"required":["id","url","description","eventTypes","enabled","signingSecretPreview","previousSecretExpiresAt","lastDeliveryAt","lastDeliveryStatus","failingSince","consecutiveFailures","autoDisabledAt","createdAt","updatedAt"]},"example":{"id":"0192a7f0-3c4d-7e5f-8a60-7c8d9e0f1a2b","url":"https://example.com/mapier/webhooks","description":"Support bot inbox","eventTypes":["message.received","message.failed"],"enabled":true,"signingSecretPreview":"whsec_exam","previousSecretExpiresAt":null,"lastDeliveryAt":null,"lastDeliveryStatus":null,"failingSince":null,"consecutiveFailures":0,"autoDisabledAt":null,"createdAt":"2026-09-02T14:10:00.000Z","updatedAt":"2026-09-02T14:10:00.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}},"patch":{"operationId":"updateWebhookEndpoint","tags":["Webhooks"],"summary":"Update a webhook endpoint","security":[{"personalToken":["webhooks:write"]}],"description":"Changes any of `url`, `description`, `eventTypes` and `enabled`, at least one; never the environment. A new URL is held to the endpoint’s own environment’s rules. `enabled: false` stops deliveries and keeps the endpoint and its history; `enabled: true` turns it back on, also after Mapier switched it off for failing, and clears `autoDisabledAt`. Needs `webhooks:write` on the token and the developer or admin role. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"endpointId","required":true,"description":"An endpoint id, as `GET /v1/webhook-endpoints` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"requestBody":{"description":"What to change.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Where to POST each event: https in `live`, http or https in `test`. No username or password."},"description":{"description":"What it is for. `null` clears it.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"eventTypes":{"description":"The event types.","minItems":1,"maxItems":28,"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]}},"enabled":{"description":"`false` stops deliveries and keeps the endpoint and its history. `true` turns it back on, also after Mapier switched it off for failing (`autoDisabledAt`), and starts a fresh count of failures.","type":"boolean"}}},"example":{"enabled":false}}}},"responses":{"200":{"description":"The endpoint, changed.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The endpoint’s id."},"url":{"type":"string","description":"Where each event is POSTed. https in `live`."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What it is for, when somebody wrote it down."},"eventTypes":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"]},"description":"The event types it is sent. Nothing else reaches it."},"enabled":{"type":"boolean","description":"Whether it is sent anything. A disabled endpoint keeps its history."},"signingSecretPreview":{"type":"string","description":"The first ten characters of the signing secret: enough to tell two apart, not to sign with."},"previousSecretExpiresAt":{"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"}],"description":"After a rotation, when the previous secret stops being accepted; until then each delivery carries two `v1=` signatures. Null when no rotated-out secret is still in use."},"lastDeliveryAt":{"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"}],"description":"When it was last sent something, or null."},"lastDeliveryStatus":{"anyOf":[{"type":"string","enum":["pending","succeeded","failed","exhausted"]},{"type":"null"}],"description":"How that last attempt ended, or null."},"failingSince":{"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"}],"description":"When its current run of failed attempts began, or null when the last attempt succeeded."},"consecutiveFailures":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many attempts in a row have failed. 0 after a success."},"autoDisabledAt":{"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"}],"description":"When Mapier switched it off because every attempt had failed for 72 hours, 10 or more in a row. Null otherwise, including when a person disabled it. Setting `enabled` to true clears it."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it was created."},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When it last changed."}},"required":["id","url","description","eventTypes","enabled","signingSecretPreview","previousSecretExpiresAt","lastDeliveryAt","lastDeliveryStatus","failingSince","consecutiveFailures","autoDisabledAt","createdAt","updatedAt"]},"example":{"id":"0192a7f0-3c4d-7e5f-8a60-7c8d9e0f1a2b","url":"https://example.com/mapier/webhooks","description":"Support bot inbox","eventTypes":["message.received","message.failed"],"enabled":false,"signingSecretPreview":"whsec_exam","previousSecretExpiresAt":null,"lastDeliveryAt":null,"lastDeliveryStatus":null,"failingSince":null,"consecutiveFailures":0,"autoDisabledAt":null,"createdAt":"2026-09-02T14:10:00.000Z","updatedAt":"2026-09-03T09:00:00.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"413":{"description":"`error.code` is one of: `payload_too_large`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["payload_too_large"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}},"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"summary":"Delete a webhook endpoint","security":[{"personalToken":["webhooks:write"]}],"description":"Stops sending to the endpoint and removes it from every list. Its delivery history is kept. Deleting it again is a 404. Needs `webhooks:write` on the token and the developer or admin role. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"endpointId","required":true,"description":"An endpoint id, as `GET /v1/webhook-endpoints` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"204":{"description":"Deleted. No body."},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints/{endpointId}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","tags":["Webhooks"],"summary":"Rotate a webhook signing secret","security":[{"personalToken":["webhooks:write"]}],"description":"Makes a new signing secret and answers it in this answer only. The previous one keeps working for 24 hours: until `previousSecretExpiresAt` each delivery carries two `v1=` signatures, one per secret, so a receiver can move to the new one at its own pace. Needs `webhooks:write` on the token and the developer or admin role. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"endpointId","required":true,"description":"An endpoint id, as `GET /v1/webhook-endpoints` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The new signing secret, once, and when the old one stops.","content":{"application/json":{"schema":{"type":"object","properties":{"signingSecret":{"type":"string","description":"The new signing secret. In this answer only: no request returns it again."},"signingSecretPreview":{"type":"string","description":"Its first ten characters, as the endpoint now shows them."},"previousSecretExpiresAt":{"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":"When the previous secret stops being accepted: 24 hours from now. Until then both sign each delivery."}},"required":["signingSecret","signingSecretPreview","previousSecretExpiresAt"]},"example":{"signingSecret":"whsec_example-not-a-real-secret","signingSecretPreview":"whsec_exam","previousSecretExpiresAt":"2026-09-04T09:00:00.000Z"}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/webhook-endpoints/{endpointId}/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Webhooks"],"summary":"List webhook deliveries","security":[{"personalToken":["webhooks:read"]}],"description":"Every attempt to deliver an event to one endpoint, newest first: one row per attempt, so a retried event shows each try. Page with `cursor`, passing each answer’s `nextCursor` back until it is null. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`. The project and environment are the call’s (`x-mapier-project`, and `x-mapier-environment`, `live` when not sent); an endpoint of another project or environment is a 404, the same answer an id that never existed gets.","parameters":[{"in":"path","name":"endpointId","required":true,"description":"An endpoint id, as `GET /v1/webhook-endpoints` lists it.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the page before, to read the next, older page. Omit it for the newest page.","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","required":false,"description":"How many attempts a page holds.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"One page of attempts, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The attempt’s id. Ids sort in the order the attempts were made."},"eventId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The event it carried, the `mapier-event-id` header the receiver saw."},"eventType":{"type":"string","enum":["message.received","message.sent","message.delivered","message.read","message.delivery_failed","message.failed","message.needs_reconcile","reaction.added","reaction.removed","conversation.created","conversation.updated","conversation.status_changed","line.provisioned","line.status_changed","line.setup_changed","line.gap","command.settled","location.share_started","location.updated","location.share_ended","message.edited","message.unsent","poll.created","poll.options_changed","poll.voted","poll.vote_cleared","contact.opt_out_changed","conversation.background_changed"],"description":"That event’s type."},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"1 for the first try, then 2, 3, … for each retry."},"status":{"type":"string","enum":["pending","succeeded","failed","exhausted"],"description":"Where the attempt stands."},"responseStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The receiver’s HTTP status, when it answered."},"responseBodySnippet":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The start of the receiver’s answer, at most 1 KiB, when it sent one."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the attempt failed, when it did not reach an answer."},"scheduledAt":{"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":"When the attempt was due."},"deliveredAt":{"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"}],"description":"When the receiver accepted it, or null."},"durationMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long the receiver took, in milliseconds."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When the attempt was recorded."}},"required":["id","eventId","eventType","attempt","status","responseStatus","responseBodySnippet","error","scheduledAt","deliveredAt","durationMs","createdAt"]},"description":"Newest first. Empty past the last page."},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass it back as `cursor` for the next, older page. Null on the last page. Opaque: never build or parse one."}},"required":["deliveries","nextCursor"]},"example":{"deliveries":[{"id":"0192a7f1-4d5e-7f60-9b71-8d9e0f1a2b3c","eventId":"0192a7f2-5e6f-7071-8c82-9e0f1a2b3c4d","eventType":"message.received","attempt":1,"status":"succeeded","responseStatus":200,"responseBodySnippet":"ok","error":null,"scheduledAt":"2026-09-02T14:12:00.000Z","deliveredAt":"2026-09-02T14:12:00.180Z","durationMs":180,"createdAt":"2026-09-02T14:12:00.000Z"}],"nextCursor":null}}}},"400":{"description":"`error.code` is one of: `bad_request`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["missing_header"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"messageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"With a transport’s refusal of a `sendCommand` send: the message the send wrote before the transport refused it — settled `failed`, or `needs_reconcile` when the refusal does not prove nothing was delivered — which the `message.failed` or `message.needs_reconcile` event for it names too, with `commandId: null`. Absent when the transport’s refusal carried no `details` of its own; the event is then the one place the id is carried."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`, `insufficient_scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden","insufficient_scope"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["environment","personal_token_required","role"],"description":"Which refusal this is. The set is closed: this platform mints all of them."},"scope":{"type":"string","description":"The scope this route needs — `messages:send`, `messages:read`, `lines:write` or `webhooks:write`. Create a key that includes it. On an operation that takes a personal access token, the token scope it names."},"keyScopes":{"type":"array","items":{"type":"string"},"description":"The scopes the key you sent holds."},"tokenScopes":{"type":"array","items":{"type":"string"},"description":"With a personal access token, in place of `keyScopes`: the scopes the token holds. Create a token that includes the one this route needs."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"404":{"description":"`error.code` is one of: `not_found`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}},"/v1/personal-tokens/current/revoke":{"post":{"operationId":"revokeCurrentPersonalToken","tags":["Sign-in"],"summary":"Sign out: revoke this token","security":[{"personalToken":[]}],"description":"Revokes the personal access token that makes the call, at once: what `convo logout` does while its access token is live. For a terminal sign-in it ends the sign-in, its refresh token with it; with only a refresh token left, `POST /v1/cli/tokens/revoke` does the same. Any live token may, with no scope. Recorded as revoked by its owner. A personal access token only: a project API key is a 403 `forbidden` with `reason: \"personal_token_required\"`.","parameters":[{"in":"header","name":"x-mapier-version","required":false,"description":"The `/v1` behaviour your integration is written against. Omit it and you get your PROJECT’s default: the newest version dated on or before the day the project’s first API key was created, test or live, revoked or not — `2026-09-01`, the oldest, for a project that had a key before any later version — so rotating a key or moving from a test key to a live one never changes it, and a project whose first key comes after a change has it without asking. An integration started on a project that already had keys gets that project’s older default, and one moved to a new project gets the new project’s: pin a version when you start, and before you move an integration. Nothing this operation does differs between the versions listed yet; the header is read on every route all the same. Any value not listed here is a 422 `validation_failed` whose entry names every version this build answers to in `supported`.","schema":{"type":"string","enum":["2026-09-01","2026-10-01","2026-10-15","2026-12-01"]}}],"responses":{"200":{"description":"The token, revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"tokenId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The token that called, now revoked."},"revokedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When."}},"required":["tokenId","revokedAt"]},"example":{"tokenId":"0192a7f3-6f70-7182-9d93-0f1a2b3c4d5e","revokedAt":"2026-09-03T09:00:00.000Z"}}}},"401":{"description":"`error.code` is one of: `invalid_credentials`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_credentials"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"403":{"description":"`error.code` is one of: `forbidden`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["forbidden"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Machine-readable detail, so a caller can pick the remedy without parsing `message`.","type":"object","properties":{"reason":{"type":"string","enum":["personal_token_required"],"description":"Which refusal this is. The set is closed: this platform mints all of them."}},"required":["reason"]},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"409":{"description":"`error.code` is one of: `project_archived`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["project_archived"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"422":{"description":"`error.code` is one of: `validation_failed`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"One entry per field that failed. Always an array when present, never an object.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field, dotted — `target.recipient`. Empty when the refusal names no field."},"message":{"type":"string","description":"What is wrong with it, as a sentence."},"reason":{"description":"A machine-readable token, when the transport supplied one — or `conversation_not_confirmed`, when a message of a kind only the channel’s conversation path carries, or a `typing.start`, `message.read`, `chat_background.set` or `chat_background.remove`, went into a conversation the transport has not yet confirmed is with that one person: for a conversation with one person, send them a text first; into a group chat, a kind a group does not take (a `location_request`) is refused with this reason too, and no text changes that — send it into a member’s own one-to-one conversation. On a `message.edit` or `message.unsend`, at `target.messageId`: `invalid_target` for a message that is not in the conversation or was not sent from this line, `not_yet_addressable` for one the transport has not given an id — still being sent, failed, or a rich link — and `window_elapsed` for one older than the window for that verb.","type":"string"},"channel":{"description":"On an address this platform cannot reach: the channel whose rules the address broke. On a payload key the line cannot carry — on `message.send` or a `whatsapp.*.send` — or a reply, an address, a group conversation or an unconfirmed conversation it cannot carry: the line’s channel. On the stream’s `?channel=` beside a `?conversationId=` on another channel: the channel that conversation is on.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]},"carries":{"description":"On a payload key the line cannot carry: every key it does carry for that command type, dotted — `text`, `platform.whatsapp.previewUrl` on `message.send`. A `url` or `caption` listed there is carried on a media send, with `kind: \"media\"`, and never beside a text.","type":"array","items":{"type":"string"}},"channels":{"description":"On a `target.channel` this project cannot infer: the channels its lines are on. Name one of them.","type":"array","items":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"supported":{"description":"On an unrecognised `x-mapier-version`: every version this build answers to. On an unrecognised `?events=` value on the stream: every value it frames. On an unrecognised `?channel=` on the stream: every channel.","type":"array","items":{"type":"string"}},"unknown":{"description":"On an unrecognised `?events=` or `?channel=` value on the stream, or an unrecognised `type` on `GET /v1/events`: each value it did not recognise.","type":"array","items":{"type":"string"}},"expected":{"description":"What the field wanted: an address kind — `phone`, `slack_user` — or a word such as `approved_template`. New values may be added.","type":"string"},"limit":{"description":"On a value over a channel’s limit: the limit — Discord takes 2,000 characters of text.","type":"object","properties":{"max":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The most the channel takes."},"unit":{"type":"string","enum":["utf8_bytes","chars","items","bytes"],"description":"What `max` counts: UTF-8 bytes, characters, list items or file bytes."}},"required":["max","unit"]},"remedy":{"description":"What to do about this field — `shorten` it, or set an option. Absent when there is nothing to add.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message.send","reaction.set","reaction.remove","message.read","typing.start","message.edit","message.unsend","name_photo.get","name_photo.set","poll.vote","chat_background.set","chat_background.remove","app_card.update","reaction.tapback","name_photo.share","group.create","group.update","group.leave","whatsapp.template.send","whatsapp.interactive.send","whatsapp.location.send","whatsapp.contacts.send","whatsapp.group.create","messenger.interactive.send"],"description":"Send this command type instead — `whatsapp.template.send` outside WhatsApp’s window."}},"required":["type"]},{"type":"object","properties":{"action":{"type":"string","const":"connect_line","description":"Connect a line on `channel`, then send again."},"channel":{"type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"],"description":"The channel to connect a line on."}},"required":["action","channel"]},{"type":"object","properties":{"action":{"type":"string","const":"wait_for_recipient","description":"Wait for the person to write first — Telegram’s `/start`, a first Messenger message."}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"set_option","description":"Send the same command again with this option set."},"option":{"type":"string","enum":["ifUnsupported","degrade"],"description":"The `options` key to set."},"value":{"type":"string","description":"The value to give it — `skip` or `adapt`."}},"required":["action","option","value"]},{"type":"object","properties":{"action":{"type":"string","const":"shorten","description":"Shorten the field at `path` to `max`, then send again."},"path":{"type":"string","description":"The field, dotted — `payload.text`."},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"The most the channel takes, in the unit of the entry’s `limit`."}},"required":["action","path","max"]},{"type":"object","properties":{"action":{"type":"string","const":"use_line","description":"Send on this line instead: it carries what this one cannot."},"lineId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"The line to name at `target.lineId`, as `GET /v1/whoami` lists it."},"channel":{"description":"That line’s channel.","type":"string","enum":["imessage","rcs","sms","whatsapp","voice","telegram","signal","apple_business","discord","slack","messenger"]}},"required":["action","lineId"]}]}},"required":["path","message"]}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"429":{"description":"`error.code` is one of: `rate_limited`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Absent on this response: none of its codes carries machine-readable detail."},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"500":{"description":"`error.code` is one of: `internal_error`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["internal_error"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support. Not every 500 carries it here; `error.requestId` carries the same value on every error."},"sentParts":{"type":"array","items":{"type":"object","properties":{"commandId":{"type":"string","description":"This part’s own command. It settles on its own, as any command does."},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Its place in the send, from `0`, in the order the parts went out."}},"required":["commandId","index"]},"description":"With a send that went out as several messages — a caption sent on its own — stopped at a later part: each part already sent, in order. The person has those. Whether the part this answer is about was sent is for the answer itself, and that part’s own `message.failed` or `message.needs_reconcile` event, to say. Absent when nothing was sent."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}},"503":{"description":"`error.code` is one of: `service_busy`, `upstream_unavailable`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["service_busy","upstream_unavailable"],"description":"One of the closed `ERROR_CODES` set."},"message":{"type":"string","description":"A sentence for a person. Never parse it; parse `code`."},"details":{"description":"Present when one of its fields applies. There is no `reason`: none of these codes has one.","type":"object","properties":{"retryAfter":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Seconds to wait before sending the same request again. The platform had no database connection free for this request within its own wait: the failure is ours, it clears on its own, and nothing the request asked for was done, so repeating it is safe. The `retry-after` header carries the same number."}}},"requestId":{"type":"string","description":"The id this request was logged under — the same value as the `x-request-id` response header, which you may also send yourself. Quote it to support."},"docUrl":{"type":"string","format":"uri","description":"The documentation for this refusal: `https://docs.mapier.ai/convo/api/errors#` followed by the code, exactly as `code` spells it in the version you asked for, then `.` and `details.reason` when the page has a row for that reason — `#recipient_not_allowed.opted_out`. A reason the page has no row for links the code alone."},"retryable":{"type":"boolean","description":"Whether sending the same request again can succeed: `true` for a rate limit, a busy service, a line whose connection is down for now, a send still in flight under the same `Idempotency-Key`, and an upstream failure before anything was sent. Wait first — `retryAfter` or the `retry-after` header says how long when known. `false` for everything else, including a send that may have gone out: fix the request, or read the message before sending again."}},"required":["code","message","requestId","docUrl","retryable"]}},"required":["error"]}}}}}}}},"x-mapier-refusal-reasons":{"recipient_not_allowed":["blocked","opted_out","paused","outside_service_window","recipient_must_write_first","thread_not_owned","recipient_blocked","app_card_needs_imessage","group_member_not_test_contact"],"line_not_allowed":["not_owned"],"no_line_capacity":["all_lines_full"],"capacity_exhausted":["all_lines_full"],"sandbox_budget_exhausted":["daily_budget"],"conflict":["idempotency_key_in_flight","idempotency_key_reused","idempotency_key_failed","idempotency_key_unresolved","no_command","number_on_mapier_line","card_update_in_flight"],"rate_limited":["too_many_streams","error_budget","shared_line","card_update_limit"],"unsupported_command":["not_on_channel","command_retired","not_on_line","shared_line"],"validation_failed":["conversation_not_confirmed","media_fetch_refused","media_fetch_failed","media_too_large","unsupported_media_type","invalid_target","not_yet_addressable","window_elapsed","card_not_updatable"],"upstream_unavailable":["network","redirect","status_5xx","timeout","unexpected_status","unspecified","media_not_staged"],"line_unavailable":["line_paused","line_released","relay_down","relay_unconfigured","channel_not_available","sandbox_world_missing","transport_down","transport_unconfigured","line_retired"],"channel_not_entitled":["not_entitled","planned"],"conversation_closed":["removed","deleted","archived","suspended"],"forbidden":["environment","personal_token_not_supported","personal_token_required","role"],"bad_request":["missing_header"]}}