Get SMS messages
Query parameters
-
from
array[string] Filter based on the from msisdn
-
ref
string Filter based on the ref of the message; can be null to filter on messages without a reference
-
paused
boolean Filter based on whether the message is paused or not
-
completed
boolean Filter based on whether the message has finished/completed
-
messageID.min
integer Return messages whose messageID is greater than or equal to this value
-
messageID.max
integer Return messages whose messageID is less than or equal to this value
-
created_at.min
string(date-time) Return message created on or after this time; default is 24 hours ago
-
created_at.max
string(date-time) Return message created on or before this time
-
limit
integer Max number of messages to return (default 100, max 500)
-
offset
integer Number of messages to skip (for pagination use)
-
sort
string | array[string] Csv or array of sort field definitions, default is "-messageID" which means descending order of messageID, ie newest messages first
GET
/sms/messages
curl \
-X GET https://sms.apicontrol.co.uk/v1/sms/messages \
-H "Authorization: $API_KEY"
Response examples (200)
{
"data": [
{
"to": [
"+447700900111",
"+447700900122"
],
"messageID": 923934,
"from": "+447700900001",
"body": "Message to send",
"send_at": "2024-06-03T10:05:22Z",
"expires_at": "2024-06-04T10:05:22Z",
"ref": "d93b9ec9-4e0d-42b8-80c0-ef3036acdafc",
"callbackURL": "https://sms-callbacks.barbuck.com",
"paused": false
}
],
"more_results": false
}
Response examples (401)
{
"status_code": 401,
"status_msg": "Unauthorized"
}