Fetch message history▾
Fetch message history
List messages across every conversation, filtered by contact, direction, status or time.
Returns messages newest-first. To read one thread, filter by wa_id or call list conversation messages.
GET
/v1/messagesQuery parameters
wa_idstringOnly messages exchanged with this contact.
directionenumFilter by direction.
inboundoutbound
statusenumFilter by latest delivery status.
acceptedsentdeliveredreadfailed
created_afterstringRFC 3339 timestamp, exclusive.
created_beforestringRFC 3339 timestamp, exclusive.
limitintegerdefault 25Page size, 1–100.
cursorstringFrom the previous page's next_cursor.
curl -X GET https://api.sendport.tech/v1/messages \
-H "Authorization: Bearer $SENDPORT_KEY"Responses
200OK
{
"object": "list",
"data": [
{
"object": "message",
"id": "msg_01JZQ3F8X2K7N4B6Y0R9M5TCWA",
"wamid": "wamid.SEJnTTIwMTAwNTU1MDEyM0ZRSUFFUmdT",
"conversation_id": "conv_01JZQ3F8X0QG7T2S4N8V1PZAKD",
"from": "+15550100200",
"to": "+201005550123",
"direction": "outbound",
"type": "template",
"template": { "name": "order_shipped", "language": "en", "category": "UTILITY" },
"status": "accepted",
"pricing": { "category": "utility", "billable": true, "amount": "0.0286", "currency": "USD" },
"created_at": "2026-09-06T09:14:22.114Z"
}
],
"has_more": false,
"next_cursor": null
}401Unauthorized
{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "No API key provided.",
"doc_url": "https://sendport.tech/docs/errors#missing_api_key",
"request_id": "req_9f3c2a7b41de08c5b2e6"
}
}Try itsandbox