SMS and MMS

Returns a paginated list of SMS and MMS messages for the authenticated account, filtered by direction, date, and other criteria.

get/v3/messages

Request

  • Base URL
    https://api.wavix.com
  • URL
    https://api.wavix.com/v3/messages
  • Auth
    HTTP bearer

Query parameters

sent_afterstring date
Example:2023-04-10

Returns messages sent on or after this date, in YYYY-MM-DD format.

sent_beforestring date
Example:2023-04-13

Returns messages sent on or before this date, in YYYY-MM-DD format.

typestring required
Example:outbound

Filters messages by direction. One of inbound (messages received by the account) or outbound (messages sent by the account).

fromstring
Example:15072429497

Filters by message sender. For outbound messages, the Sender ID used to send the message; for inbound messages, the originating phone number.

tostring
Example:16419252149

Filters by message recipient. For outbound messages, the destination phone number; for inbound messages, an SMS-enabled number on the Wavix platform.

status'accepted' | 'pending' | 'sent' | 'delivered' | 'undelivered' | 'expired' | 'rejected' | 'dlr_expired'

Current delivery status of the message. One of:

  • accepted — the message was accepted by the platform for sending.
  • pending — the message is queued and awaiting a carrier response.
  • sent — the message was handed to the carrier.
  • delivered — the carrier confirmed delivery to the handset.
  • undelivered — the carrier reported that delivery failed.
  • expired — the validity period elapsed before the message was sent.
  • rejected — the message was rejected before sending.
  • dlr_expired — no delivery receipt arrived from the carrier within the expected window.

Filters messages by delivery status. Accepts a MessageDeliveryStatus value.

tagstring
Example:campaignX

Filters messages by tag. Supported for outbound messages only.

message_type'sms' | 'mms'
Example:sms

Filters messages by type. One of sms (text message) or mms (multimedia message).

pageinteger
Example:2

Page number to retrieve. Default 1.

per_pageinteger
Example:50

Number of records to return per page. Default 25.

Response

Returns a paginated list of messages.

Example response

{
  "items": [
    {
      "message_id": "871b4eeb-f798-4105-be23-32df9e991456",
      "message_type": "sms",
      "from": "Wavix",
      "to": "447537151866",
      "direction": "outbound",
      "mcc": "301",
      "mnc": "204",
      "message_body": {
        "text": "Hi there, this a message from Wavix",
        "media": null
      },
      "tag": "Fall sale",
      "status": "delivered",
      "segments": 1,
      "charge": "0.01",
      "submitted_at": "2022-04-14T13:51:16.096Z",
      "sent_at": "2022-04-14T13:51:16.096Z",
      "delivered_at": "2022-04-14T13:51:16.096Z",
      "error_message": ""
    }
  ],
  "pagination": {
    "current_page": 2,
    "per_page": 25,
    "total": 101,
    "total_pages": 5
  }
}

Changes

    • breaking

      the query request parameter status was restricted to a list of enum values

    • breaking

      for the query request parameter sent_after, the format changed from no format to date

    • breaking

      for the query request parameter sent_before, the format changed from no format to date

    • breaking

      the response's body type changed from no type to object for status

    • info

      added the new enum value accepted to the query request parameter status

    • info

      added the new enum value delivered to the query request parameter status

    • info

      added the new enum value dlr_expired to the query request parameter status

    • info

      added the new enum value expired to the query request parameter status

    • info

      added the new enum value pending to the query request parameter status

    • info

      added the new enum value rejected to the query request parameter status

    • info

      added the new enum value sent to the query request parameter status

    • info

      added the new enum value undelivered to the query request parameter status

    • info

      for the query request parameter status, the type was generalized from no type to string

    • info

      removed subschema #2 from the response body allOf list for the response status

    • info

      added the non-success response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      the endpoint scheme security bearerAuth was added to the API