WhatsApp· 5 min read

WhatsApp marketing opt-outs: user_preferences and error 131050


When a WhatsApp user stops marketing messages from your business, Meta sends a user_preferences webhook with value set to stop. Marketing templates you send that user afterwards fail with error 131050, which arrives on the status webhook. Record the stop, check it before every marketing send, and clear it only when a resume arrives. Meta’s developer docs define no “Stop promotions” button. The user-side control they document is a setting called Offers and announcements.

What the user controls: Offers and announcements

WhatsApp has “a setting, Offers and announcements, that allows WhatsApp users to indicate their interest level” in your marketing messages (marketing templates, accessed 2026-11-04). The same setting lets them “stop or resume delivery of marketing template messages from your business.” If a user picks Not interested, that choice “can affect” the per-user marketing limits, and a second modal offers to stop delivery. Meta doesn’t say where the setting sits in the app.

Blocking or reporting your business is a separate signal with its own consequences, covered in the block users API.

The user_preferences webhook

Subscribe your app to the user_preferences webhook field. It fires when “A WhatsApp user stops marketing messages” and when “A WhatsApp user resumes marketing messages” (user_preferences reference, accessed 2026-11-04). It “does not trigger when a user indicates Interested or Not interested feedback” in Offers and announcements. Only the stop and the resume reach you.

Field Value
category marketing_messages
value stop or resume
detail “User requested to stop marketing messages” or “…resume marketing messages”
wa_id Omitted if the user has usernames on and the number can’t be shared
user_id The business-scoped user ID (BSUID). Omitted if BSUIDs aren’t enabled for your business
parent_user_id Present only with parent BSUIDs enabled
timestamp Integer, Unix seconds

Meta’s sample:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "102290129340398",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "15550783881",
              "phone_number_id": "106540352242922"
            },
            "contacts": [
              {
                "wa_id": "16505551234",
                "user_id": "US.13491208655302741918",
                "parent_user_id": "US.ENT.506847293015824"
              }
            ],
            "user_preferences": [
              {
                "wa_id": "16505551234",
                "user_id": "US.13491208655302741918",
                "parent_user_id": "US.ENT.506847293015824",
                "detail": "User requested to resume marketing messages",
                "category": "marketing_messages",
                "value": "resume",
                "timestamp": 1731705721
              }
            ]
          },
          "field": "user_preferences"
        }
      ]
    }
  ]
}

Identify the user from user_preferences[].wa_id, falling back to user_id. This webhook has no from field. Never key a preference on parent_user_id. Meta states that “a preference is never applied at the parent BSUID level.” Mapping phone numbers to BSUIDs in an existing contact table is covered in migrating your contact database to BSUIDs.

Error 131050 arrives on a failed status

A send to a stopped user doesn’t fail on the request. Meta’s marketing templates page says “the API will process the request but not send the message.” The failure comes later, as a status webhook with status set to failed and error code 131050. Meta’s error reference gives the detail as “This recipient has chosen to stop receiving marketing messages on WhatsApp from your business” (error codes, accessed 2026-11-04). The listed solution is “Do not retry sending messages to this user as they will not be received.”

The pages we read show no full 131050 status payload. Its status webhook reference (accessed 2026-11-04) shows a failed status with 131049. The structure is the same: status, recipient_id, then an errors array with code, title, message, error_data.details and href. Read errors[].code on every failed status. The other status fields are in message status webhooks.

Code Meta’s detail (short) What it means for you
131050 “chosen to stop receiving marketing messages on WhatsApp from your business” The user stopped marketing. Don’t retry
131049 “not delivered to maintain healthy ecosystem engagement” Per-user marketing limit. Meta says to wait at least 24 hours
131063 “marketing templates are currently disabled” Marketing is disabled at business level by the disable_marketing_messages_on_cloud_api setting
130403 “This business has blocked the end user on WhatsApp” You blocked the user
131047 “More than 24 hours have passed since the recipient last replied” The customer service window closed. Not an opt-out

Retry rules for 131049 are in WhatsApp error 131049.

The Marketing Messages API section of Meta’s error reference doesn’t list 131050 among its codes. If you send through that API, see the Marketing Messages API guide. One more failure isn’t an opt-out at all. “WhatsApp does not currently deliver marketing template messages to WhatsApp users with United States phone numbers” (per-user limits, accessed 2026-11-04). Meta names no code for that error.

