Check reachability
Whether a message from this line would reach this person now, and what to do if not
Whether a message from one line would reach one 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 and they have not written to this line; the channel's reply window has closed on this line; the channel has handed the conversation to another app. Nothing is sent and nothing is written.
reasons lists every rule that stands, canSend sums them up, 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.
curl "https://api.mapier.ai/v1/reachability?lineId=0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d&to=%2B14155550100" \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01"{
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
"channel": "imessage",
"recipient": "+14155550100",
"to": "+14155550100",
"canSend": {
"freeform": false,
"template": null
},
"reasons": [
{
"code": "opted_out",
"reason": "opted_out",
"docUrl": "https://docs.mapier.ai/convo/api/errors#recipient_not_allowed.opted_out"
}
],
"serviceWindow": {
"applies": false,
"expiresAt": null
},
"initiation": {
"required": "none",
"satisfied": null
},
"consent": {
"optedOut": true,
"scope": "person"
},
"remedy": null,
"evidenceAt": "2026-10-18T18:04:00.000Z"
}On WhatsApp, to a person who last wrote more than 24 hours ago, only a template
goes, and remedy names it:
{
"lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2e",
"channel": "whatsapp",
"recipient": "+447700900123",
"to": "+447700900123",
"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-17T18:04:00.000Z"
},
"initiation": {
"required": "template",
"satisfied": false
},
"consent": {
"optedOut": false,
"scope": "person"
},
"remedy": {
"type": "whatsapp.template.send"
},
"evidenceAt": "2026-10-18T18:04:00.000Z"
}to and recipient carry the same address, and reasons[].code the same
word as reasons[].reason. recipient and code are deprecated. Read to
and reason instead.
Query
| Parameter | |
|---|---|
lineId | Optional. A line id this key can see, as GET /v1/whoami lists it under lines. |
channel | Required when lineId is left out: the channel to ask on, such as imessage. Beside a lineId it is not read — the line says its channel. |
to | The person's address on that channel, written as a send's target.to is. One of to and recipient is required. |
recipient | Deprecated: use to. The same address under its old name. If both are sent with a lineId, recipient is used. |
registered | Optional, true or false (the default). true also asks the channel live whether the address can receive, as POST /v1/handle-check asks it. |
Without a line
Leave lineId out and name channel instead. The answer is then 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. No line is reserved. When no line can take the person, the
answer is the refusal that send would get.
curl "https://api.mapier.ai/v1/reachability?channel=imessage&to=%2B14155550100" \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01"Asking the channel live
Add registered=true and the answer also carries registered and
registeredReason, asked on the line the answer is about. It needs the
messages:send scope, and it counts against the address-check budget of 30
requests a minute per key — see Rate limits.
registeredistrueorfalse, ornullwhen the channel cannot answer the question at once. Null is not false.registeredReasonsays why not whenregisteredis false, or why the channel could not say when it is null. Branch onregistered, not onregisteredReason.
Each reasons[].reason is a details.reason a send would be refused with, and
its docUrl is that refusal's row in Error codes. A person this
project has never messaged is answered like anyone else: they have not written
yet, and no reply window is open.
Errors
| Status | Code | Cause |
|---|---|---|
400 | bad_request | The channel refused a registered=true check as malformed; or, with a personal access token, no x-mapier-project header |
401 | invalid_credentials | No key, or one that is unknown, revoked or expired |
403 | forbidden | A personal access token not made for this environment, or whose owner's role no longer allows this |
403 | insufficient_scope | The key does not carry the messages:read scope |
404 | not_found | A line this key cannot see, or none |
409 | project_archived | The project is archived |
413 | payload_too_large | The request is over the size limit |
422 | validation_failed | Neither to nor recipient, no channel without a lineId, an address the channel cannot read, or an unknown x-mapier-version |
429 | rate_limited | Over this route's budget; the Retry-After header says how long to wait |
500 | internal_error | Mapier failed on its side; give requestId to support |
503 | service_busy | Mapier is busy and did nothing; wait details.retryAfter seconds and call again |
503 | upstream_unavailable | Mapier or the channel did not answer; retry with backoff |
503 | no_line · capacity_exhausted · line_unavailable | With no lineId: no line can take this person now, the refusal a message.send would get |