Check reachability

Whether a message from this line would reach this person now, and what to do if not

GET/v1/reachability

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"
200 OK
{
  "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:

200 OK — WhatsApp, outside the window
{
  "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
lineIdOptional. A line id this key can see, as GET /v1/whoami lists it under lines.
channelRequired 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.
toThe person's address on that channel, written as a send's target.to is. One of to and recipient is required.
recipientDeprecated: use to. The same address under its old name. If both are sent with a lineId, recipient is used.
registeredOptional, 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.

  • registered is true or false, or null when the channel cannot answer the question at once. Null is not false.
  • registeredReason says why not when registered is false, or why the channel could not say when it is null. Branch on registered, not on registeredReason.

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

StatusCodeCause
400bad_requestThe channel refused a registered=true check as malformed; or, with a personal access token, no x-mapier-project header
401invalid_credentialsNo key, or one that is unknown, revoked or expired
403forbiddenA personal access token not made for this environment, or whose owner's role no longer allows this
403insufficient_scopeThe key does not carry the messages:read scope
404not_foundA line this key cannot see, or none
409project_archivedThe project is archived
413payload_too_largeThe request is over the size limit
422validation_failedNeither to nor recipient, no channel without a lineId, an address the channel cannot read, or an unknown x-mapier-version
429rate_limitedOver this route's budget; the Retry-After header says how long to wait
500internal_errorMapier failed on its side; give requestId to support
503service_busyMapier is busy and did nothing; wait details.retryAfter seconds and call again
503upstream_unavailableMapier or the channel did not answer; retry with backoff
503no_line · capacity_exhausted · line_unavailableWith no lineId: no line can take this person now, the refusal a message.send would get