Messages
The Messages API lets you retrieve, filter, and paginate message logs across channels, with support for event metadata, delivery tracking, and message cancellation.
Introduction
Courier’s /messages endpoint is designed to retrieve logs related to your message activity. This feature allows developers to track and analyze events, such as message deliveries or errors, across multiple notification channels.
Key Features
- Filter Options: You can filter logs by event type (e.g., delivery status), channel (email, SMS, etc.), or specific recipient.
- Pagination: Results are paginated, enabling you to retrieve logs in manageable chunks.
- Event Metadata: Logs include timestamps, event IDs, and detailed information about the status of each notification.
Usage Example
To query logs, send a GET
request to the /messages
endpoint with optional query parameters like event
, messageId
, recipient
, or status
. An example of a query might include:
Message Response
The response from the API will return a paging
object if there are more than 10 results. Users can use the cursor
in subsequent query calls to paginate over the results. Only 10 can be fetched at a time.