SendZen API Documentation
Home
Getting StartedChangelog
Home
Getting StartedChangelog
Visit Website
Sign In
Create an account
  1. Activity Logs
  • Start Guide
    • Getting Started
    • API Reference
  • Messages
    • Template Messages
      • Send Text Message
      • Send Interactive Message
      • Send Media Message
    • Session Messages
      • Send Text Message
      • Send Image Message
      • Send Video Message
      • Send Audio Message
      • Send Document Message
      • Send Interactive Reply Message
    • Incoming Messages
      • Received Text Message
      • Received Message with Reaction
      • Received Media Message with Image
      • Received Callback from a Quick Reply Button Click
    • Other
      • Message Status & Typing Indicator
  • Template
    • List Templates
      GET
    • Create Template
      POST
    • Delete Template
      DELETE
    • Upload Media
      POST
  • Partner
    • Integration Guide
  • Project
    • Create Project
      POST
    • List Projects
      GET
    • Update Project
      PUT
    • Retrieve Project
      GET
  • WABA
    • List WABA
      GET
    • Retrieve WABA Details from Meta
      GET
    • Retrieve WhatsApp Business Profile Detail
      GET
    • Update WhatsApp Business Profile
      POST
    • Upload WhatsApp Business Profile
      POST
  • Activity Logs
    • All Event Logs
      GET
    • Incoming Message Logs
      GET
    • Message Status Logs
      GET
    • Other Event Logs
      GET
    • Multiple Event Types
      GET
  • Knowledge Base
    • Programming Languages
      • Python
      • Node.js
      • PHP
      • Laravel
      • Java
      • C# .NET
    • Product
      • Changelog
  • Schemas
    • Schemas
      • Template Message
      • 401/403 Message Response
      • AccountLoginRequest
      • APIKeyDto
      • ReadTypingIndicatorRequest
      • AccountRegisterRequest
      • TypingIndicator
      • PartnerConfigDto
      • LoginResponse
      • PartnerInfoDto
      • WABASignUp
      • OrderCheckoutDto
      • OrderDto
      • OrderStatusEnum
      • PaymentGatewayDto
    • Knowledge Base
    • Address
    • Account
    • CommonResponse
    • AccountDetailDto
    • CreateOrUpdateProjectRequest
    • Contact
    • Error
    • ContactName
    • Button
    • ErrorResponse
    • CarouselCard
    • Email
    • ClientData
    • Component
    • ProjectDetailDto
    • ProjectWABADetail
    • Interactive
    • WABADetail
    • InteractiveAction
    • WABADto
    • InteractiveBody
    • CreateTemplateRequest
    • InteractiveButton
    • InteractiveFooter
    • CreateWebhookConfigRequest
    • InteractiveHeader
    • InteractiveMedia
    • Example
    • InteractiveProductItem
    • InteractiveProductSection
    • InteractiveReply
    • InteractiveRow
    • InteractiveSection
    • Location
    • Media
    • MessageRequest
    • MessageResponse
    • MessageTemplate
    • Organization
    • LimitedTimeOffer
    • Phone
    • Reaction
    • Response
    • TemplateAction
    • NamedParameter
    • TemplateButtons
    • TemplateCarousel
    • TemplateComponent
    • TemplateCurrency
    • PaginatedWebhookLogsResponse
    • TemplateDateTime
    • PartnerClientSession
    • TemplateLimitedTimeOffer
    • PartnerClientSessionDto
    • TemplateMedia
    • TemplateParameter
    • TemplateProductItem
    • TemplateSection
    • TemplateTapTargetConfiguration
    • SupportedApp
    • Text
    • Url
    • WhatsAppBusinessProfile
    • UploadMedia
    • Webhook
    • WebhookConfigDto
    • WebhookLogDto
Home
Getting StartedChangelog
Home
Getting StartedChangelog
Visit Website
Sign In
Create an account
  1. Activity Logs

Message Status Logs

GET
https://api.sendzen.io/v1/logs

What Are Message Status Logs?#

Message status logs track the delivery lifecycle of messages you send through your WhatsApp Business Account. These logs provide real-time updates on whether your messages were successfully sent, delivered, read, or if they failed with specific error details.
Each status update represents a stage in the message delivery process, helping you monitor message performance and troubleshoot delivery issues.

Endpoint Details#

Endpoint: GET /v1/logs
Event Type Filter: eventTypes=Message%20Status (URL encoded)

Understanding Message Statuses#

The payload contains status information with the following possible values:
sent: Message was successfully sent from your account
delivered: Message was delivered to the recipient's device
read: Message was read by the recipient
failed: Message delivery failed (includes error details)

Request Parameters#

Required Parameters#

ParameterTypeDescription
eventTypesstringMust be Message%20Status (URL encoded)

Optional Parameters#

ParameterTypeDescription
fromDateintegerStart date in Ticks format (100-nanosecond intervals since January 1, 0001 UTC). If omitted, retrieves logs from the beginning of available data.
toDateintegerEnd date in Ticks format. If omitted, retrieves logs up to the current time.
phoneNumberIdstringFilter by specific WhatsApp Business phone number ID
urlstringFilter by specific webhook URL (URL encoded)
pageSizeintegerNumber of log entries to return per page. Default: 20, Maximum: 20
nextPageTokenstringToken for pagination to retrieve the next page of results. Use the next_page_token value from the previous response.

Date Range Format#

Dates use Ticks format (100-nanosecond intervals since January 1, 0001 UTC).
Example: 638000000000000000

