Numberly
Settings

STOP Mentions

Creating SMS Marketing campaigns via the NMP API necessitates compliance with legal opt-out regulations. This requires the mandatory inclusion of a 'STOP' mention at the end of the message. Unlike a simple string manually appended to the text, the NMP API treats these mentions as independent resources. To create a valid SMS campaign, you must retrieve the identifier (id) of the 'STOP' mention configured for your group and inject it into the creation payload.

Retrieving STOP Mentions

The {subdomain}.api.numberly.com/v1/settings/groups/{id}/optout-texts endpoint allows you to list the available STOP mentions for a given group.

Technical Definition

  • HTTP Method: GET
  • Endpoint: {subdomain}.api.numberly.com/v1/settings/groups/{id}/optout-texts
  • Security: Bearer Token (OAuth2)

Parameters

ParameterLocationTypeRequiredDescription
idPathstringYesThe group identifier (e.g., 65df0637...).
limitQueryintegerNoNumber of items per page (default: 20).
pageQueryintegerNoPage number (default: 1).

Request Example

curl -X GET "https://{subdomain}.api.numberly.com/v1/settings/groups/65df06372b43d70716133716/optout-texts" \
  -H "Authorization: Bearer <VOTRE_TOKEN>" \
  -H "Content-Type: application/json"

Response Structure

The response contains a list of OptoutText objects. The crucial piece of information is the id, which will be used during campaign creation.

{
  "objects": [
    {
      "id": 45,
      "text": "Reply STOP to optout",
      "description": "English - Generic",
      "group_id": "65df06372b43d70716133716"
    },
    {
      "id": 46,
      "text": "STOP au 36XXX",
      "description": "France - Standard",
      "group_id": "65df06372b43d70716133716"
    }
  ],
  "metadata": {
    "timestamp": 1744375392.0
  },
  "pagination": {
    "total": 2,
    "limit": 20,
    "page": 1
  }
}

STOP Mention Application Logic

The choice and mandatory nature of the STOP mention depend on your group's configuration (international sending authorization) and the use of an OADC (custom sender, e.g., "BRAND").

The API performs consistency checks according to the following matrix:

International authorized?OADC specified?Expected behavior
YesYesThe STOP mention is mandatory. It applies only to non-French numbers. French numbers will automatically use the short format (e.g., STOP 36xxx).
YesNoThe STOP mention is mandatory and will be applied to all numbers.
NoYesNo specific mention can be specified. The system will force the short format (e.g., STOP 36xxx).
NoNoThe STOP mention is mandatory.

Note on length: During campaign validation, the API verifies that the concatenation of your message content (text) and the STOP mention (optout_text_id) does not exceed the authorized character limit (generally 160 characters for 1 SMS, or multiples for concatenated SMS).