> For the complete documentation index, see [llms.txt](https://docs.antbuddy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antcrm/15.-api-get-zns-messages.md).

# 15. API get ZNS Messages

## API Documentation - ZNS Messages

This API endpoint retrieves a list of Zalo Notification Service (ZNS) messages filtered by campaign and date range.

### Endpoint

GET <https://apiring.antbuddy.com/znsmsg>

### Headers

| Name         | Required | Description                         |
| ------------ | -------- | ----------------------------------- |
| Content-Type | Yes      | application/json                    |
| apikey       | Yes      | Valid API key assigned to the user. |

### Query Parameters

| Name      | Type               | Required | Description                                  |
| --------- | ------------------ | -------- | -------------------------------------------- |
| campaign  | string             | No       | Campaign name or code to filter.             |
| dateStart | number (timestamp) | No       | Start date (Unix timestamp in milliseconds). |
| dateEnd   | number (timestamp) | No       | End date (Unix timestamp in milliseconds).   |
| limit     | number             | No       | Max records per page (default: 50).          |
| page      | number             | No       | Page number (default: 1).                    |

### Request Example

curl --request GET \\\
&#x20; \--url '<https://apiring.antbuddy.com/znsmsg?campaign=Davylaw\\_Copy\\&dateStart=1762362000000\\&dateEnd=1762880400000\\&limit=100\\&page=2>' \\\
&#x20; \--header 'Content-Type: application/json' \\\
&#x20; \--header 'apikey: YOUR\_API\_KEY'<br>

### Response Example (200 OK)

{\
&#x20; "success": true,\
&#x20; "data": \[]\
}\ <br>

### Response Codes

| Code                      | Description                    |
| ------------------------- | ------------------------------ |
| 200 OK                    | Success, returns message list. |
| 400 Bad Request           | Missing or invalid parameters. |
| 401 Unauthorized          | Missing or invalid API key.    |
| 404 Not Found             | No data found.                 |
| 500 Internal Server Error | Server-side error.             |

\ <br>
