List message logs
Lists historical messaging activity in the project for delivery review, auditing, and troubleshooting. This collection is read-only; send or redact messages through the Messages API instead.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Messaging.
Learn more about API scopes.
Query parameters
Include logs for deleted activity.
Return logs for activity prior to this date.
Return logs for activity on this date.
Return logs for activity after this date.
Specify the number of results to return on a single page. The default page size is 50 and the maximum is 1000.
Page number to retrieve. Requires page_token when greater than 0.
Token for cursor-based pagination. Required when page_number is greater than 0. The token is returned in pagination links.
Response
The request has succeeded.
Example response
{
"links": {
"self": "https://example.signalwire.com/api/messaging/logs?page_number=0&page_size=50",
"first": "https://example.signalwire.com/api/messaging/logs?page_size=50",
"next": "https://example.signalwire.com/api/messaging/logs?page_number=1&page_size=50&page_token=PA6ad4c839-9329-43fe-83c6-fbe7c38583ff",
"prev": "https://example.signalwire.com/api/messaging/logs?page_number=0&page_size=50&page_token=PA6ad4c839-9329-43fe-83c6-fbe7c38583ff"
},
"data": [
{
"from": "+12077447397",
"to": "+12029921413",
"status": "failed",
"direction": "inbound",
"kind": "sms",
"source": "laml",
"type": "relay_message",
"url": "https://example.signalwire.com/api/laml/2010-04-01/Accounts/c38dacad-2f6c-4de1-93d6-cc732e0c70c5/Messages/9ee38635-899a-490a-bfd1-9e72f5eea53c",
"number_of_segments": 1,
"charge_details": [
{
"description": "Inbound SMS",
"charge": 0.00415
}
],
"created_at": "2024-05-06T12:20:00Z",
"error_message": "From number is not a SMS-capable phone number.",
"error_code": "21601"
}
]
}Changes
Changed in 1 of the 137 revisions of this API.2
- ○
added the required property
data/items/error_codeto the response with the200statusresponse-required-property-added
- ○
added the required property
data/items/error_messageto the response with the200statusresponse-required-property-added
- ○
Of the 137 revisions, 3 have a changelog that could not be searched.