# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antcrm/15.-api-get-zns-messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
