Log inStart Free Trial
Meta Tech Provider

Handle STOP and unsubscribe messages automatically

To handle STOP messages on WhatsApp automatically, set a keyword automation that matches STOP and its variants as the whole message, replies with a confirmation, and calls a webhook that marks the contact as opted out in your own list. Meta's policy requires honoring opt-out requests, and keyword automations run before catch-all replies, so an AI reply does not answer them instead.

easyCoexistence connects the WhatsApp Business number you keep in the app to Meta's Cloud API through Coexistence and runs the keyword automation that answers STOP in seconds, with a signed Call my webhook step that hands the opt-out to your own system and an email if that step fails.

30 keywords

Most an automation can match; any one of them is enough, and capital letters do not matter.

Is exactly

The keyword mode that runs only when the whole message equals a keyword, after spaces around it are trimmed.

On or off WhatsApp

Meta's policy requires businesses to respect requests to opt out or stop messages, whichever channel they arrive on.

Quick reply

Meta names a button that lets customers opt out of marketing as a common use of quick-reply buttons.

131050

Failed status for a marketing template sent to someone who stopped your marketing in Offers and announcements.

Utility

Meta lists confirming a customer's opt-out preference as an example of a utility message.

How does a STOP automation work?

It is a keyword automation with two steps, and it lives on the same number as your other automations. Keyword automations are checked first and only one automation answers each message, so a STOP is never handed to your AI catch-all or your welcome message. The customer gets a confirmation in seconds, and your own system stores the opt-out where your campaigns read it.

1Customer writes STOPOr taps a Stop promotions button
2Has keywordIs exactly, with STOP and its variants
3Reply with textConfirms what stops and how to come back
4Call my webhookYour system marks the contact opted out
5Your listCampaigns skip the contact from now on

Which words should the automation match?

Short words with Is exactly, so ordinary sentences never trigger it: Contains "stop" would also fire on "nonstop" and "don't stop the updates". Is exactly ignores capital letters and spaces around the text but not punctuation, so "STOP." needs its own entry. Up to 30 keywords fit, enough for three languages:

  • English: stop, stop., unsubscribe, opt out, stop promotions, no more messages.
  • Portuguese: parar, pare, sair, descadastrar, não quero mais, cancelar inscrição.
  • Spanish: baja, darme de baja, no más mensajes, detener, cancelar suscripción.
  • Button labels exactly as written in your templates, such as "Stop promotions".
  • Leave out "cancel" and "cancelar" alone: customers also use them to cancel an order.

What does the automation look like?

This is the automation an AI creates through create_automation, or what you build in the editor from the Keyword reply example. The confirmation goes first, so the customer hears back even if your system is slow, and the webhook records the opt-out after it. You can add a Tag step, such as opted_out, so the contact also carries the opt-out inside easyCoexistence, where Conversations and any condition can see it. Your endpoint answers HTTP 200 with no reply field, which sends nothing more; if it fails, the run is marked Failed and you are emailed so you can record that opt-out by hand.

create_automation arguments for STOP
{
  "connection_id": "<from list_numbers>",
  "name": "Opt-out: STOP",
  "enabled": false,
  "trigger": {
    "type": "message_received",
    "match": "keyword",
    "keyword_mode": "exact",
    "keywords": ["stop", "stop.", "unsubscribe", "stop promotions",
                 "parar", "sair", "descadastrar", "baja", "darme de baja"]
  },
  "steps": [
    { "type": "reply_text",
      "text": "Done, {{first_name}}. Bloom Store will not send you offers on WhatsApp anymore. Order updates still arrive. Reply START to subscribe again." },
    { "type": "call_webhook",
      "url": "https://example.com/hooks/whatsapp-opt-out" }
  ]
}

What does your system receive and store?