Opt-out buttons in your templates are yours to record

Meta’s template components page suggests quick reply buttons for opt-outs (template components, accessed 2026-11-04). Its example is a button “that allows your customer to easily opt-out of any marketing messages.” Its sample labels are “Unsubscribe from Promos” and “Unsubscribe from All”. Labels have a 25-character maximum, and a template holds up to 10 quick reply buttons.

Meta defines no special opt-out subtype for these buttons. A tap reaches you as an ordinary button reply, and nothing in the docs links it to the user’s Offers and announcements state. Recording that opt-out is your job. Store it in your own consent record, apart from the platform state below, because a resume webhook says nothing about your unsubscribe button.

What to store

The table and script below are our design, built from the webhook and error pages. Meta doesn’t prescribe a schema. The script keeps one row per user: the latest stop or resume, where it came from, and the event timestamp. A failed status with 131050 also counts as a stop. Older events never overwrite newer ones, so a late 131050 can’t undo a resume that followed it.

# prefs.py. Run: python3 prefs.py webhook.json   (state is kept in prefs.db)
import json
import sqlite3
import sys
import time

db = sqlite3.connect("prefs.db")
db.execute("""CREATE TABLE IF NOT EXISTS marketing_prefs (
  user_key TEXT PRIMARY KEY,  -- wa_id, or user_id (BSUID) when wa_id is absent
  state    TEXT NOT NULL,     -- 'stop' or 'resume'
  source   TEXT NOT NULL,     -- 'user_preferences' or 'status_131050'
  event_ts INTEGER NOT NULL
)""")


def record(user_key, state, source, ts):
    if not user_key:
        return
    db.execute(
        """INSERT INTO marketing_prefs (user_key, state, source, event_ts) VALUES (?, ?, ?, ?)
           ON CONFLICT(user_key) DO UPDATE SET state = excluded.state,
             source = excluded.source, event_ts = excluded.event_ts
           WHERE excluded.event_ts >= marketing_prefs.event_ts""",
        (user_key, state, source, ts),
    )


def handle(payload):
    for entry in payload.get("entry", []):
        for change in entry.get("changes", []):
            value = change.get("value", {})
            for pref in value.get("user_preferences", []):
                if pref.get("category") == "marketing_messages":
                    key = pref.get("wa_id") or pref.get("user_id")  # never parent_user_id
                    record(key, pref["value"], "user_preferences", int(pref["timestamp"]))
            for status in value.get("statuses", []):
                if status.get("status") == "failed" and any(
                    e.get("code") == 131050 for e in status.get("errors", [])
                ):
                    key = status.get("recipient_id") or status.get("recipient_user_id")
                    ts = int(status.get("timestamp") or time.time())
                    record(key, "stop", "status_131050", ts)
    db.commit()


def can_send_marketing(user_key):
    row = db.execute("SELECT state FROM marketing_prefs WHERE user_key = ?", (user_key,)).fetchone()
    return row is None or row[0] == "resume"


if __name__ == "__main__":
    with open(sys.argv[1]) as f:
        handle(json.load(f))
    for row in db.execute("SELECT * FROM marketing_prefs"):
        print(row)

Save Meta’s sample above as webhook.json and run the script to see a resume row for 16505551234. Call can_send_marketing() before every marketing template. Meta accepts the request either way, so the check is the only thing that stops a send you know will fail. Meta’s status example doesn’t show recipient_user_id. The fallback is a precaution, as in our other webhook code. A True result only means the user hasn’t stopped marketing on WhatsApp. You still need their opt-in.

Re-opt-in after a stop

The only documented way back is the user’s own resume in Offers and announcements, which fires user_preferences with value set to resume. Meta documents no rule for a business collecting consent again after a stop. The docs also tie the stop to “marketing template messages” only. They don’t say whether it touches utility templates, authentication templates or replies inside the customer service window.

Meta’s opt-in rules still apply to every send. “Businesses are required to obtain opt-in before messaging people on WhatsApp” (getting opt-in, accessed 2026-11-04). Meta also asks you to “Provide clear instructions for how people can opt out of receiving specific categories of messages” and to honor them. Collecting opt-in per category is covered in how to collect WhatsApp opt-in.

Z-API Omni team