Skip to content
Wire2AirWire2Air

List received messages

GET /messages/inbox lists the SMS and MMS messages your texting numbers received, by date range, a page at a time.

Last updated

GEThttps://msgapi.wire2air.com/rest/v1/messages/inbox
Credential
REST API key, sent in the apikey header
Response
JSON, paginated

Parameters

Send the parameters in the query string. All are optional.

Parameters
ParameterDescription
datefrom
stringoptional
in query
Start of the date range. The range from datefrom to dateto cannot be longer than 31 days.
Default: todayExample: 10/1/2026
dateto
stringoptional
in query
End of the date range.
Default: todayExample: 10/6/2026
TextNumber
stringoptional
in query
Only messages sent to this one of your short codes or texting numbers.
Example: 27126
PageNo
integeroptional
in query
The results page to return.
Default: 1
PageSize
integeroptional
in query
Results per page.
Default: 10Example: 100

Examples

curl -G "https://msgapi.wire2air.com/rest/v1/messages/inbox" \
  -H "apikey: YOUR_API_KEY" \
  --data-urlencode "datefrom=10/1/2026" \
  --data-urlencode "dateto=10/6/2026" \
  --data-urlencode "TextNumber=27126" \
  --data-urlencode "PageNo=1" \
  --data-urlencode "PageSize=100"

Response

The results come in the page envelope. Each item in ListItems is one received message:

{
  "PageNo": 1,
  "PageSize": 10,
  "TotalPages": 1.0,
  "TotalRecords": 1,
  "RowStart": 1,
  "RowEnd": 1,
  "ListItems": [
    {
      "to": "27126",
      "from": "12129201000",
      "deliverydatetime": "",
      "text": "",
      "batchname": "",
      "replypath": "",
      "campaignid": "16654",
      "concatenate": "",
      "subscribername": "Sam",
      "username": "demo5",
      "submitteddatetime": "",
      "status": "",
      "receiveddatetime": "2017-12-22T18:42:09Z",
      "MessageType": "MMS",
      "Direction": "In",
      "URI": "v1/message/inbox/4986616",
      "ID": "4986616",
      "MMSURL": "v1/message/inbox/mms/4986616",
      "baseurl": "",
      "attachments": "",
      "subject": "",
      "bulkmode": "",
      "Media": null
    }
  ]
}

The fields the documentation describes:

FieldExampleMeaning
ID4986616The message's ID.
to27126Your number that received the message: a short code, local, landline or toll-free number.
from12129201000The sender's mobile number.
receiveddatetime2017-12-22T18:42:09ZWhen the message arrived, in UTC.
subscribernameSamThe sender's name from your subscriber data, if you have it.
MessageTypeMMSSMS or MMS.
MMSURLv1/message/inbox/mms/4986616For MMS, a link to the message's media (see below).

The other fields in the sample are not described.

MMS media

For an MMS, MMSURL points to its content. The previous docs showed this response for it, without documenting the request:

MMS content
{
  "subject": "",
  "textcontent": "",
  "files": [
    {
      "name": "http://mms.wire2air.com/mmsdata/mmsinbox/29a8d4e9-0be9-4c10-9ac6-3388f0b4a15d/0.jpg",
      "type": "Image"
    }
  ]
}

Sent messages