Numbers

Unsubscribe a number

POSThttps://api.smsedge.com/v1/numbers/unsubscribe/

Adds a phone number to your unsubscribers so you do not send messages to it.

After this call, Send a single SMS to this number fails with the error You're trying to send to an unsubscribed number. If the number is already unsubscribed, the call still returns 200.

Body params (form)

  • numberstringrequired

    Phone number, digits only. Do not send spaces or dashes.

  • countrystringoptional

    ISO 3166-1 alpha-2 country code. Use it when the number is in local format.

  • country_idintegeroptional

    SMSEdge country ID. Used only when country is not sent.

Responses

  • 200The number is unsubscribed.
  • 400The number is missing or not valid, or the country is not known.
  • 503The number could not be unsubscribed. Note: errors is a string here, not an array.
curl -X POST "https://api.smsedge.com/v1/numbers/unsubscribe/" \
  -H "X-API-KEY: YOUR_API_KEY" \
  --data-urlencode "number=447700900123"
[
  {
    "success": true,
    "data": [],
    "errors": [],
    "response": {
      "code": 200,
      "description": "OK",
      "date": "2026-11-16 14:35:00"
    },
    "api": {
      "version": "v1",
      "module": "numbers",
      "function": "unsubscribe"
    },
    "user": {
      "id": 12345
    }
  }
]

All requests need your API key in the X-API-KEY header. See Authentication.