retrieve inbound and outbound sms or mms messages

API Docs by APIMATIC

Retrieve Inbound and Outbound SMS or MMS Messages

Use this method to get access to all of your outbound and inbound SMS or MMS using a single API endpoint. Messages can be filtered by date, originating (SenderID) and destination phone numbers or message tag. By default, the results are paginated, with 25 records per page.

This endpoint requires authentication.

GET /messages
  • EXPLORER
  • PARAMETERS
NameDescription
sent_afterQuery Required
String

Specify the start date of your search time range in the yyyy-mm-dd format.

sent_beforeQuery Required
String

Specify the end date of your search time range in the yyyy-mm-dd format.

typeQuery Required
String

Filter messages by the direction of SMS traffic, i.e. inbound or outbound

fromQuery
String

Filter messages by SMS sender. For outbound message contains a Sender ID used to sent the message, for inbound message contains a phone number originated the message.

toQuery
String

Filter messages by destination phone number. For outbound message contains phone number the message was sent to, for inbound message contains a SMS-enabled DID on the Wavix platform.

statusQuery

Filter messages by message delivery status.

tagQuery
String

Filter messages by tag. For outbound SMS or MMS only, for inbound messages the parameter is ignored.

pageQuery
String

Page requested

per_pageQuery
String

Number of records per page

Server

SMS and MMS messaging

Response Type

Errors

HTTP Status CodeError DescriptionException Class
400
Request failed. One or more parameters are not valid
403
Request failed. Outbound messaging service is disabled.
Default
Request failed. One or more parameters are not valid
curl -X GET -G \
  --url 'https://api.wavix.com/v2/messages' \
  -H 'Accept: application/json' \
  -d 'appid=your-API-key' \
  -d 'sent_after=2021-04-10' \
  -d 'sent_before=2021-04-13' \
  -d 'type=outbound' \
  -d 'from=441517010141' \
  -d 'to=441517010141' \
  -d 'tag=some%20external%20id' \
  -d 'page=2' \
  -d 'per_page=100'