Returns SMS and MMS messages in your workspace, newest first. This includes messages sent with Send SMS, messages agents sent during calls, and inbound messages to your numbers.
Request#
| Query parameter | Type | Required | Description |
|---|---|---|---|
chat_id |
string | No | Only messages in this SMS chat. |
call_id |
string | No | Only messages sent during this call. |
limit |
integer | No | Most messages to return. Default 100, maximum 500. |
Example request#
curl "https://api.tried.com.au/list-sms-messages?limit=20" \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/list-sms-messages?limit=20", {
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const messages = await res.json();import os, requests
res = requests.get(
"https://api.tried.com.au/list-sms-messages",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
params={"limit": 20},
)
messages = res.json()Response#
200 OK
A JSON array of messages. See Send SMS for the fields.
[
{
"message_id": "sms_2f7b0d9e4a163c58b2e0f7a1",
"chat_id": "chat_6a1d3e8f0b29c47d5e1a6b30",
"call_id": null,
"direction": "inbound",
"from_number": "+61412345678",
"to_number": "+61255501234",
"content": "Can I move my booking to Friday?",
"status": "received",
"provider_message_id": "b7e2c590-1d4a-4f83-9c6e-0a5f2b8d3e71",
"error": null,
"created_timestamp": 1792400400000
},
{
"message_id": "sms_9c4e1a7b3d052f86a1c0e9b4",
"chat_id": null,
"call_id": "call_0e5b8c2d7f41a96e3b0d5c18",
"direction": "outbound",
"from_number": "+61255501234",
"to_number": "+61412345678",
"content": "Here is the link to reschedule: https://example.com/book",
"status": "delivered",
"provider_message_id": "40318f6c-8a2b-4d7e-b951-2e6c0a3f7d14",
"error": null,
"created_timestamp": 1792396800000
}
]Errors#
| Status | When |
|---|---|
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the calls scope. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.