Opt-out

How a person stops your messages, and how your app opts someone out

A person who asks you to stop is opted out of your whole project, on every line and channel they share with you. Mapier records it and refuses every later send to them. Only the person can opt back in.

A person…What happens
Sends a stop word on a phone channelMapier opts them out for you
Asks your agent to stop, in their own wordsYour app opts them out with POST /v1/contacts/{contactId}/consent
Writes to you again laterThey are opted back in

By keyword, on phone channels

On iMessage and WhatsApp, a message that is only one of these words, in capitals, opts the person out:

STOP · UNSUBSCRIBE · OPTOUT · CANCEL · END · QUIT

Spaces around the word and a final ., ! or ? do not matter. Capitals do matter. stop and STOP please change nothing.

They sendResult
STOPOpted out
STOP.Opted out
STOP!Opted out
stopNothing changes
StopNothing changes
STOP pleaseNothing changes
OPT OUTNothing changes
cancel my order pleaseNothing changes
STARTOpted back in, if they had opted out
hey are you thereOpted back in, if they had opted out

A person opts back in by sending START or UNSTOP. Any other one-to-one message from them opts them back in too, unless it contains a word such as stop, cancel or quit.

A message in a group chat changes nothing.

A phone number belongs to one person, so a stop word on one line stops every line that reaches the same number.

Opt someone out from your app

When a person asks your agent to stop, opt them out yourself. contactId is on every incoming message.

curl -X POST https://api.mapier.ai/v1/contacts/$CONTACT_ID/consent \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: optout-$CONTACT_ID" \
  -H "x-mapier-version: 2026-12-01" \
  -d '{ "optedOut": true, "reason": "Asked in chat to stop messaging" }'

The key needs the messages:send scope. A second call for someone already opted out answers 200 with the first optedOutAt.

Hear when someone opts out

Select contact.opt_out_changed on a webhook endpoint. optedOut says whether the person is now opted out, and source says what changed it: inbound for the person's own message, api for your app, console for a change in the console. New values can appear; treat one you do not know as a change you did not make.

After an opt-out

Every later send to the person is refused at once, and nothing is sent. GET /v1/reachability says so before you send; see Check before you send.

Errors you may see

ErrorMeansFix
403 recipient_not_allowed, opted_outThis person opted outDo not send again. Only they can opt back in

Next