Get SMS messages

GET /sms/inbound

Query parameters

  • from string | array[string]

    Filter based on the from msisdn, can be either an array or comma separated list

  • ref string

    Filter based on the ref of the message, can be empty to filter on messages without a reference

  • completed boolean

    Filter based on whether the message has finished/completed

  • Return messages whose messageID is greater than or equal to this value

  • Return messages whose messageID is less than or equal to this value

  • created_at.min string(date-time)

    Return message created on or after this time; default is 24 hours ago

  • created_at.max string(date-time)

    Return message created on or before this time

  • limit integer

    Max number of messages to return (default 100, max 500)

  • offset integer

    Number of messages to skip (for pagination use)

  • Csv of sort field definitions, default is "-messageID" which means descending order of messageID, ie newest messages first

Responses

  • 200 application/json

    Successful operation

    Hide response attributes Show response attributes object
    • data array[object]
      Hide data attributes Show data attributes object
      • messageID integer

        The ID of the message

      • from string

        The msisdn the message was sent from

      • to string

        The msisdn the message was sent to

      • body string

        The message body

      • ref string

        Reference of the msisdn the message was sent to

      • received_at string(timestamp)

        The time at which the message was received

    • Are there more results which have not been included

  • Invalid input

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
  • Invalid input

GET /sms/inbound
curl \
 -X GET https://sms.apicontrol.co.uk/v1/sms/inbound \
 -H "Authorization: $API_KEY"
Response examples (200)
{
  "data": [
    {
      "messageID": 7,
      "from": "+447700900000",
      "to": "+447700900999",
      "body": "Test inbound message",
      "ref": "Oxford main office",
      "received_at": "1718893029.000"
    }
  ],
  "more_results": false
}
Response examples (401)
{
  "status_code": 401,
  "status_msg": "Unauthorized"
}