New: every plan now includes free incoming texts and rollover credits. See pricing →
Search Help Center Documentation

Guide

Compliance

SMSBlast enforces the texting rules for you. Here is what that means for your code.

Texts only go to subscribed contacts#

  • Every text goes to a contact who is subscribed. POST /v1/messages to anyone else is refused: not_a_contact for a number that is not a contact, unsubscribed for someone who opted out (both 409).
  • Campaigns and workflows skip anyone who is not subscribed.
  • A text already queued for someone who then opts out is not sent: it becomes skipped and its credits come back.
curl -X POST https://app.smsblast.net/v1/contacts \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+14155550101",
    "firstName": "Alice",
    "consent": {
      "attested": true,
      "source": "Checkout opt-in box"
    }
  }'
const res = await fetch('https://app.smsblast.net/v1/contacts', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    phone: '+14155550101',
    firstName: 'Alice',
    consent: {
      attested: true,
      source: 'Checkout opt-in box',
    },
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/contacts",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "phone": "+14155550101",
        "firstName": "Alice",
        "consent": {
            "attested": True,
            "source": "Checkout opt-in box",
        },
    },
)
print(res.status_code, res.json())

STOP, HELP and START are handled for you#

  • STOP, and the other opt-out words (STOPALL, UNSUBSCRIBE, CANCEL, END, QUIT, REVOKE, OPT OUT), unsubscribe the person at once.
  • HELP (or INFO) gets an automatic answer with your business name and your support contact from your account settings.
  • START (or UNSTOP, YES) brings back someone who opted out by text.
  • A text that mentions stopping without being one of these words, such as “please remove me”, is not acted on automatically. It is flagged for a person to read: GET /v1/messages/inbound?review=true.
  • These words cannot be used as signup keywords. Every incoming text, these included, is sent to the message.received webhook.

Opt-outs last until the person opts back in#

  • Nobody who opted out can be resubscribed by you: not with the API, an import or the dashboard. Only their own action brings them back: texting START or a signup keyword, or filling in one of your signup forms.
  • Importing a list never resubscribes anyone. A STOP from a number that is not a contact yet is remembered, so a later import cannot text them either.
  • You can unsubscribe people yourself, for example with POST /v1/contacts/bulk and the unsubscribe action.
  • Listen for contact.opted_out to keep your own systems in step.

Quiet hours#

  • Campaign and workflow texts only go out between 8am and 9pm in each recipient's time zone (the contact's timezone, or your account's when it is not known). Outside those hours they wait for the next 8am there.
  • Texts sent with POST /v1/messages go out at any hour, because they are usually answers to something the person did. Send respectQuietHours: true to hold one until 8am to 9pm in the contact's time zone; do that for anything that is not an answer.

Your part#

  • Only add people who agreed to get your texts, and record where they agreed.
  • Say who you are and how to stop in your texts, for example “Reply STOP to opt out.”
  • For the full picture, read the SMS compliance guide.