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

# API responses

> HTTP status codes and API responses returned by the MOJA Chat and Broadcast APIs.

This section describes HTTP status codes and corresponding API responses returned by the MOJA APIs.

***

## Success responses

Successful requests return **HTTP `200`**. What the response contains depends on the operation:

| Operation                             | What you get back                                                      |
| ------------------------------------- | ---------------------------------------------------------------------- |
| **Send session message**              | Confirmation that the message was sent                                 |
| **Get active sessions**               | List of active chat sessions                                           |
| **List message templates**            | Paginated template list                                                |
| **Send template message**             | Template broadcast result with validation and pricing details          |
| **Inbound message callback**          | Your server should respond with `200` and an acknowledgement JSON body |
| **Template delivery report callback** | Your server should respond with `200` after receiving the DLR payload  |

***

## Authentication errors

| HTTP status | Description                                                                 |
| ----------- | --------------------------------------------------------------------------- |
| `401`       | Invalid Authentication Parameters (`api_key` or `secret_key` is incorrect). |
| `400`       | No authorization headers provided.                                          |

### Authentication error example

```json theme={null}
HTTP/1.1 401 Unauthorized
{
  "code": 120,
  "message": "Invalid Authentication Parameters"
}
```

***

## Validation errors

| HTTP status | Description                                      |
| ----------- | ------------------------------------------------ |
| `400`       | Bad Request — invalid or malformed request body. |

***

## Not found errors

| HTTP status | Description                                    |
| ----------- | ---------------------------------------------- |
| `404`       | The session has expired or resource not found. |

***

## General errors

| HTTP status | Description            |
| ----------- | ---------------------- |
| `500`       | Internal Server Error. |

***

## Related

* [Authentication](/guides/moja/authentication) — API credentials and access tokens
* [Send session message](/guides/moja/send-session-message) — session messaging API
* [Send template](/guides/moja/send-template) — WhatsApp template broadcast
