Outbound Message Sessions
Get a session`s messages
<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Sessions/getMessagesBySessionId" target="_blank">Try in sandbox</a><br>A useful synonym for the "messages/search" command with the provided "sessionId" parameter.
get/api/v2/sessions/{id}/messages
Request
- Base URLhttps://rest.textmagic.com
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
idinteger required
Query parameters
pageinteger
Fetch specified results page.
limitinteger
The number of results per page.
statuses'q' | 's' | 'e' | 'r' | 'a' | 'd' | 'b' | 'f' | 'u' | 'j' | 'i' | 'p' | 'h'
Find messages by status.
includeDeleted0 | 1
Search also in deleted messages.
Response
Returned when successful.
Example response
{
"page": 1,
"pageCount": 10,
"limit": 10,
"resources": [
{
"id": 4991,
"text": "I love Textmagic!",
"status": "d",
"rejectReason": "a",
"contactId": 2764,
"sessionId": 3122,
"messageTime": "2019-08-12T11:43:37+0000",
"avatar": "avatars/dummy_avatar.png",
"deliveredAt": "2026-05-18T19:25:45+0000",
"charset": "ISO-8859-1",
"charsetLabel": "ISO-8859-1",
"firstName": "John",
"lastName": "Conway",
"country": "US",
"phone": "447624800500",
"price": 0.025,
"partsCount": 6,
"fromEmail": "test@email.com",
"fromNumber": "447624800500"
}
]
}Changes
No recorded changes to this operation across all 4 revisions of this API.