List
Get messages
Retrieve a list of messages for the authenticated account with comprehensive filtering capabilities. Rate limited to 100 requests per 10 seconds per account.
Query Parameters
Filter by account email
Filter messages created after this date (ISO 8601 format)
Filter messages created before this date (ISO 8601 format)
Filter by sender phone number
Filter by group ID
Filter by message direction
Maximum number of messages to return
Filter by message type
Filter by any phone number (from or to)
Number of messages to skip
Field to order messages by
Sort order
Filter by Sendblue phone number
Filter messages sent after this date (ISO 8601 format)
Filter messages sent before this date (ISO 8601 format)
Filter by service type
Filter by message status
Filter by recipient phone number
Filter messages updated after this date (ISO 8601 format)
Filter messages updated before this date (ISO 8601 format)
Filter by worker ID (Admin only)
Returns
curl https://api.sendblue.co/api/v2/messages \
-H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
-H "sb-api-secret-key: $SENDBLUE_API_API_SECRET"
{
"data": [
{
"accountEmail": "[email protected]",
"content": "Hello, World!",
"date_sent": "2024-01-01T12:00:00Z",
"date_updated": "2024-01-01T12:00:01Z",
"error_code": null,
"error_detail": null,
"error_message": null,
"error_reason": null,
"from_number": "+19998887777",
"group_display_name": null,
"group_id": null,
"is_outbound": true,
"media_url": null,
"message_handle": "msg_abc123def456",
"message_type": "message",
"number": "+18887776666",
"opted_out": false,
"participants": [
"string"
],
"plan": "premium",
"send_style": "celebration",
"sendblue_number": "+19998887777",
"service": "iMessage",
"status": "SENT",
"to_number": "+18887776666",
"was_downgraded": false
}
],
"pagination": {
"hasMore": true,
"limit": 50,
"offset": 0,
"total": 1000
},
"status": "OK"
}