eventTypes parameter, you can retrieve a complete view of all activities including incoming messages, message status updates, and other events within your specified time range.| Parameter | Type | Description |
|---|---|---|
fromDate | integer | Start date in Ticks format (100-nanosecond intervals since January 1, 0001 UTC). If omitted, retrieves logs from the beginning of available data. |
toDate | integer | End date in Ticks format. If omitted, retrieves logs up to the current time. |
phoneNumberId | string | Filter logs for a specific WhatsApp Business phone number ID |
url | string | Filter logs for a specific webhook URL (must be URL encoded) |
pageSize | integer | Number of log entries to return per page. Default: 20, Maximum: 20 |
nextPageToken | string | Token for pagination to retrieve the next page of results. Use the next_page_token value from the previous response. |
fromDate and toDate parameters use Ticks format, representing 100-nanosecond intervals since January 1, 0001 at 00:00:00 UTC.638000000000000000 represents a specific timestamp in this format.{
"message": "Notification logs retrieved successfully",
"data": {
"logs": [
{
"project_id": "12345",
"phone_number_id": "123456789012345",
"event_type": "Message Status",
"payload": "{\"object\":\"whatsapp_business_account\",\"entry\":[{\"id\":\"123456789012345\",\"changes\":[{\"field\":\"messages\",\"value\":{\"messaging_product\":\"whatsapp\",\"metadata\":{\"display_phone_number\":\"15551234567\",\"phone_number_id\":\"123456789012345\"},\"statuses\":[{\"id\":\"msg_ABC123XYZ\",\"recipient_id\":\"1234567890\",\"status\":\"failed\",\"timestamp\":\"1704067200\",\"errors\":[{\"code\":132001,\"title\":\"(#132001) Template name does not exist in the translation\",\"message\":\"(#132001) Template name does not exist in the translation\",\"error_data\":{\"details\":\"template name (Appointment Reminders) does not exist in en_US\"}}]}]}}]}]}",
"created_at": 638500000000000000,
"direction": 1,
"flyout_delivery_status": "-",
"flyout_delivery_response": "-",
"flyout_delivery_response_code": 0,
"flyout_url": "-"
},
{
"project_id": "12345",
"phone_number_id": "123456789012345",
"event_type": "Incoming Message",
"payload": "{\"object\":\"whatsapp_business_account\",\"entry\":[{\"id\":\"123456789012345\",\"changes\":[{\"field\":\"messages\",\"value\":{\"messaging_product\":\"whatsapp\",\"metadata\":{\"display_phone_number\":\"15551234567\",\"phone_number_id\":\"123456789012345\"},\"contacts\":[{\"wa_id\":\"1234567890\",\"profile\":{\"name\":\"John Doe\"}}],\"messages\":[{\"from\":\"1234567890\",\"id\":\"wamid.HBgMDEyMzQ1Njc4OTAFQIAEhgWM0VCMDI5NTg3MDU0MDIxQUVCMzA0RgA=\",\"timestamp\":\"1704067200\",\"type\":\"text\",\"text\":{\"body\":\"Hello, this is a test message\"}}]}}]}]}",
"created_at": 638500000100000000,
"direction": 1,
"flyout_delivery_status": "-",
"flyout_delivery_response": "-",
"flyout_delivery_response_code": 0,
"flyout_url": "-"
}
],
"next_page_token": "eyJQcm9qZWN0SWQiOnsiTiI6IjEyMzQ1In0sIkNyZWF0ZWRBdCI6eyJOOiI2Mzg1MDAwMDAwMDAwMDAwMCJ9fQ=="
}
}message (string): Success message indicating the operation resultdata (object): Container for the response datadata.logs (array): Array of log entries matching the query criteriadata.next_page_token (string): Token for pagination to retrieve the next pagelogs array contains:| Field | Type | Description |
|---|---|---|
project_id | string | The project identifier |
phone_number_id | string | The WhatsApp Business phone number ID |
event_type | string | Type of event: "Incoming Message", "Message Status", or "Other" |
payload | string | JSON string containing the full webhook payload |
created_at | integer | Timestamp in Ticks format when the log entry was created |
direction | integer | Message direction (1 = incoming) |
flyout_delivery_status | string | Delivery status for flyout notifications |
flyout_delivery_response | string | Delivery response for flyout notifications |
flyout_delivery_response_code | integer | HTTP response code for flyout delivery |
flyout_url | string | URL for flyout notifications |
next_page_token. To retrieve the next page, include the nextPageToken parameter in your request:next_page_token is returned in the response.{
"message": "Invalid request parameters",
"data": null
}{
"message": "Unauthorized"
}{
"message": "Forbidden"
}{
"message": "Internal server error",
"data": null
}payload field is a JSON string that must be parsedphoneNumberId or url to narrow resultsnext_page_token to retrieve all resultscurl --location --request GET 'https://api.sendzen.io/v1/logs?fromDate=ticksTime&toDate=ticksTime' \
--header 'Authorization: Bearer <token>'{
"message": "string",
"data": {
"logs": [
{
"project_id": "string",
"phone_number_id": "string",
"event_type": "string",
"payload": "string",
"created_at": 0,
"direction": 0,
"flyout_delivery_status": "string",
"flyout_delivery_response": "string",
"flyout_delivery_response_code": 0,
"flyout_url": "string"
}
],
"next_page_token": "string"
}
}