List SMS messages
GET/sms
Returns the workspace's SMS messages, outbound and inbound, newest first. Includes messages sent by campaigns and automations, not only those sent through this API.
Requires
Authorization: Bearer <api_key>. Create a key in the Inspra dashboard under Workspace Settings → API Keys.Query parameters
- pageinteger≥ 1optional1-based page index. Defaults to 1.Default
1 - page_sizeinteger1–100optionalItems per page. Defaults to 20. Hard-capped at 100 by the server.Default
20 - statusstringoptional
queuedsentdeliveredfailedundeliveredopted_out - directionstringoptional
outboundinbound - campaign_idstringuuidoptionalOnly messages sent by this SMS campaign.
- searchstringoptionalCase-insensitive substring match on the recipient number, the sender number or the body.
- from_datestringdate-timeoptionalOnly messages created at or after this ISO 8601 date.
- to_datestringdate-timeoptionalOnly messages created at or before this ISO 8601 date.
Response 200 OK
Paginated message list.
- dataobject[]required
20 fields
- idstringuuidoptional
- directionstringoptional
outboundinbound - statusstringoptional
queuedsentdeliveredfailedundeliveredopted_out - tostringoptional
- fromstringnullableoptional
- bodystringnullableoptional
- segmentsintegernullableoptionalCarrier segment count.
- providerstringnullableoptional
twiliotouchsmsatmic - provider_message_idstringnullableoptional
- campaign_idstringnullableuuidoptionalSet when an SMS campaign sent it.
- recipient_idstringnullableuuidoptional
- error_codestringnullableoptionalCarrier error code on a failed message.
- error_messagestringnullableoptional
- queued_atstringnullabledate-timeoptional
- sent_atstringnullabledate-timeoptional
- delivered_atstringnullabledate-timeoptional
- failed_atstringnullabledate-timeoptional
- read_atstringnullabledate-timeoptionalInbound only. When a teammate opened the conversation.
- created_atstringdate-timeoptional
- updated_atstringdate-timeoptional
- paginationobjectrequiredEchoed pagination block on every list response.
pageandpage_sizematch the request (or the defaults if omitted);totalis the count of matching rows across all pages.3 fields
- pageinteger≥ 1required1-based page index of this response.
- page_sizeinteger≥ 1requiredNumber of items per page (request cap is 100).
- totalinteger≥ 0requiredTotal matching items across all pages.
Errors
- 400Bad RequestValidation failed / malformed request.
- 401UnauthorizedMissing, malformed, or invalid API key.
- 403ForbiddenWorkspace unavailable, suspended, or paywalled.
- 429Too Many RequestsWorkspace request limit exceeded; shared across all its API keys.