Skip to main content
GET
/
v1
/
messages
List messages
curl --request GET \
  --url https://api.zavu.dev/v1/messages \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "id": "jd7x2k3m4n5p6q7r8s9t0",
      "to": "+56912345678",
      "channel": "auto",
      "messageType": "text",
      "status": "queued",
      "createdAt": "2023-11-07T05:31:56Z",
      "from": "+13125551212",
      "senderId": "sender_12345",
      "text": "<string>",
      "content": {
        "mediaUrl": "https://example.com/image.jpg",
        "mediaId": "<string>",
        "mimeType": "image/jpeg",
        "filename": "invoice.pdf",
        "latitude": 123,
        "longitude": 123,
        "locationName": "<string>",
        "locationAddress": "<string>",
        "contacts": [
          {
            "name": "<string>",
            "phones": [
              "<string>"
            ]
          }
        ],
        "buttons": [
          {
            "id": "<string>",
            "title": "<string>"
          }
        ],
        "listButton": "<string>",
        "sections": [
          {
            "title": "<string>",
            "rows": [
              {
                "id": "<string>",
                "title": "<string>",
                "description": "<string>"
              }
            ]
          }
        ],
        "emoji": "<string>",
        "reactToMessageId": "<string>",
        "templateId": "<string>",
        "templateVariables": {
          "1": "John",
          "2": "ORD-12345"
        }
      },
      "providerMessageId": "<string>",
      "errorCode": "<string>",
      "errorMessage": "<string>",
      "cost": 123,
      "costProvider": 123,
      "costTotal": 123,
      "metadata": {},
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "nextCursor": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

status
enum<string>
Available options:
queued,
sending,
delivered,
failed,
received
to
string
channel
enum<string>

Delivery channel. Use 'auto' for intelligent routing.

Available options:
auto,
sms,
whatsapp,
email
limit
integer
default:50
Required range: x <= 100
cursor
string

Response

List of messages.

items
object[]
required
nextCursor
string | null