> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Status codes and errors

> HTTP status codes, error formats and how to read responses.

## HTTP status codes

| Code | Meaning | Possible cause |
| - | - | - |
| `200` | OK | Request accepted. |
| `400` | Bad Request | Invalid JSON or missing fields. |
| `401` | Unauthorized | Invalid or missing token. |
| `403` | Forbidden | Request came from a restricted IP address. |
| `422` | Unprocessable Entity | Invalid numbers or fields, or invalid message content. |
| `500` | Internal Server Error | Server-side issue. |

> [!NOTE]
>
> These are standard HTTP status codes. Other codes in the 1xx to 5xx ranges can also occur.

## Accepted does not mean delivered

A `success` or `submitted` status means CPaaS+ accepted the message. Delivery results arrive later and are read from the channel's status endpoint.

## Partial success on SMS

The SMS template, open-text and bulk endpoints return `200` even when some recipients fail. Always check each entry in `data`:

```json theme={null}
{
  "status": "success",
  "message": "Messages are sent successfully.",
  "data": [
    { "status": "submitted", "message_id": "d0056007-2e32-44fa-beb7-1dbdfb0d8bc2", "number": "91XXXXXXXXXX", "units": 1, "received_at": "2026-03-25 20:13:54" },
    { "status": "failed", "message_id": null, "number": "9199", "units": 0, "error": "Invalid phone number", "received_at": "2026-03-25 20:13:54" }
  ]
}
```

## Error formats

Errors come in two shapes, depending on where the failure is detected.

> [tab] Validation errors
>
> Returned when a field is missing or invalid. `errors` lists the failing fields.
>
> ```json theme={null}
> {
>   "message": "The text field is required.",
>   "errors": { "text": ["The text field is required."] }
> }
> ```

> [tab] Platform errors
>
> Returned when a resource is missing or inactive, such as a template.
>
> ```json theme={null}
> {
>   "status": "error",
>   "error_code": 422,
>   "error_message": "Template not found or inactive"
> }
> ```

Each channel guide lists the specific error messages and how to resolve them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.