> For the complete documentation index, see [llms.txt](https://docs.channel360.co.za/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channel360.co.za/api-usage/troubleshooting.md).

# Troubleshooting and error messages

Every error message the Channel360 API returns, why it happens and what to do.

{% hint style="info" %}
**Got `201` but nothing arrived?** Jump to [Sending notifications](#sending-notifications), last row.
{% endhint %}

## Access

| What you see                     | Why                                                                    | What to do                                                                                                                          |
| -------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **401 / 403** unauthorised       | The API key is missing, incorrect, or belongs to another organisation. | Check the `Authorization: Bearer …` header and the organisation ID. See [Authentication](/api-usage/get-started/authentication.md). |
| **400** `Organization Not Found` | The organisation ID in the URL does not exist.                         | Copy the Organisation API URL again.                                                                                                |

## Sending notifications

| What you see                                                               | Why                                                            | What to do                                                                                                                                                                                                                                  |
| -------------------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **400** `Destination is required`                                          | `destination` is missing or empty.                             | Add the recipient's number.                                                                                                                                                                                                                 |
| **400** `Message must be provided` or `Message must be a non-empty object` | `message` is missing, empty, or not an object.                 | Send the `message` object shown in [Send a template notification](/api-usage/send-a-template-notification.md).                                                                                                                              |
| **400** `Message type must be "template" (or provide a valid override)`    | `message.type` is not `"template"`.                            | Set `"type": "template"`.                                                                                                                                                                                                                   |
| **400** `Template name is required`                                        | `message.template.name` is missing.                            | Add the exact template name.                                                                                                                                                                                                                |
| **400** `Template language code must be provided`                          | `message.template.language.code` is missing.                   | Add `"language": { "code": "en" }`.                                                                                                                                                                                                         |
| **400** `Template components must be an array`                             | `components` is missing or is not a list.                      | Send a list. Use `[]` when there are no placeholders.                                                                                                                                                                                       |
| **400** `Could not find a valid template`                                  | Channel360 cannot find that template in your organisation.     | Check the name, underscores and case. Check the organisation ID. Templates created only in Meta's tools may not be available yet — see [Re-sync templates](/api-usage/manage-templates-through-the-api.md#re-sync-templates-from-whatsapp). |
| **201**, but no message arrives                                            | The request was accepted. WhatsApp later rejected the message. | Check parameter counts, language, public media links and template approval. Check your webhook for `notification:delivery:failure`.                                                                                                         |

## Replies

| What you see                                               | Why                                                                                              | What to do                                                                           |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| **400** `A customer must reply to the conversation first.` | This customer has never messaged you.                                                            | Send a template notification instead.                                                |
| **400** `The 24-hour chat window has expired`              | Their last message is more than 24 hours old.                                                    | Send a template notification, and reply when they answer.                            |
| **400** about an unsupported type                          | `type` is not a supported value.                                                                 | See the `type` table in [Reply to a customer](/api-usage/reply-to-a-customer.md).    |
| **400** with a WhatsApp error message and code             | WhatsApp rejected the message, for example a bad media link or a malformed `interactive` object. | Read the message. Check the link is public and the object matches WhatsApp's format. |
| **400** saying an integration is "not set up"              | WhatsApp is not connected for your organisation.                                                 | Contact Channel360 support.                                                          |
| **429** `Rate limit hit (meta code …)`                     | WhatsApp is limiting how fast your number can send. Nothing was sent.                            | Wait, then send again. There is no `Retry-After` header.                             |

## Webhooks

| What you see                  | Why                                                                      | What to do                                                                              |
| ----------------------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
| Nothing arrives               | Wrong URL, the URL is not public, or the event is not ticked.            | Check **Settings → Developer Settings → Delivery Logs**, and the events on the webhook. |
| The same event arrives twice  | A retry after a slow or failed response.                                 | Ignore repeats using the `X-Channel360-Delivery-Id` header.                             |
| Events stop after one attempt | Your server returned a `4xx`.                                            | Return `2xx` for everything you receive, even events you ignore.                        |
| **400** when registering      | `target` is missing, `triggers` is empty, or the `name` is already used. | Fix the body. Use a different `name`, or send the matching `id`.                        |

## Templates

| What you see                                        | Why                                                            | What to do                                                                                                                                                    |
| --------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **400** on create, naming a `field`                 | A required field is missing, or `name` has invalid characters. | Fix the named field.                                                                                                                                          |
| **400** `Organization is not connected to Whatsapp` | WhatsApp is not connected for this organisation.               | Contact Channel360 support. Create the template in the web app meanwhile.                                                                                     |
| The template stays `PENDING`                        | WhatsApp has not reviewed it yet.                              | Wait for the `template:status` event.                                                                                                                         |
| The template is `REJECTED`                          | It breaks Meta's rules.                                        | Read [Meta's template guidelines](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines/), then create a corrected copy with a new name. |
