List messages, newest first.
curl --request GET \
--url https://omni-api.sendblue.com/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omni-api.sendblue.com/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "<string>",
"direction": "inbound",
"status": "scheduled",
"to": "+14155550100",
"from": "+14155550100",
"campaign_id": "<string>",
"body": "<string>",
"media_urls": [
"<string>"
],
"segments": 123,
"price": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"error_code": 123,
"status_callback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"delivery_evidence": "verified",
"billing_status": "held",
"usage": {
"message_id": "<string>",
"direction": "outbound",
"service": "SMS",
"outcome": "<string>",
"reason": "<string>",
"carrier_status": "<string>",
"estimated_parts": 123,
"billed_parts": 123,
"maximum_hold": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"base_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"surcharge_charged": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"total_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"uncollected": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"inbox_message_id": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}List messages, newest first.
Required permission: messages:read. Accepted credentials: a signed-in person, an API key, the account token.
GET
/
messages
List messages, newest first.
curl --request GET \
--url https://omni-api.sendblue.com/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omni-api.sendblue.com/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "<string>",
"direction": "inbound",
"status": "scheduled",
"to": "+14155550100",
"from": "+14155550100",
"campaign_id": "<string>",
"body": "<string>",
"media_urls": [
"<string>"
],
"segments": 123,
"price": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"error_code": 123,
"status_callback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"delivery_evidence": "verified",
"billing_status": "held",
"usage": {
"message_id": "<string>",
"direction": "outbound",
"service": "SMS",
"outcome": "<string>",
"reason": "<string>",
"carrier_status": "<string>",
"estimated_parts": 123,
"billed_parts": 123,
"maximum_hold": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"base_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"surcharge_charged": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"total_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"uncollected": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"inbox_message_id": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret