latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Outbound Messages

Find messages

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Messages%3A%20Send%0A/searchOutboundMessages" target="_blank">Try in sandbox</a><br>Find outbound messages by given parameters.

get/api/v2/messages/search

Query parameters

pageinteger

Fetch specified results page.

limitinteger

The number of results per page.

lastIdinteger

Filter results by ID, selecting all values lesser than the specified ID. Note that the 'page' parameter is ignored when 'lastId' is specified.

idsstring

Find message by ID(s).

sessionIdinteger

Find messages by session ID.

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.

querystring

Find messages by specified search query.

Response

Returned when successful.

pageinteger required
pageCountinteger required

The total number of pages.

limitinteger required

The number of results per page.

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"
    }
  ]
}