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

# Notifications

> Get the status of messages sent through notifications

Use notifications to directly obtain the status of sent messages.

They allow you to obtain relevant information, such as the number of messages read from your individual, bulk, or campaign messages.

By using notifications, you can understand user behavior and use that information to improve your marketing campaign or choose a better message type to be more precise in your communications. You can get specific information about a notification by its ID or all notifications to populate your database or Dashboard.

***

## Get Notifications

This endpoint allows you to retrieve previously sent notifications.

```
GET https://api.jelou.ai/v1/external/bots/{botId}/notifications
```

### Path Parameters

| Property  | Type   | Description | Required |
| --------- | ------ | ----------- | -------- |
| **botId** | string | Bot ID.     | Yes      |

### Query Parameters

| Property        | Type   | Description                 | Required |
| --------------- | ------ | --------------------------- | -------- |
| **messageId**   | string | Message ID.                 | No       |
| **campaignId**  | string | Campaign ID.                | No       |
| **elementName** | string | Element name.               | No       |
| **from**        | date   | Start date.                 | No       |
| **to**          | date   | End date.                   | No       |
| **limit**       | number | Pagination limit (Max: 50). | No       |
| **page**        | number | Page number (Default: 1).   | No       |

### Request Example

```bash theme={null}
curl --request GET \
  --url 'https://api.jelou.ai/v1/external/bots/BOT_ID/notifications?limit=50&from=2024-01-01&to=2024-12-31&page=1' \
  --header 'Authorization: Basic {{Base64EncodedUsername:Password}}'
```

***

## Message status list

| Status              | Description                           |
| ------------------- | ------------------------------------- |
| `DELIVERED_CHANNEL` | The message was received by WhatsApp. |
| `DELIVERED_USER`    | The message was received by the user. |
| `READ`              | The user read the message.            |
| `REPLY`             | The user replied to the message.      |
| `CREATED`           | The message was received by Jelou.    |
| `FAILED`            | The message could not be delivered.   |

***

## Message read status

| Status  | Description                        |
| ------- | ---------------------------------- |
| `true`  | The user read the message.         |
| `false` | The user has not read the message. |

***

## API Responses

The payload contains the following fields:

| Property              | Description                                           |
| --------------------- | ----------------------------------------------------- |
| **sentStatus**        | Template delivery status.                             |
| **createdAt**         | Message send date.                                    |
| **deliveryChannelAt** | Delivery date to the WhatsApp channel.                |
| **deliveryUserAt**    | Message delivery date by WhatsApp.                    |
| **readAt**            | Date the message was read by the user.                |
| **destination**       | User's phone number.                                  |
| **elementName**       | Template name.                                        |
| **id**                | Message ID.                                           |
| **error**             | Reason for template delivery failure (if applicable). |
| **reply**             | User's response (available when status is `REPLY`).   |

***

## Metrics analysis

<Tip>
  Analyze delivery, read, and response rates to optimize future campaigns.
</Tip>

Use notification data to:

* **Measure engagement**: Calculate the percentage of messages read vs. delivered.
* **Identify issues**: Detect invalid or blocked numbers through `FAILED` errors.
* **Optimize schedules**: Analyze timestamps to find the best send times.
* **Improve content**: Use responses (`REPLY`) to understand which messages generate the most interaction.