A JSON POST signed in X-EC-Signature with the automation's Signing secret, shown on the Call my webhook step. The fields that matter are contact.wa_id, the customer's number in international digits, message.text, the word they sent, message.at and automation.name. Verify the signature, then set an opted-out flag on that phone with the time and the word, in the CRM, database or sheet your campaigns read. Skip writes when dry_run is true, which marks a test from Try it. easyCoexistence's contacts hold fields and tags but never feed your campaigns, so the record your sending tool reads is the one that counts.

How do people opt out without writing STOP?

Three other ways, and two never reach the chat. A tap on a "Stop promotions" quick-reply button arrives as a message with that text, so the same automation answers it when the label is in its keywords. Turning off your offers in WhatsApp's Offers and announcements setting sends you nothing; the next marketing template fails with error 131050, and with messages routed through easyCoexistence and a Forward URL that failed status reaches your system, where it should set the same flag. Blocking the number stops delivery altogether. Meta's policy also covers opt-outs by email, phone or in person, so every channel should write to the same list.

How does someone subscribe again?

With a second keyword automation that mirrors the first. Has keyword, Is exactly, with START, "subscribe", "voltar" and "alta", a Reply with text step that confirms what the customer will receive again and names your business, and a Call my webhook step that clears the flag. A customer who writes START is giving you permission in their own words, so store the time and the message as the new consent record. Mention START in the STOP confirmation so customers know the way back.

How to set it up

  1. Build the opt-out endpointExpose an HTTPS endpoint, or an n8n Webhook node, that verifies X-EC-Signature, sets the opted-out flag for contact.wa_id and returns HTTP 200 with no reply.
  2. Create the STOP automationStart from Keyword reply, set Has keyword to Is exactly, add the words and button labels, write the confirmation, then add Call my webhook with your URL. Set the switch to Off.
  3. Copy the Signing secretSave the automation, select its Call my webhook step and copy the Signing secret into your endpoint's configuration.
  4. Test the wordsClick Test and send "STOP", "stop." and "please don't stop" in Try it: the first two should run, the third should not. Then switch it On and save.
  5. Add START and the status checkCreate the START automation, and have your system treat failed statuses with error 131050 as an opt-out from marketing.

Common mistakes

  • Using Contains with "stop" or "sair". Contains matches inside longer sentences, so "I can't stop by today" unsubscribes a customer who never asked to.
  • Returning {"reply": "..."} from the opt-out endpoint after a Reply with text step. The automation sends both, and the customer gets two confirmations.
  • Recording the opt-out only in WhatsApp chats. If campaigns go out from another tool that never reads the list, the next send reaches someone who asked to stop.
  • Retrying marketing templates that failed with 131050. The person turned your offers off in WhatsApp; retries only add errors and risk blocks.
Doing this with EasyCoexistence

Automations cost nothing extra. US$ 9 down to US$ 0.75 per number per month, falling as you add numbers, with the first 3 days free.

easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.

Frequently asked questions

Does writing STOP block my business on WhatsApp?

No. STOP is an ordinary message, and WhatsApp itself does nothing with it, so stopping is up to you. That is why the automation records it. A customer can also block the number or turn off your offers in WhatsApp, which stop delivery on Meta's side.

Should order updates stop when a customer writes STOP?

Decide what STOP covers and say it in the confirmation. Meta's opt-in guidance suggests clear instructions for opting out of specific categories, so a common choice is that STOP ends offers while order updates continue, with another keyword for stopping everything.

Can my AI handle unsubscribe requests written as a sentence?

It can answer them but not record them: a Reply with AI step only writes text. An AI agent can add a tag you allow, such as opted_out, or start your STOP automation when the request is clear, and you can also create a second keyword automation in Contains mode for longer phrases such as "unsubscribe me", with the same two steps.

What if a customer writes STOP outside business hours?

The STOP automation still answers. Keyword automations are checked before After hours, First message and Every message automations, so an away message never replies to an opt-out in its place.

Keep reading

Ready to get started?

Set up WhatsApp Coexistence in minutes, not months. The app keeps working on the phone.

Start Free Trial

Verified on