Contents

Bulk8 endpoints

Bulk campaigns and the opt-out list.

Base URLhttps://sms21.in

List campaigns

get/v1/sms/bulk

Scopereports:read

Campaigns of the key’s project, newest first.

Parameters4

  • statusquerystring

    Only campaigns in this state.

  • limitqueryinteger
  • cursorquerystring

    pagination.nextCursor of the previous page.

  • pagequeryinteger

    Page number (1-based) for numbered pagination with pagination.total. Ignored with cursor; to read everything, follow cursor instead (faster on large lists).

Responses

  • 200

    A page of campaigns.

  • 400

    Invalid filter or cursor.

    Example
    Response 400
    {
      "success": false,
      "error": {
        "code": "VALIDATION_FAILED",
        "message": "Invalid cursor",
        "details": [
          {
            "field": "cursor",
            "message": "cursor is invalid or expired"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X GET "https://sms21.in/v1/sms/bulk" \
  -H "X-API-Key: $SMS21_API_KEY"
Response 200
{
  "success": true,
  "data": [
    {
      "batchId": "bat_01k55q8y4m3d9v7x2c6b0n1r8t",
      "name": "October offers",
      "status": "queued",
      "environment": "live",
      "channel": "sms",
      "type": "promotional",
      "deviceId": null,
      "templateId": "tmpl_01k55q8y4m3d9v7x2c6b0n1r8t",
      "senderId": "ACMESHOP",
      "scheduledAt": null,
      "counts": {
        "recipients": 2500,
        "expanded": 0,
        "skipped": 12,
        "pending": 2488
      },
      "failure": null,
      "createdAt": "2026-09-15T10:30:00.000Z",
      "startedAt": null,
      "completedAt": null,
      "cancelledAt": null
    }
  ],
  "pagination": {
    "limit": 20,
    "hasMore": false,
    "nextCursor": null
  }
}

Create a bulk campaign

post/v1/sms/bulk

Scopesms:bulk

Queues a campaign (202 Accepted). SMS21 creates the individual messages in the background, so the response carries counts, not messages.

Send exactly one of:

  • templateId + per-recipient variables: an approved template. Required for live SMS to DLT countries (India). Promotional templates are allowed here (and only here).
  • text: the same free text for every recipient (test keys and destinations without DLT rules).

Duplicate numbers are collapsed. Numbers on the suppression list or blocked for your account are accepted and reported as skipped rather than failing the campaign.

Money is held per message as the campaign is expanded, not for the whole campaign up front: if the wallet runs out, the campaign stops with failure.code = INSUFFICIENT_BALANCE and the remaining recipients are cancelled.

Parameters1

  • Idempotency-Keyheaderstring

    Makes the request safe to retry: repeating it with the same key and body returns the original result (with Idempotent-Replayed: true) instead of sending again. Use one key per logical message, e.g. derived from your order or login-attempt ID. Reusing a key with a different body is 409 IDEMPOTENCY_KEY_REUSED.

Body7

  • listIdstring

    lst_… — send to a saved contact list instead of listing recipients. Mutually exclusive with recipients.

  • namestring

    Label shown in reports.

  • templateIdstring

    Approved template (transactional or promotional).

  • textstring

    The same text for every recipient.

  • senderIdstring

    Free text only; template campaigns use the registered header.

  • scheduledAtstring (date-time)

    Send time. Omit to start immediately.

  • recipientsobject[]required

    Recipients; duplicates are collapsed. The maximum per campaign is set by SMS21 (5 000 by default).

    2 nested fields
    • tostringrequired
    • variablesobject

      Values for this recipient’s {{variables}}; template campaigns only.

Responses

  • 202

    Campaign accepted.

  • 400

    Invalid request, recipients or content.

    Example
    Response 400
    {
      "success": false,
      "error": {
        "code": "INVALID_RECIPIENT",
        "message": "The campaign contains numbers that are not valid mobile numbers",
        "details": [
          {
            "field": "recipients[3].to",
            "message": "must be a mobile number in international format"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 402

    Live keys only: the wallet cannot cover the message. Add funds; retrying will not help.

    Example
    Response 402
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_BALANCE",
        "message": "Insufficient wallet balance"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 404

    The template does not exist in this company.

    Example
    Response 404
    {
      "success": false,
      "error": {
        "code": "NOT_FOUND",
        "message": "Template not found"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 409

    Conflicting state.

    Example
    Response 409
    {
      "success": false,
      "error": {
        "code": "IDEMPOTENCY_KEY_REUSED",
        "message": "This Idempotency-Key was already used with a different request"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X POST "https://sms21.in/v1/sms/bulk" \
  -H "X-API-Key: $SMS21_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"October offers","templateId":"tmpl_01k55q8y4m3d9v7x2c6b0n1r8t","recipients":[{"to":"919876543210","variables":{"name":"Asha"}},{"to":"919812345678","variables":{"name":"Ravi"}}]}'
Response 202
{
  "success": true,
  "batchId": "bat_01k55q8y4m3d9v7x2c6b0n1r8t",
  "name": "October offers",
  "status": "queued",
  "environment": "live",
  "channel": "sms",
  "type": "promotional",
  "deviceId": null,
  "templateId": "tmpl_01k55q8y4m3d9v7x2c6b0n1r8t",
  "senderId": "ACMESHOP",
  "scheduledAt": null,
  "counts": {
    "recipients": 2500,
    "expanded": 0,
    "skipped": 12,
    "pending": 2488
  },
  "failure": null,
  "createdAt": "2026-09-15T10:30:00.000Z",
  "startedAt": null,
  "completedAt": null,
  "cancelledAt": null
}

Campaign progress

get/v1/sms/bulk/{batchId}

Scopereports:read

Counts move from pending to expanded while the campaign is sent. Delivery of each message is reported by webhooks or GET /messages.

Parameters1

  • batchIdpathstringrequired

    Campaign ID (bat_…).

Responses

  • 200

    The campaign.

  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 404

    Not found, or not visible to the API key project.

    Example
    Response 404
    {
      "success": false,
      "error": {
        "code": "NOT_FOUND",
        "message": "Message not found"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X GET "https://sms21.in/v1/sms/bulk/{batchId}" \
  -H "X-API-Key: $SMS21_API_KEY"
Response 200
{
  "success": true,
  "batchId": "bat_01k55q8y4m3d9v7x2c6b0n1r8t",
  "name": "October offers",
  "status": "queued",
  "environment": "live",
  "channel": "sms",
  "type": "promotional",
  "deviceId": null,
  "templateId": "tmpl_01k55q8y4m3d9v7x2c6b0n1r8t",
  "senderId": "ACMESHOP",
  "scheduledAt": null,
  "counts": {
    "recipients": 2500,
    "expanded": 0,
    "skipped": 12,
    "pending": 2488
  },
  "failure": null,
  "createdAt": "2026-09-15T10:30:00.000Z",
  "startedAt": null,
  "completedAt": null,
  "cancelledAt": null
}

Per-recipient outcome

get/v1/sms/bulk/{batchId}/recipients

Scopereports:read

The message created for each recipient, or why the number was skipped (opted out, blocked destination).

Parameters5

  • batchIdpathstringrequired

    Campaign ID (bat_…).

  • statusquerystring

    Only recipients in this state.

  • limitqueryinteger
  • cursorquerystring

    pagination.nextCursor of the previous page.

  • pagequeryinteger

    Page number (1-based) for numbered pagination with pagination.total. Ignored with cursor; to read everything, follow cursor instead (faster on large lists).

Responses

  • 200

    A page of recipients.

  • 400

    Invalid filter or cursor.

    Example
    Response 400
    {
      "success": false,
      "error": {
        "code": "VALIDATION_FAILED",
        "message": "Invalid cursor",
        "details": [
          {
            "field": "cursor",
            "message": "cursor is invalid or expired"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 404

    Not found, or not visible to the API key project.

    Example
    Response 404
    {
      "success": false,
      "error": {
        "code": "NOT_FOUND",
        "message": "Message not found"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X GET "https://sms21.in/v1/sms/bulk/{batchId}/recipients" \
  -H "X-API-Key: $SMS21_API_KEY"
Response 200
{
  "success": true,
  "data": [
    {
      "to": "919876543210",
      "status": "expanded",
      "messageId": "msg_01k55q8y4m3d9v7x2c6b0n1r8t",
      "reason": null
    },
    {
      "to": "919812345678",
      "status": "skipped",
      "messageId": null,
      "reason": "Number is on this company’s suppression list"
    }
  ],
  "pagination": {
    "limit": 20,
    "hasMore": false,
    "nextCursor": null
  }
}

Cancel a campaign

post/v1/sms/bulk/{batchId}/cancel

Scopesms:bulk

Cancels recipients that have not been expanded yet. Messages already handed to a provider are never recalled — SMS21 does not claim to stop what is already sent.

Parameters1

  • batchIdpathstringrequired

    Campaign ID (bat_…).

Responses

  • 200

    The cancelled campaign.

  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 404

    Not found, or not visible to the API key project.

    Example
    Response 404
    {
      "success": false,
      "error": {
        "code": "NOT_FOUND",
        "message": "Message not found"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 409

    The campaign has already finished.

    Example
    Response 409
    {
      "success": false,
      "error": {
        "code": "BATCH_NOT_CANCELLABLE",
        "message": "This campaign is already completed"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X POST "https://sms21.in/v1/sms/bulk/{batchId}/cancel" \
  -H "X-API-Key: $SMS21_API_KEY"
Response 200
{
  "success": true,
  "batchId": "bat_01k55q8y4m3d9v7x2c6b0n1r8t",
  "name": "October offers",
  "status": "cancelled",
  "environment": "live",
  "channel": "sms",
  "type": "promotional",
  "deviceId": null,
  "templateId": "tmpl_01k55q8y4m3d9v7x2c6b0n1r8t",
  "senderId": "ACMESHOP",
  "scheduledAt": null,
  "counts": {
    "recipients": 2500,
    "expanded": 0,
    "skipped": 12,
    "pending": 2488
  },
  "failure": null,
  "createdAt": "2026-09-15T10:30:00.000Z",
  "startedAt": null,
  "completedAt": null,
  "cancelledAt": "2026-09-15T10:30:00.000Z"
}

List opt-outs

get/v1/suppressions

Scopereports:read

Parameters3

  • limitqueryinteger
  • cursorquerystring

    pagination.nextCursor of the previous page.

  • pagequeryinteger

    Page number (1-based) for numbered pagination with pagination.total. Ignored with cursor; to read everything, follow cursor instead (faster on large lists).

Responses

  • 200

    A page of entries.

  • 400

    Invalid number.

    Example
    Response 400
    {
      "success": false,
      "error": {
        "code": "INVALID_RECIPIENT",
        "message": "The number is not a valid mobile number",
        "details": [
          {
            "field": "mobile",
            "message": "must be a mobile number in international format"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X GET "https://sms21.in/v1/suppressions" \
  -H "X-API-Key: $SMS21_API_KEY"
Response 200
{
  "success": true,
  "data": [
    {
      "to": "919876543210",
      "reason": "replied STOP",
      "source": "api",
      "createdAt": "2026-09-15T10:30:00.000Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "hasMore": false,
    "nextCursor": null
  }
}

Add a number to the opt-out list

post/v1/suppressions

Scopesms:bulk

Campaign recipients on this list are never sent to. Adding a number twice is not an error. Single sends through POST /sms/send are transactional and are not filtered.

Body2

  • mobilestringrequired
  • reasonstring

Responses

  • 201

    The entry.

  • 400

    Invalid filter or cursor.

    Example
    Response 400
    {
      "success": false,
      "error": {
        "code": "VALIDATION_FAILED",
        "message": "Invalid cursor",
        "details": [
          {
            "field": "cursor",
            "message": "cursor is invalid or expired"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X POST "https://sms21.in/v1/suppressions" \
  -H "X-API-Key: $SMS21_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"919876543210","reason":"replied STOP"}'
Response 201
{
  "success": true,
  "to": "919876543210",
  "reason": "replied STOP",
  "source": "api",
  "createdAt": "2026-09-15T10:30:00.000Z"
}

Remove a number from the opt-out list

delete/v1/suppressions/{mobile}

Scopesms:bulk

Parameters1

  • mobilepathstringrequired

    Number in E.164 digits without "+".

Responses

  • 204

    Removed; campaigns may send to this number again.

  • 401

    The API key is missing, malformed, unknown, revoked or expired.

    Example
    Response 401
    {
      "success": false,
      "error": {
        "code": "AUTHENTICATION_REQUIRED",
        "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\""
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 403

    The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.

    Example
    Response 403
    {
      "success": false,
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "This API key does not have the required scope",
        "details": [
          {
            "message": "requires scope sms:send"
          }
        ]
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 404

    The number is not on the list.

    Example
    Response 404
    {
      "success": false,
      "error": {
        "code": "NOT_FOUND",
        "message": "This number is not on the suppression list"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 429

    Rate limited. Wait Retry-After seconds, then retry with the same Idempotency-Key.

    Example
    Response 429
    {
      "success": false,
      "error": {
        "code": "RATE_LIMITED",
        "message": "Rate limit exceeded for this API key"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
  • 503

    Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.

    Example
    Response 503
    {
      "success": false,
      "error": {
        "code": "SERVICE_UNAVAILABLE",
        "message": "Service temporarily unavailable"
      },
      "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d"
    }
curl -X DELETE "https://sms21.in/v1/suppressions/{mobile}" \
  -H "X-API-Key: $SMS21_API_KEY"