API: How to handle STOP and opt-outs

Featured illustration for API: How to handle STOP and opt-outs

API: How to handle STOP and opt-outs. Actionable guide on how to handle STOP and opt-outs in context of android sms gateway api. Include prerequisites, steps, limits, and internal links. Priced by devices and SMS send volume; BYO phone and operator credit.

Written by the SMS Gateway team for operators who run phones and airtime themselves — not for theoretical cloud SMS demos.

InformationAndroid SMS GatewayHow-ToHub C
Article
Published
March 20, 2025
Updated
April 14, 2025
Reading time
16 minute read

Key Takeaways

  • API how-to for STOP and opt-outs: inbound webhook → keyword match → suppression list → never POST /messages to that MSISDN on promo deviceIds.
  • Confirm keywords and auto-reply behaviour in product docs. Do not invent a stop=true send flag.
  • Transactional OTP usually stays off the promo suppression debate — still honour a hard block if counsel says so.
  • Quiet hours and consent still apply before the first send.
  • Service pricing is based on device count and total SMS sent through the gateway. You need a working Android phone with a SIM and SMS credit from your mobile operator. Operator message costs are yours—we do not sell carrier SMS balance.

This Hub C how-to is how to handle STOP and opt-outs on the Android SMS gateway API: you already send with Bearer JSON; now inbound “STOP” has to mean something before the next campaign. It is not a rewrite of the auto-reply feature page.

Service pricing is based on device count and total SMS sent through the gateway. Auto-reply and STOP, webhooks, API docs.

STOP then suppressSTOPpromo ✕
Inbound STOP. Shield writes the list. The next campaign must not leave the SIM.
A STOP that only lives in the phone thread is not an opt-out. It is evidence you will dislike later.

Hub C: API how-to, not the STOP feature essay

CTIA-style hygiene for US promo: CTIA — context, not a certification. Counsel owns TCPA/GDPR.

STOP path table

StepWhereFailure
Inbound STOPmessage.receivedNo webhook / unsigned
Match keywordYour parser + panel auto-replyOnly matching “Stop” with a capital S
Write suppressionYour DB, keyed by E.164Panel-only, API senders ignore it
Next POST /messagesFilter promo deviceIdsCSV still includes the number

Parse message.received

{
  "id": "evt_01K2F8QW3N4RXB7M",
  "type": "message.received",
  "createdAt": "2026-08-12T14:04:09Z",
  "apiVersion": "2026-08-12",
  "data": {
    "message": {
      "id": 41822,
      "number": "+14155552671",
      "text": "Yes, please reschedule to Thursday.",
      "status": "Received",
      "deviceId": 3,
      "receivedAt": "2026-08-12T14:04:09Z"
    }
  }
}

Normalize text: trim, case-fold, common STOP/UNSUBSCRIBE/END. Exact list is a product/legal choice.

Suppression before the next POST

Campaigns via POST /campaigns or CSV in the panel still need the same list. CSV bulk. You need a working Android phone with a SIM and SMS credit from your mobile operator. Operator message costs are yours—we do not sell carrier SMS balance.

OTP is not a STOP lane

Do not send login codes from the promo SIM. A STOP on marketing should not blindly disable 2FA unless you designed that. OTP.

Checklist

  • HMAC on inbound.
  • Suppression store keyed by E.164.
  • API and panel share the list.
  • Promo deviceIds filtered.
  • Ack SMS (if any) is not a new campaign.

Next steps

Pair via downloads, send a promo canary to a staff SIM, reply STOP, then prove the next API send is skipped.

Jump to the live product docs for this topic—not another long-form article.

FAQ

Frequently asked questions

Direct answers about android sms gateway api how to handle stop and opt outs.

Is STOP handled if I only use the panel auto-reply?

Panel keywords help. API senders must still check your own suppression store before POST /messages.

Does opt-out include carrier credit refunds?

No. Airtime already spent is the operator’s. We do not cash out SMS credits. Platform fees are a separate policy.

Where is the feature pillar?

/features/auto-reply-sms — this page is the API wiring.

Live fields?

https://docs.sms-gateway.app/
Keep learning

Topically related guides—chosen by subject overlap, not a fixed sitewide footer.

Information
android sms gateway api how to avoid spammy wording

API: How to avoid spammy wording

API: How to avoid spammy wording. Actionable guide on how to avoid spammy wording in context of android sms gateway api. Include prerequisites, steps, limits, and internal links. Priced by devices and SMS send volume; BYO phone and operator credit.

Sep 28, 202416 min
Read article
Information
android sms gateway api how to choose prepaid vs postpaid sims

API: How to choose prepaid vs postpaid SIMs

API: How to choose prepaid vs postpaid SIMs. Actionable guide on how to choose prepaid vs postpaid SIMs in context of android sms gateway api. Include prerequisites, steps, limits, and internal links. Priced by devices and SMS send volume; BYO phone and operator credit.

Feb 15, 202616 min
Read article
Information
android sms gateway api how to design otp templates

API: How to design OTP templates

API: How to design OTP templates. Actionable guide on how to design OTP templates in context of android sms gateway api. Include prerequisites, steps, limits, and internal links. Priced by devices and SMS send volume; BYO phone and operator credit.

Feb 23, 202516 min
Read article

Browse the full Android SMS gateway knowledge base or return to how an Android SMS gateway works.

Get started

Test the gateway on your own Android phone

Install the app, pair one device, and validate your API flow before choosing a paid plan.

You supply the phone, SIM, and operator SMS credit.