Check before you send
Ask whether a line can reach a person now, and what to do when it cannot
A send to someone your line cannot reach is refused, or goes out and never
arrives. GET /v1/reachability asks first, by
the same rules a send follows. It sends nothing and writes nothing.
| You want to know | Read |
|---|---|
| Whether an ordinary message would go out now | canSend.freeform |
| Why not | reasons, one entry per rule |
| What to do about it | remedy |
| Who has to write first | initiation |
| Whether the address is on the channel at all | registered, when you ask with registered=true |
Ask about one person
Name the line with lineId, or name channel and let Mapier pick the line a
send would use. Put the person's address in to.
curl -G https://api.mapier.ai/v1/reachability \
-H "Authorization: Bearer $MAPIER_API_KEY" \
-H "x-mapier-version: 2026-12-01" \
--data-urlencode "channel=imessage" \
--data-urlencode "to=+14155550100"When nothing stands in the way, reasons is empty and canSend.freeform is
true. A refused send carries the same answer at details.reachability, so
you can read it there too.
Each line keeps its own record of who has written to it, so two lines can answer differently for one person.
Why a send would be refused
Each entry in reasons has a reason and a docUrl to its row on the
Errors page.
reason | Channel | Means | What to do |
|---|---|---|---|
opted_out | All | The person asked you to stop | Do not send. See Opt-out |
blocked, paused | All | The person is blocked or paused in the console | Unblock or resume them in the console |
outside_service_window | More than 24 hours since the person last wrote on WhatsApp | Send an approved template. canSend.template says whether one would go out |
Ask the channel whether an address exists
Add registered=true to also ask the channel, live, whether the address can
receive at all.
registered: truemeans the channel says yes.registered: falsemeans the channel says no.registered: nullmeans the channel cannot answer before a message is sent. It is not a no.
| Channel | What registered answers |
|---|---|
| iMessage | Whether the number or email is on iMessage, as Apple reports it |
This live check needs the messages:send scope, and each key may make 30 a
minute. Checks run one at a time on each line, so check addresses one after
another rather than all at once, and keep the answer: whether a number is on
iMessage rarely changes.
POST /v1/handle-check is deprecated. Use registered=true instead.
Errors you may see
| Error | Means | Fix |
|---|---|---|
404 not_found | The lineId is not one this key can see | Use a line that GET /v1/whoami lists |
422 validation_failed | The address is not one the channel accepts | Write the address in the channel's form, as Key concepts shows |
503 line_unavailable, read_in_flight | Another live check is running on that line | Wait a moment, then ask again |
429 rate_limited | More than 30 live checks a minute | Wait retry-after seconds |
A 503 from a live check never means the address is unreachable. Only a 200
with registered: false does.