Appearance
Search SMS messages
GET
/api/sms/{phone_number}/messages
This endpoint returns the latest SMS messages for a specific phone number.
When the wait query flag is set to true and no messages are found yet, the endpoint waits briefly and redirects back to the same URL so the client can retry the same request automatically.
Authorizations
ApiKey
Type
API Key (header: X-Api-Key)
Parameters
Path Parameters
phone_number*
Type
Requiredstring
Query Parameters
limit
Maximum number of messages to return.
Type
number
Minimum
1Maximum
100Default
20offset
Number of matching messages to skip.
Type
number
Minimum
0Default
0body
Case-insensitive message-body substring.
Type
string
from_number
Case-insensitive sender phone-number prefix.
Type
string
Example
"+1800555"direction
Exact message direction. Omit to search both directions.
Type
string
Valid values
"inbound""outbound"from_date
Inclusive lower message creation-time bound.
Type
string
Example
"2026-05-11T18:00:00.000Z"Format
"date-time"to_date
Inclusive upper message creation-time bound.
Type
string
Example
"2026-05-11T18:05:00.000Z"Format
"date-time"wait
Wait and redirect to retry when no message currently matches.
Type
boolean
Default
falseResponses
application/json
JSON "total_count": 0, "options": { "limit": 0, "offset": 0, "body": "string", "from_number": "string", "direction": "string", "from_date": "string", "to_date": "string", "wait": true }, "data": [ { "id": "string", "sms_phone_number_id": "string", "body": "string", "from_number": "string", "to_number": "string", "provider_message_id": "string", "created_at": "string", "direction": "string" } ]
{
}
