Rasel / Docs
EN
GET/api/v2/messages/policies

List provider message policies

Returns the policies that define which message types each provider and channel allow (OTP, free text, template, and more). Useful before you build a dynamic send UI. Requires X-API-Key with messages:create and a verified phone.

When to use it. When your system must know what each channel can send without a failed trial.

Code example

Correct: List policies

curl --location 'https://raselsms.com/api/v2/messages/policies' \--header 'X-API-Key: YOUR_API_KEY'

Incorrect: Incorrect: no API key

curl --location 'https://raselsms.com/api/v2/messages/policies' \--header 'X-API-Key: YOUR_API_KEY'

The route requires X-API-Key and messages:create.

Response example

200 — List policies

{  "success": true,  "data": [    {      "providerKey": "sms_mtn",      "channel": "sms_syria",      "enabled": true,      "allowedTypes": [        "otp",        "utility",        "marketing",        "free_text"      ],      "sendModeByType": {        "otp": "plain_text",        "utility": "template_optional",        "marketing": "template_optional",        "free_text": "plain_text"      },      "requiresApprovedTemplate": false,      "supportsUserSender": true,      "supportsSystemSenderFallback": true,      "priorityOrder": 1,      "retryPolicy": {        "maxAttempts": 2,        "backoffMs": 500      }    }  ]}

401 — Incorrect: no API key

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "UNAUTHORIZED",  "error": "Missing or invalid API key"}

The route requires X-API-Key and messages:create.

403 — Phone is not verified or the key lacks permission (usually messages:create or api_keys:read).

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "FORBIDDEN",  "error": "Phone not verified or missing permission"}

429 — Rate limit exceeded. Honor Retry-After when present.

{  "success": false,  "requestId": "msgreq_1739012345678_abc123",  "code": "RATE_LIMITED",  "error": "Rate limit exceeded",  "retryAfterSeconds": 30}

HTTP request

GET /api/v2/messages/policies

Request Headers

HeaderTypeDescription
X-API-KeystringYour Rasel API key. Send it on every documented request except inbound webhooks. *

Response Fields

FieldTypeDescriptionExample
successbooleanTrue when the operation succeeded, or when at least one batch recipient succeeded.
datajsonPrimary payload for list and snapshot endpoints.

Status Codes

StatusDescription
200Success.
401Missing or invalid API key.
403Phone not verified, missing permission, or the account cannot perform this action.
429Rate limit exceeded, or the maximum number of verification attempts was reached.

Try it

Request

GET /api/v2/messages/policies

Response

Send a request to see the response.