Request Examples#

Retrieve All Message Status Logs#

Retrieve all message status logs without date filters:
Or with date range:

Filter by Phone Number#

Filter by Webhook URL#

With Page Size#

Response Structure#

Success Response (200 OK)#

{
    "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\":\"delivered\",\"timestamp\":\"1704067200\",\"conversation\":{\"id\":\"5f7375311518ef490638d5b08aee9eb5\",\"origin\":{\"type\":\"service\"}},\"pricing\":{\"pricing_model\":\"PMP\",\"billable\":false,\"category\":\"service\"}}]}}]}]}",
                "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": "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_DEF456UVW\",\"recipient_id\":\"9876543210\",\"status\":\"failed\",\"timestamp\":\"1704067300\",\"errors\":[{\"code\":131047,\"href\":\"https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes/\",\"title\":\"Re-engagement message\",\"message\":\"Re-engagement message\",\"error_data\":{\"details\":\"Message failed to send because more than 24 hours have passed since the customer last replied to this number.\"}}]}]}}]}]}",
                "created_at": 638500000200000000,
                "direction": 1,
                "flyout_delivery_status": "-",
                "flyout_delivery_response": "-",
                "flyout_delivery_response_code": 0,
                "flyout_url": "-"
            }
        ],
        "next_page_token": "eyJQcm9qZWN0SWQiOnsiTiI6IjEyMzQ1In0sIkNyZWF0ZWRBdCI6eyJOOiI2Mzg1MDAwMDAwMDAwMDAwMCJ9fQ=="
    }
}

Response Field Reference#

Top-Level Response#

FieldTypeDescription
messagestringSuccess message
dataobjectResponse data container

Log Entry Fields#

FieldTypeDescription
project_idstringProject identifier
phone_number_idstringWhatsApp Business phone number ID
event_typestringAlways "Message Status" for this endpoint
payloadstringJSON string containing status webhook payload
created_atintegerTimestamp in Ticks format
directionintegerMessage direction (1 = incoming)
flyout_delivery_statusstringFlyout delivery status
flyout_delivery_responsestringFlyout delivery response
flyout_delivery_response_codeintegerHTTP response code for flyout
flyout_urlstringFlyout notification URL

Message Status Payload Structure#

When you parse the payload JSON string, it contains:
{
    "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": "delivered",
                                "timestamp": "1704067200",
                                "conversation": {
                                    "id": "5f7375311518ef490638d5b08aee9eb5",
                                    "origin": {
                                        "type": "service"
                                    }
                                },
                                "pricing": {
                                    "pricing_model": "PMP",
                                    "billable": false,
                                    "category": "service"
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ]
}

Status Payload Fields#

FieldTypeDescription
statuses[].idstringUnique message identifier
statuses[].recipient_idstringWhatsApp ID of the recipient
statuses[].statusstringStatus: "sent", "delivered", "read", or "failed"
statuses[].timestampstringUnix timestamp of the status update
statuses[].conversation.idstringConversation identifier
statuses[].conversation.origin.typestringOrigin type (e.g., "service")
statuses[].pricing.pricing_modelstringPricing model (e.g., "PMP")
statuses[].pricing.billablebooleanWhether the message is billable
statuses[].pricing.categorystringMessage category
statuses[].errors[]arrayError details (only present when status is "failed")

Failed Message Errors#

When a message fails, the payload includes error information:
{
    "statuses": [
        {
            "status": "failed",
            "errors": [
                {
                    "code": 131047,
                    "href": "https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes/",
                    "title": "Re-engagement message",
                    "message": "Re-engagement message",
                    "error_data": {
                        "details": "Message failed to send because more than 24 hours have passed since the customer last replied to this number."
                    }
                }
            ]
        }
    ]
}

Pagination#

When there are more results available, the response includes a next_page_token. To retrieve the next page, include the nextPageToken parameter in your request:
Continue this process until no next_page_token is returned in the response.

Error Responses#

400 Bad Request#

{
    "message": "Invalid request parameters",
    "data": null
}

401 Unauthorized#

{
    "message": "Unauthorized"
}

403 Forbidden#

{
    "message": "Forbidden"
}

500 Internal Server Error#

{
    "message": "Internal server error",
    "data": null
}

Important Considerations#

7-Day Retention: Logs are only available for the last 7 days
Payload Parsing: The payload field is a JSON string that must be parsed
Multiple Statuses: A single message may have multiple status updates (sent → delivered → read)
Error Codes: Failed messages include error codes and details for troubleshooting
Timestamp Format: All timestamps use Ticks format

Use Cases#

1.
Delivery Monitoring: Track message delivery success rates
2.
Read Receipt Tracking: Monitor when recipients read your messages
3.
Failure Analysis: Identify and troubleshoot failed message deliveries
4.
Performance Metrics: Calculate delivery and read rates
5.
Compliance: Maintain audit trails of message statuses

Code Example: Parsing Status Logs#

Related Endpoints#

Retrieve All Logs - Get all event types
Retrieve Incoming Message Logs - Get incoming messages only
Retrieve Other Event Logs - Get other event types
Retrieve Multiple Event Types - Get specific multiple event types

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Query Params

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.sendzen.io/v1/logs?fromDate=ticksTime&toDate=ticksTime&eventTypes=Message%20Status' \
--header 'Authorization: Bearer <token>'
Response Response Example
{
    "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"
    }
}
Modified at 2025-11-18 10:00:34
Previous
Incoming Message Logs
Next
Other Event Logs
Built with