Retrieve a list of message

Fetch a list of messages with optional filters like prefix, public, unpublished, and pagination using limit and next token.

GET
/messages
AuthorizationBearer <token>

In: header

Query Parameters

id?string

Filter resources by their unique identifier

limit?integer

How many items to return at one time (max 100)

Formatint64
autocomplete?string

Search term for autocomplete functionality

next?string

Pagination token for retrieving the next page of results

order?string

Sort order for the results (ascending or descending)

Value in"asc" | "desc"
sortBy?string

Field name to sort the results by

template_id?string

Filter messages by template ID.

to?string

Filter messages by recipient.

language?string

language of the message

Value in"en" | "es" | "fr" | "de" | "it" | "pt" | "ru"
system?string

Filter messages that are publicly accessible.

Value in"email" | "sms" | "push"
action_type?string

Filter type of messages.

status?string

Filter messages by status.

Value in"pending" | "delivered" | "failed" | "scheduled" | "cancelled" | "retrying"
when_created[$gt]?string
Formatdate-time
when_created[$lt]?string
Formatdate-time
when_created[$gte]?string
Formatdate-time
when_created[$lte]?string
Formatdate-time

Response Body

application/json

application/json

application/json

curl -X GET "https://api-testnet.dual.network/messages"
{
  "messages": [
    {
      "id": "string",
      "template_id": "string",
      "action_type": "register",
      "to": "string",
      "system": "email",
      "language": "en",
      "status": "pending",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "error": {
        "code": 0,
        "message": "string",
        "details": {}
      },
      "when_modified": "2019-08-24T14:15:22Z",
      "when_created": "2019-08-24T14:15:22Z"
    }
  ],
  "next": "string"
}
{
  "code": 0,
  "message": "string",
  "details": {}
}
{
  "code": 0,
  "message": "string",
  "details": {}
}