Send a message
Send a message, such as an iMessage, with one POST. Text, files or another kind, to a person or a conversation
Sends one message on any channel. The result arrives later as an event.
Behavior
- Returns
202when accepted. The result arrives later as acommandevent on the stream, or acommand.settledwebhook. - A repeated
Idempotency-Keyreturns the first202, with"repeated": true. - 600 commands a minute per project. Rate limits lists every limit.
mediaholds one file, up to the size in Files. Several photos go as onemultipartmessage, on iMessage.- Every refusal below comes back at once, before anything is sent, except a first text the line
itself refuses (see Who gets it). A field the line cannot carry is
422 validation_failed. Nothing is dropped with a202.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer mp_live_…, your API key |
Content-Type | Yes | application/json |
Idempotency-Key | No, but always send one | Your id for this send, 1 to 200 characters |
x-mapier-version | No | The API version date, such as 2026-12-01 |
Without x-mapier-version, you get your project's default. Versions explains.
Body
| Field | Type | Required | Description |
|---|---|---|---|
target.conversationId | string (uuid) | In the conversation form | Send into this conversation, from its line |
target.recipientExternalId | string | In the recipient form | The person's address, in the form shown below. target.to is the same field |
target.channel | imessage or whatsapp | No | The channel the person is on, such as imessage |
target.lineId | string (uuid) | No | Send from this line |
target.replyToMessageId | string (uuid) | No | Quote this message, in its conversation |
payload.kind | text, media, sticker, multipart, location_request, poll, app_card, link, template, choices, location or contact | No | What to send, one of the kinds below |
options.degrade | strict or adapt | No | strict (default) or adapt to fit the channel |
With adapt, Mapier drops or splits what the channel cannot carry, and lists each change in
adaptations. A payload field the line does not carry, and that carries a value, is refused.
body is read as a second spelling of text, and a field set to null is skipped.
Who gets it
Use one of these. Lines explains how a line is picked.
| You have | Send |
|---|---|
| A conversation | target.conversationId |
| A message to quote | target.replyToMessageId |
| An address and a line to send from | target.lineId and target.to |
| An address and a channel | target.channel and target.to |
| An address only | target.to, if all your lines are on one channel |
target.to is also read as target.recipientExternalId, target.address, target.handle or
target.recipient. A conversation named at target.conversationId wins over an address.
On an iMessage line the conversation decides what a send can carry, not the target you name. Each conversation is on one of two paths:
- The conversation path: a conversation the person has written in, or a group chat. Every kind
goes, with
effectandsubjectbesidetext, and a reply named attarget.replyToMessageIdis quoted. If the line does not take the send within 30 seconds, its result isexpired. While the line is offline the send is refused at once with503 upstream_unavailable. While you have paused the line, the send is accepted and its result isexpired. - The recipient path: any other conversation, such as a first message to someone new. The
message is
textalone, with no effect, subject, quoted reply or file, at most 16,384 bytes. Its result can take up to five minutes. The line refuses a blank or longer text after Mapier has recorded the send, so send the fixed text under a new key. Send a text first; once the person answers, the conversation is on the conversation path.
What a conversation cannot carry is refused with 422 validation_failed before anything is sent.
Errors lists each refusal and the field it names.
Honors Idempotency-Key: a retry with the same key is never sent twice. If the answer to a first
message to someone new was lost, Mapier does not send it again: check the conversation, then send
it under a new key if it did not arrive.
Address forms
| Channel | target.to | Example |
|---|---|---|
| iMessage | Phone number with + and country code | +15550100100 |
| iMessage | Ten digits without +, read as a US number | 5550100100 |
| iMessage | Apple ID email, in an existing conversation only | jordan@example.com |
Phone number with + and country code | +15550100100 | |
| WhatsApp user ID from Meta, when there is no phone | US.Ab12 |
Kinds
kind | Fields | Guide |
|---|---|---|
text | text | Text |
media | url, optional caption | Images and files |
multipart | parts, each a text or a media url | Images and files |
sticker | url or emoji | Stickers |
link | url | Links |
location | latitude, longitude, optional name, address | Location |
location_request | nothing beside it | Location |
contact | contacts | Contact cards |
poll | question, options | Polls |
app_card | app, url, layout, optional interactive | App cards |
choices | interactive, or text with quickReplies or buttons | Buttons and lists |
template | name, language, components | Templates |
kind: "rich_link" is deprecated. Use kind: "link". A kind the line's channel does not carry
is 404 unsupported_command with reason: not_on_channel.
Channel support shows which kind works where.
Each kind in detail:
kind: "text", or no kind at all. effect, subject and textFormatting
are optional on the conversation path, and a 422 at payload.<key> on the
recipient path.
Prop
Type
{ "text": "hello" }{ "text": "You are in. See you Saturday.", "subject": "Saturday", "effect": "confetti" }A photo or file by link. On iMessage it goes on the conversation path alone. The guide is Images and files.
Prop
Type
{ "kind": "media", "url": "https://example.com/orders/4821/receipt.pdf" }What goes beside url:
- On iMessage nothing else goes beside it: a
captionis a422atpayload.caption, and aneffector asubjectat that key. - The media keys are checked for shape before the line is known —
urlorcaptionwithoutkind: "media", a link that is not https — so that422names the key and carries nochannel.
On WhatsApp a caption may go beside it, and anything else is a 422 at that key. WhatsApp
fetches the link itself.
When Mapier is busy:
- While your project, or Mapier, is already sending as many files as it can at once, the
send is
503 service_busywithretryAfter. - Neither that nor a refused link writes a message, so the same
Idempotency-Keymay be sent again. A503 upstream_unavailableafter the line was asked is different: the key is spent.
A picture sent in place of the text. The guide is Stickers.
- On iMessage: one emoji, or an image by https link, on its own as a bubble or stuck onto a message the person sent at a spot you choose on that bubble. It goes on the conversation path alone: into a conversation the person has written in, or a group chat. The fields, placement and refusals below are iMessage's.
On WhatsApp: a WebP image by link, on its own. A sticker on WhatsApp, below, has its rules.
Prop
Type
placement fields are plain JSON numbers, each optional, each rounded to 4
decimal places before it is checked; an omitted one keeps its default.
| Field | Default | Range | Meaning |
|---|---|---|---|
x, y | 0.5 | −5 to 6 | The sticker's center, as a fraction of the bubble from its top-left corner. Outside 0–1 hangs off the bubble. |
scale | 1 | 0.1 to 5 | Multiplier of the standard size, about 48 pt wide for an emoji. |
rotation | 0 | −180 to 180 | Degrees, positive clockwise. |
With no placement, the sticker lands dead center and covers a short message.
Pick a corner instead:
{
"kind": "sticker",
"emoji": "👍",
"attachToMessageExternalId": "5D1B7E0A-2F3C-4B8E-9A61-1C2D3E4F5A6B",
"placement": { "x": 0.95, "y": 0.1, "rotation": 12 }
}On iMessage these are refused with 422 validation_failed at the field named, before anything is
written:
emojithat is not exactly one emoji ("👍👍","👍 ", a word, a digit), atpayload.emoji. Nothing is trimmed.placementwithoutattachToMessageExternalId, aplacementvalue that is not a number or is out of range, or apartIndexoutside 0 to 64, at that field.- A reply,
target.replyToMessageId, besideattachToMessageExternalId. - Both
emojiandurl, or neither, or any of the keys withoutkind: "sticker", at that key. - An image link that is not a PNG, GIF or JPEG, is over 512,000 bytes or more than 618 px on a
side, at
payload.url. The file is fetched and checked, and nothing is sent. - A conversation on the recipient path, at
target.conversationIdor the recipient field you wrote, withreason: conversation_not_confirmed.
What the line can draw is not known in advance
A line that does not support emoji stickers (or placement, for a placed sticker, or replies on a
sticker, for a reply) sends nothing: the command is accepted with 202, and its result is
failed with capability_constraint_violation, failureClass: capability. It never falls back
to a centered or unplaced sticker. See Channel support.
A sticker on WhatsApp
A WhatsApp sticker is an image by link and nothing else. The sample below is a 512 × 512 static WebP you can send to try it:
{ "kind": "sticker", "url": "https://convo.mapier.ai/docs/samples/sticker.webp" }url: an https link of at most 2048 characters whose path ends 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 makes the send's result
failed. - A reply,
target.replyToMessageId, is allowed. - It goes to one person. Into a WhatsApp group it is a
422attarget.conversationId. - A missing
urlor one whose path does not end in.webp, and any other key (emoji,attachToMessageExternalId,partIndex,placement,caption,platform.whatsapp.previewUrl), are each a422at that field.
A sticker to a line on any other channel is 404 unsupported_command with
reason: not_on_channel.
A URL sent as a preview card the person's phone draws. On iMessage it goes on the conversation path alone. The guide is Links.
Prop
Type
{ "kind": "link", "url": "https://example.com/launch" }- Nothing else goes beside
url: another key is a422at that key. - A reply is
target.replyToMessageId, as on any send. - The result carries the link message's
externalId, as a text's does, so a later command (a reaction, a sticker stuck to it, a reply, an edit or an unsend) can name it. - A line that does not support links (or replies on one, for a reply) sends nothing:
202, thenfailedwithcapability_constraint_violation,failureClass: capability.
On WhatsApp a link goes out as a text whose body is the URL, and the person's WhatsApp draws a
preview of the page from its own preview tags. platform.whatsapp.previewUrl beside it is a 422
at that field, like any other: a link turns the preview on itself.
Text and photos as one message, in the order given — a caption over a photo, an album, or text and photos interleaved — on the conversation path alone. The guide is Images and files.
Prop
Type
{
"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" }
]
}- Every link is fetched and uploaded to the line before the message is sent, in order. One that
fails refuses the whole send at that part's
url, never a partial message. - Audio is not a part: iMessage sends it as a message of its own.
- A reply is
target.replyToMessageId, as on any send. - A line that does not support multipart sends nothing:
202, thenfailedwithcapability_constraint_violation,failureClass: capability. It never sends several separate messages instead.
Apple's "Share My Location?" card, asking the contact to share their location with the line. It goes on the conversation path alone, so only into a one-to-one conversation the person has written in. The guide is Location.
Prop
Type
{ "kind": "location_request" }- Nothing goes beside
kind: any other key, atextincluded, is422 validation_failedat that key before anything is written. - A reply is
target.replyToMessageId, as on any send. - A group chat, or a conversation the person has not written in, is a
422withreason: conversation_not_confirmed.
What comes back:
succeededmeans the card was sent, never that the person shared. If they tap Share, their location arrives later, apart from this command, as location events.- A line that does not support location requests (or replies on one, for a reply) sends nothing:
202, thenfailedwithcapability_constraint_violation(orcapability_not_negotiated),failureClass: capability.
A question with 2 to 12 choices that the people in the conversation tap to vote on. It goes on the conversation path alone. The guide is Polls.
Prop
Type
{ "kind": "poll", "question": "Lunch?", "options": ["Tacos", "Ramen", "Pho"] }- Nothing else goes beside
questionandoptions: any other key, atextincluded, is422 validation_failedat that key before anything is written. So is aquestionoroptionsbeside any other kind. - A reply is
target.replyToMessageId, as on any send. - Into a conversation on the recipient path it is a
422withreason: conversation_not_confirmed.
What comes back:
- The poll's own id and the ids its choices were given arrive as a
poll.createdwithactor: "line"on a stream opened with?events=polls: the idspoll.votenames. - The send's result carries the poll's id as
externalIdwhen the channel gives one. - A line that does not support polls sends nothing:
202, thenfailedwithcapability_constraint_violation(orcapability_not_negotiated),failureClass: capability.
A card from an iMessage app your organization holds, which the person's phone draws as that
app's card. Only an organization offered app cards can send one; for any other organization it
is 404 unsupported_command with reason: not_on_channel. On a test line on a shared number it
goes out as any message does, counted against that line's budgets. It goes on the conversation
path alone.
The guide is App cards.
Prop
Type
- Any other key is
422 validation_failedat that key before anything is written. - Someone other than your line must have written in the conversation (
403,recipient_must_write_first), and its newest message must have gone by iMessage (403,app_card_needs_imessage). - A card is never sent twice for one
Idempotency-Key, at any API version. - A reply is
target.replyToMessageId, as on any send. How a phone draws a card sent as a reply is not proven. A card withlayout.imagecannot be a reply:422atpayload.layout.image. - Messages shows the picture only to a person who has your line in their contacts. Anyone else sees the card's words alone.
What comes back:
- The result carries
appCard.updatable.succeededmeans your line handed the card to Messages, not that it was delivered or drawn as a card. ambiguouswitherrorCode: "app_card_unverified"means it may be in the conversation: look before you send it again.- A line whose Mac cannot send cards, or card pictures, accepts it, then settles
failedwithcapability_constraint_violation. A card is never sent without the picture it names. - Change it later with
app_card.update.
Files
The most files one media message can hold, and the largest file, on each channel.
| Channel | Files per message | Largest file |
|---|---|---|
| iMessage | 1, or up to 20 parts in a multipart | 8 MiB |
| 1 | Image 5 MiB (JPEG, PNG), video 16 MiB (MP4, 3GPP), audio 16 MiB, document 100 MiB |
Channel options
| Field | Channel | Description |
|---|---|---|
payload.effect | iMessage | A bubble or screen effect, such as confetti |
payload.subject | iMessage | A bold subject line above the text |
payload.textFormatting | iMessage | Up to 256 ranges: styles, text animations or mentions |
payload.platform.whatsapp.previewUrl | true shows a preview of the first link |
On iMessage these go beside text, on the conversation path.
What a line carries
| Line | message.send carries |
|---|---|
| iMessage | text — and, on the conversation path, effect, subject and textFormatting beside it; kind: "media" with an https link and no caption; kind: "sticker" with emoji or an image link, attachToMessageExternalId, partIndex and placement; kind: "link" with url; kind: "multipart" with parts (an effect and a subject beside them, as on a text); kind: "location_request" with nothing beside it; kind: "poll" with question and options; for an organization offered app cards, kind: "app_card" with app, url, layout (its picture at payload.layout.image), interactive and summary |
text of at most 4,096 characters, with platform.whatsapp.previewUrl beside it; kind: "media" with an https url, which WhatsApp fetches itself, and an optional caption of 1 to 1,024 characters; kind: "sticker" with an https url to a WebP image; kind: "link" with url. Only within 24 hours of the person's last message |
What every line does with the payload:
bodyis read as a second spelling oftext.- A field set to
null, an object holding onlynulls and an emptyattachmentsormedialist say nothing and are skipped. - Any other field that carries a value is refused with
422 validation_failedatpayload.<key>before anything is queued. That422carries the line'schanneland the fields itcarriesin the same entry, anddetailsnames the field it stopped at. - A line of another channel carries what that channel's page lists under What works, and what
GET /v1/capabilitieslists for every channel, with each channel's own limits. A field it cannot carry is the same422, and a kind it does not carry is404 unsupported_commandwithreason: not_on_channel.
Photos and files go by link:
- iMessage:
kind: "media"with an httpsurlof at most 2048 characters and nocaption, fetched by Mapier before anything is written. Or as the parts of amultipart.
- WhatsApp:
kind: "media"with an httpsurland an optionalcaptionof 1 to 1,024 characters. WhatsApp fetches the link itself.
A reply names a message in the same conversation at target.replyToMessageId, beside the payload
and never in it. On the conversation path it is quoted when it names a message the person sent,
or one of yours whose result carried an externalId. Any other reply, and every reply on
the recipient path, is refused rather than sent unquoted.
Each refusal names the field it stopped at, before anything is written:
payload.<key>: a field the line does not carry, or a value outside its bounds.payload.url: a media link Mapier cannot use.payload.parts: a multipart's count, or a link twice. A part is refused at the part,payload.parts[i].urlorpayload.parts[i].text.payload.emoji: a sticker'semojithat is not exactly one emoji.payload.textFormatting: formatting outside its rules, or the range that breaks one atpayload.textFormatting[i].payload.app: an app card's app that your organization does not hold, a disabled one, or a name that differs from the one it registered.target.replyToMessageId: a reply the line cannot quote.target.conversationId, or the recipient field you wrote: an address or a conversation that cannot take what you sent.target.lineId: a line on another channel, or not the line the conversation is on.
The whole list is under Errors. Who gets it says what each conversation can carry, and how a named line meets the line a person is already on.
Deprecated command names
whatsapp.template.send is deprecated. Send message.send with kind: "template".
whatsapp.interactive.send is deprecated. Send message.send with kind: "choices".
whatsapp.location.send is deprecated. Send message.send with kind: "location".
whatsapp.contacts.send is deprecated. Send message.send with kind: "contact".
Example request
curl -X POST https://api.mapier.ai/v1/commands/message.send \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-4821-ready" \
-H "x-mapier-version: 2026-12-01" \
-d '{
"target": { "channel": "imessage", "to": "+15550100100" },
"payload": { "kind": "text", "text": "Your order is ready." }
}'Response
| Field | Type | Sent | Description |
|---|---|---|---|
commandId | string | Always | The id the result on the stream carries |
status | "queued" | Always | queued, even on a repeat: the final status is in the result |
repeated | boolean | When it applies | true when this Idempotency-Key was used before |
lineId | string (uuid) | Always | The line that sends it |
lineSelection | named, reused_active_chat or new_best_line | Always | Why that line, one of the three values below |
channel | imessage or whatsapp | When it applies | The channel that sends it |
parts | object[], each { commandId, index } | When it applies | When it went out as several messages: each part's command |
adaptations | object[], each { path, action, capability?, reason } | When it applies | With adapt: each change made to fit the channel |
lineSelection | Means |
|---|---|
named | You named the line |
reused_active_chat | The line the person already talks to |
new_best_line | A new person, so Mapier picked a working line with room |
{
"commandId": "0192b3e1-7c2d-7a10-9b3e-4f5a6b7c8d9e",
"status": "queued",
"repeated": false,
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"lineSelection": "new_best_line",
"channel": "imessage"
}Results and delivery explains each final status.
Each channel publishes its text limit as textLimit on
GET /v1/capabilities.
- A longer text is
422 validation_failedatpayload.text, naming the limit, and nothing is sent. - On iMessage the 65,536-byte body cap answers first, with
413 payload_too_large. - Text is never split: keep each message within the limit, or send several messages.
The one send that goes out as several messages is a caption that options.degrade: "adapt" sends
on its own. It answers with parts, one {commandId, index} per message, in order; commandId
is the first part's.
- Each part has its own result, and no result covers the whole message. It went out only
when every part's result says
succeeded, so watch eachparts[].commandId. - Parts go in order, each once the one before it was accepted.
- One the line refuses, or never answers, stops the rest, and the request answers with that
refusal. Its
details.sentPartsnames the parts already sent, and the refusal itself says what became of the part it is about. - A retry with the same key never sends a part again: send only the parts not in
details.sentParts, under a new key.
Errors
Every refusal has the same body.
| Status | Code | Reason | When | Channels |
|---|---|---|---|---|
| 400 | bad_request | The body is not valid JSON | All | |
| 401 | invalid_credentials | The key is missing, unknown, revoked or expired | All | |
| 403 | forbidden | The credential may not make this call here. details.reason says why. | All | |
| 403 | insufficient_scope | The key lacks messages:send | All | |
| 403 | line_not_allowed | not_owned | target.lineId is not one of your project's lines | All |
| 403 | recipient_not_allowed | opted_out | The person opted out | All |
| 403 | recipient_not_allowed | blocked, paused | You blocked or paused the person in the console | All |
| 403 | recipient_not_allowed | outside_service_window | The 24-hour reply window has closed. Send a template first | |
| 403 | recipient_not_allowed | recipient_must_write_first | An app card into a conversation nobody but your line has written in; or, from a test line on a shared number, a send to someone who has not texted the line, is no longer connected, or has left 20 turns or 100 messages unanswered since they last texted | iMessage |
| 403 | recipient_not_allowed | app_card_needs_imessage | An app card into a conversation whose newest message did not go by iMessage | iMessage |
| 403 | recipient_not_allowed | group_member_not_test_contact | A send into a group on a test line on a shared number while someone in it is not one of this project's connected Test contacts | iMessage |
| 404 | not_found | No conversation or message has that id | All | |
| 404 | unsupported_command | not_on_channel | The channel has no such kind | All |
| 404 | unsupported_command | not_on_line | This line cannot send that kind | All |
| 404 | unsupported_command | shared_line | Not returned for a message.send: a test line on a shared number refuses only other commands with it | iMessage |
| 404 | unsupported_command | command_retired | The command type was retired. details.use names the one to send instead. | All |
| 409 | conflict | idempotency_key_in_flight | The first send is still running | All |
| 409 | conflict | idempotency_key_failed | The first send failed | All |
| 409 | conflict | idempotency_key_unresolved | The first send may have gone out | All |
| 409 | conflict | idempotency_key_reused | The key was used for a different send | All |
| 409 | conversation_closed | removed, deleted, archived, suspended | The group closed for this line | All |
| 409 | limit_reached | A daily cap on this test line on a shared number is reached | iMessage | |
| 409 | project_archived | The project is archived | All | |
| 413 | payload_too_large | The request body is over 65,536 bytes | All | |
| 422 | validation_failed | A field is wrong; each details entry names one | All | |
| 422 | validation_failed | A link is over 2,048 characters | iMessage | |
| 422 | validation_failed | An app card's app is not one your organization holds, is disabled, or its name differs, at payload.app | iMessage | |
| 422 | validation_failed | media_too_large | A file is over 8 MiB | iMessage |
| 422 | validation_failed | unsupported_media_type | A file's type is not allowed | iMessage |
| 422 | validation_failed | media_fetch_failed | Mapier could not fetch a file's link | iMessage |
| 422 | validation_failed | media_fetch_refused | The link is not https, or points inside a private network | iMessage |
| 429 | rate_limited | Over your request limit. Wait as the Retry-After header says | All | |
| 429 | rate_limited | error_budget | The channel refused many recent sends from this line. Wait details.retryAfter | All |
| 429 | rate_limited | shared_line | A test line on a shared number spent its budget for your project | iMessage |
| 429 | sandbox_budget_exhausted | Not returned today. Handle it like rate_limited | All | |
| 500 | internal_error | Mapier failed on its side | All | |
| 503 | capacity_exhausted | all_lines_full | Every line is full for new people | All |
| 503 | line_unavailable | transport_down | The line's channel connection is down for now | All |
| 503 | line_unavailable | line_paused | You paused the line | All |
| 503 | line_unavailable | channel_not_available | The project has no line on this channel. | All |
| 503 | line_unavailable | sandbox_world_missing | Not returned today. Handle it like channel_not_available. | All |
| 503 | line_unavailable | transport_unconfigured | The line is not fully set up yet. Contact support if this lasts. | All |
| 503 | line_unavailable | line_retired | The line was retired from your project. Start a new conversation with the person on another line. | All |
| 503 | no_line | Your project has no working line on that channel | All | |
| 503 | service_busy | Mapier is busy, for example fetching many files. Wait details.retryAfter | All | |
| 503 | upstream_unavailable | The channel did not answer | All |
A message the channel refuses after the 202 is still recorded: its result says failed, with the reason. Results and delivery lists every result code.
A field is wrong or missing, the payload carries a field the line does not, or an iMessage line
cannot carry the address, the group, the text or the kind. details names the field; see
What a line carries.
| Field | Refused |
|---|---|
payload.<key> | A field the line does not carry. On the recipient path, effect and subject. On the conversation path, an effect outside the thirteen names or a subject outside 1 to 1024 characters |
payload.text | A text over the channel's textLimit |
payload.url | A media link Mapier cannot use, with media_fetch_refused, media_fetch_failed, media_too_large or unsupported_media_type as the entry's reason |
payload.caption | A caption on iMessage |
payload.parts, payload.parts[i].url, payload.parts[i].text | A multipart's count or a link twice, at payload.parts; a part, at the part |
payload.emoji, or the sticker field | A sticker's emoji that is not exactly one emoji. Any of a sticker's fields without kind: "sticker", at that field |
payload.textFormatting, payload.textFormatting[i] | Formatting outside its rules: the list, or the range |
target.replyToMessageId | On the recipient path, every reply. On the conversation path, a reply to a message that carries no iMessage id: one the person did not send and whose result carried no externalId |
| The target field you wrote the address at | On the recipient path, an email address, at target.recipientExternalId or whichever of its spellings you used, or at target.conversationId when you named a conversation on that path. The recipient path sends to an E.164 phone number only |
target.conversationId, or the recipient field you wrote | With reason: conversation_not_confirmed: a media link, a sticker, a link, a multipart, a location_request or a poll into a conversation on the recipient path (send the person a text first), and a location_request into a group chat (send it into a member's own one-to-one conversation instead) |
target.conversationId | On either path, a group chat the channel has not reported yet |
target.lineId | A line on another channel than target.channel names, or not the line a conversationId names: a conversation stays on its line |
On WhatsApp, a sticker with no url or one whose path does not end in .webp is refused at
payload.url, and a sticker's emoji, attachToMessageExternalId, partIndex, placement or
caption at that key.
On the recipient path the line refuses a text that is blank or over 16,384 bytes after Mapier has
recorded the send, with invalid_text as the entry's reason. Send the fixed text under a new key.
413 payload_too_largewhen the body is over 65,536 bytes, before the text limit is checked.404 unsupported_commandwithreason: not_on_channelfor a kind the line's channel does not carry. On WhatsApp that is amultipart,location_requestorpoll.403 recipient_not_allowedwhen the person opted out, is blocked or paused, or a channel's service window has closed.details.reasonsays which:opted_out,blocked,pausedoroutside_service_window. On WhatsApp, outside 24 hours of the person's last message, send a template first, amessage.sendwithkind: "template".403 line_not_allowedwhentarget.lineIdis not one of your project's lines (another project's, or nobody's; the API does not say which).details.reasonisnot_ownedanddetails.lineIdthe id you sent.GET /v1/whoamilists the lines the key can use.503 capacity_exhaustedor503 line_unavailableabout the line you named, when it is full, paused, retired or its connection is down: the same codes a send to that line meets, with an errormessageabout that line rather than about every line in the project.409 conflictwhen theIdempotency-Keyis taken and there is nothing to adopt.details.reasonsays how:idempotency_key_in_flight(the first send is still running),idempotency_key_failed(it was refused),idempotency_key_unresolved(its outcome is unknown) oridempotency_key_reused(another command holds the key).503 service_busywithretryAfterwhen your project, or Mapier, is already sending as many files by link as it can at once — nothing is written, and the same key may be sent again.503 upstream_unavailablewhen the line did not take the send, or answered with something unusable, or the line is offline. The send was recorded first, so its key is spent: a same-key retry answers409 conflict, and a resend goes under a new key. Whendetails.reasonistimeout,networkorstatus_5xx, check the conversation first, since the send may have landed.- On an iMessage line the line's own reasons for refusing a send, such as
invalid_text, reach you asdetails.reason(or a422entry'sreason) under the published code, never as thecode.