Get Message Sending History
This API helps you retrieve the message sending history of Official Accounts (OA) available in the system.
Endpoint
🔗Endpoint Staging
GET https://staging-manage.api.miniai.vn/api/external/zns-message/history
🔗Endpoint Production
GET https://manage-api.miniap.vn/api/external/zns-message/history
Query Parameters
The result is paginated and sorted by the most recent sending time.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | number | No | 1 | The page to retrieve. |
offset | number | No | 20 | Number of records per page. |
Example
GET https://manage-api.miniap.vn/api/external/zns-message/history?page=1&offset=20
Response
- Response
{
"histories": [
{
"_id": "68c8ee9a7a307c3674e986d0",
"phone": "0335214562",
"templateId": "462666",
"status": "RECEIVED",
"reason": "",
"sessionId": "cfcd208495d565ef66e7dff9f98764da",
"deliveryTime": "1726465200000",
"createdAt": "2025-09-16T05:00:00.000Z",
"updatedAt": "2025-09-16T05:00:42.000Z",
"id": "68c8ee9a7a307c3674e986d0"
},
{
"_id": "68c8ee047a307c3674e986c7",
"phone": "0335214562",
"templateId": "462666",
"status": "ERROR",
"reason": "{\"error\":\"Request failed with status code 401\",\"params\":{\"customer_fullname\":\"Lê Quốc An\",\"customer_phone\":\"0335214562\",\"order_code\":\"M0WHXJVU9L\"}}",
"sessionId": "",
"createdAt": "2025-09-16T04:56:36.717Z",
"updatedAt": "2025-09-16T04:56:36.717Z",
"id": "68c8ee047a307c3674e986c7"
},
{
"_id": "68c8ed287a307c3674e986c6",
"phone": "0335214562",
"templateId": "462666",
"status": "ERROR",
"reason": "{\"error\":\"Request failed with status code 401\",\"params\":{\"customer_fullname\":\"Lê Quốc An\",\"customer_phone\":\"0335214562\",\"order_code\":\"PJDMZ31UNS\"}}",
"sessionId": "",
"createdAt": "2025-09-16T04:52:56.010Z",
"updatedAt": "2025-09-16T04:52:56.010Z",
"id": "68c8ed287a307c3674e986c6"
},
{
"_id": "68c8ea80e08f8bdbb6a5998a",
"phone": "0335214562",
"templateId": "392688",
"status": "ERROR",
"reason": "{\"error\":\"Request failed with status code 401\",\"params\":{\"customer_name\":\"Lê Quốc An\",\"customer_id\":\"61BB35FA62\",\"event_name\":\"Invalid Date\",\"subtitle_event\":\"Invalid Date\",\"time_event\":\"Invalid Date\"}}",
"sessionId": "",
"createdAt": "2025-09-16T04:41:36.521Z",
"updatedAt": "2025-09-16T04:41:36.521Z",
"id": "68c8ea80e08f8bdbb6a5998a"
},
{
"_id": "68c8ea6ae08f8bdbb6a59989",
"phone": "0335214562",
"templateId": "438650",
"status": "ERROR",
"reason": "{\"error\":\"Request failed with status code 401\",\"params\":{\"customer_fullname\":\"Lê Quốc An\",\"order_code\":\"M0WHXJVU9L\",\"order_createdat\":\"16/09/2025\",\"order_price\":\"338400\",\"customer_id\":\"61BB35FA62\"}}",
"sessionId": "",
"createdAt": "2025-09-16T04:41:14.341Z",
"updatedAt": "2025-09-16T04:41:14.341Z",
"id": "68c8ea6ae08f8bdbb6a59989"
}
]
}
note
deliveryTime is the time Zalo confirmed the message was delivered (an epoch milliseconds string). This field is only present when the message is in the RECEIVED status.