Messages
List messages
Changed onList all messages for an account with cursor-based pagination.
get/accounts/{account_id}/messages
Request
- Base URLhttps://api.surge.app
- URLhttps://api.surge.app/accounts/{account_id}/messages
- AuthHTTP bearer
Path parameters
account_idstring required
The account ID to list messages for.
Example:acct_01j9a43avnfqzbjfch6pygv1td
Query parameters
afterstring
Cursor for forward pagination. Use the next_cursor from a previous response.
beforestring
Cursor for backward pagination. Use the previous_cursor from a previous response.
Response
List of messages
Example response
{
"data": [
{
"attachments": [],
"blast_id": null,
"body": "Thought you could leave without saying goodbye?",
"conversation": {
"contact": {
"first_name": "Dominic",
"id": "ctc_01j9dy8mdzfn3r0e8x1tbdrdrf",
"last_name": "Toretto",
"phone_number": "+18015551234"
},
"id": "cnv_01j9e0dgmdfkj86c877ws0znae",
"phone_number": {
"id": "pn_01jsjwe4d9fx3tpymgtg958d9w",
"metadata": {
"location": "Downtown store"
},
"number": "+18015552345",
"type": "local"
}
},
"created_at": "2024-10-21T23:29:40Z",
"failure_reason": null,
"id": "msg_01j9e0m1m6fc38gsv2vkfqgzz2",
"status": "delivered"
}
],
"pagination": {
"next_cursor": null,
"previous_cursor": null
}
}Changes
- info
added the required property
//to the response with the status
- info
- info
added the optional property
//to the response with the status - info
added the required property
////to the response with the status
- info