# Send an SMS

https://docs.sendsms.to/en/api/send-sms/

`POST /v1/messages`

202 means accepted into the durable processing chain, not delivered to the handset. Insufficient funds can return402. Sender is selected per new message through from; this does not edit an already sent SMS.

Required permission: messages.send

## Parameters

- `Idempotency-Key` (header, optional): Retain one key for one logical request; the key is scoped to the authenticated account. Single send (prepaid or postpaid account) and batch items (idempotencyKey of each item): the same key with the same payload returns the original acknowledgement (202, the same messageId, duplicate:true) with no second send; the same key with a different payload returns 409 idempotency_conflict. Postpaid account: if the original send was refused with 402 insufficient_credit, a repeat with the same key returns 402 insufficient_credit again (with messageId and duplicate:true); after topping up, use a new key. 409 idempotency_in_progress (with Retry-After) and 409 payment_mode_changed carry retryable:true and create no message: repeat later with the same key and the same payload. A timeout does not prove rejection; query the known message ID before attempting another send. Do not assume exactly-once operator delivery. A header sent empty (or only spaces) is refused with 400 invalid_idempotency_key. When admission by capacity is switched on: a repeat with a key that already has a message is answered before the capacity check and is never refused by it; a request refused with 429 transactional_overloaded or 503 otp_capacity created nothing, so repeating it with the same key is safe.
- `X-Dry-Run` (header, optional): Optional. true — a trial request: every check of the real request is made (key, IP allowlist, permission, account, fields, sender, template, parts, price, funds), but nothing is executed — no message, no reservation, no queue, no data change, the Idempotency-Key is not taken. The answer has the real status and structure plus dryRun: true; identifiers in it are conditional (zero UUID). Refusals are the real ones. Any other value — 400 invalid_dry_run. Trial requests have their own, lower rate limit.

## Request body

| Field | Type | Description |
| --- | --- | --- |
| `channel` | string | required. This first documented transport is SMS; additional channels require explicit availability qualification. |
| `to` | string | required. International recipient number. |
| `from` | string | optional. Sender value: use an approved, unexpired Sender ID of your account, exactly as registered. Never an operator override. Limitation of the current version: country, operator and start date of a sender are not applied at sending. |
| `text` | string | optional. Message text. Required when templateId is not given; do not send it together with templateId. |
| `templateId` | string · uuid | optional. UUID of an approved, not archived template of your account. Required when text is not given; the message text is rendered from the template. |
| `variables` | object | optional. Template variable values by name. Required with templateId for every required variable of the template; phone is taken from to. |
| `trafficClass` | string | optional.  |

## Request example

```bash
curl --max-time 30 --request POST \
  --url 'https://api.sendsms.to/v1/messages' \
  --header "X-API-Key: $SENDSMS_API_KEY" \
  --header "Idempotency-Key: $(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)" \
  --header 'Content-Type: application/json' \
  --data '{
  "channel": "sms",
  "to": "994XXXXXXXXX",
  "from": "APPROVED_SENDER",
  "text": "Your order is ready",
  "trafficClass": "transactional"
}'
```

## Responses

### HTTP 202 — Successful result

```json
{
  "messageId": "00000000-0000-4000-8000-000000000001",
  "status": "queued"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `messageId` | string · uuid | required. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `status` | string | required. Original acknowledgement generated by SendSMS: queued means accepted for processing, not delivered. A replay may return this original acknowledgement after the message state has changed. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS on an idempotent replay. No new message was created by this acknowledgement. Absence is not delivery evidence. |
| `dryRun` | boolean | optional. Present only in the answer to a trial request (X-Dry-Run: true): nothing was executed; identifiers in this answer are conditional. |
| `from` | string | optional. SendSMS accounts only: the sender name the message went with — from the request, the default Sender ID for the API or the only approved name. |

### HTTP 400 — Invalid input, including invalid_number for an invalid recipient number.

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 401 — Invalid or revoked API key

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |

### HTTP 402 — Insufficient available funds or credit

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 403 — Insufficient key permissions or account/channel policy; or the request came from an IP address not allowed for this key (ip_not_allowed)

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 404 — Resource unavailable to this account

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 409 — Conflict

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 422 — Validation or eligibility failure

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 429 — Rate limit. When admission by capacity is switched on by the platform (off by default): also transactional_overloaded - the transactional queue is full, nothing was created; respect Retry-After and repeat with the same Idempotency-Key.

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |

### HTTP 503 — Temporarily unavailable. When admission by capacity is switched on by the platform (off by default): also otp_capacity - no capacity for one-time codes right now, nothing was created; repeat once after Retry-After, then use a fallback channel.

```json
{
  "error": "string"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | required. Error identifier or legacy human-readable text returned by SendSMS. Not every handler exposes a stable machine code here. Check HTTP status and documented identifiers; never parse translated prose as a permanent code. |
| `message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `code` | string | optional. Optional machine-readable code generated by SendSMS or its HTTP framework. Meaning depends on the operation; not a universal numeric provider code. |
| `statusCode` | integer | optional. Optional HTTP status number generated by the server framework for a framework-level error. The actual HTTP response status is authoritative. |
| `errors` | array<object> | optional. Optional field-validation issues generated by SendSMS, typically for template create/update. An absent array is not an empty successful result. |
| `errors[].field` | string | optional. Request field identified by the SendSMS validator, such as name or body. |
| `errors[].message` | string | optional. Optional explanation generated by SendSMS. Intended for people; wording/language may change. Absence means the handler supplied no separate explanation. |
| `missing` | array<string> | optional. Variable names SendSMS found missing from a template send/preview request. Present only for relevant template errors. |
| `invalid` | array<object> | optional. Invalid variable values identified by SendSMS, with variable name and validation reason. |
| `invalid[].name` | string | optional. Variable identifier derived from a {{placeholder}} in the template or built-in catalog; use it as a key in variables. Not a person’s actual name. |
| `invalid[].reason` | string | optional. SendSMS validation reason: value_too_long, invalid_characters or unsupported_type. It describes a variable value, not network delivery. |
| `retryable` | boolean | optional. Optional SendSMS hint that an operation may be retried after contention/unavailability. It never authorizes a new logical send with a different idempotency key. |
| `messageId` | string · uuid | optional. Message UUID created by SendSMS before durable admission. With an Idempotency-Key, a postpaid account (and a prepaid account in budget-enabled admission) gets the same ID for the same key within the authenticated account; without a key SendSMS generates a random UUID. Save it for status reads. It is not the operator’s message ID. |
| `duplicate` | boolean | optional. Optional true flag generated by SendSMS when a repeat with the same Idempotency-Key returns the stored refusal of a postpaid send (402 insufficient_credit). This answer created no new message. |
| `channel` | string | optional. Requested channel echoed by SendSMS in a channel-availability refusal. |
| `reasons` | array<string> | optional. SendSMS channel refusal reasons, such as globally disabled, not assigned, not implemented or not configured. These are platform policy results, not operator receipt codes. |
| `mnp` | string | optional. MNP decision state reported by SendSMS in an applicable network-lookup refusal. Not proof that an external provider was contacted. |
| `estimatedWaitSeconds` | integer | optional. Present with transactional_overloaded: the forecast wait in seconds (1 to 30), equal to the Retry-After header. |
