v1

latestOpenAPI 3.0.02026-07-244771176.5 KB
WhatsApp

List WhatsApp messages

Retrieves a list of WhatsApp messages for your account with flexible date filtering.

Messages are returned in reverse chronological order (newest first).

Date Filtering:

  • Preset ranges (last_week, last_thirty, last_month): Calculated using your account timezone
  • Custom date ranges: Use RFC3339 timestamps (max 90 days)
  • The 'all' option provides up to 365 days of history
  • All timestamps in responses are returned in UTC format

Pagination:

  • Cursor-based pagination for efficient data retrieval
  • Control page size with the limit parameter (1-100 messages per page)
get/v2/whatsapp/messages

Query parameters

date_range'last_week' | 'last_thirty' | 'last_month' | 'all' | 'custom_date'

Predefined date range filter. Preset ranges use your account timezone to calculate relative dates:

  • 'last_week': Last 7 days from midnight in your account timezone
  • 'last_thirty': Last 30 days from midnight in your account timezone
  • 'last_month': Previous calendar month in your account timezone
  • 'all': All dates (limited to last 365 days) - default
  • 'custom_date': Use start_date and end_date parameters with explicit RFC3339 timestamps
start_datestring

Start date for custom date range in RFC3339 format (e.g., 2025-08-26T10:30:00Z). Required when date_range is 'custom_date'. Must be before end_date.

end_datestring

End date for custom date range in RFC3339 format (e.g., 2025-08-26T23:59:59Z). Required when date_range is 'custom_date'. Must be after start_date. The range between start_date and end_date cannot exceed 90 days.

limitinteger

Maximum number of messages to return per page (1-100, default 25).

cursorstring

Pagination cursor returned from a previous request. Pass the next_cursor or prev_cursor value from a previous response to fetch the next or previous page of results. Omit for the first page.

direction'next' | 'prev'

Pagination direction when using a cursor:

  • 'next': Get older messages (default, moves forward through history)
  • 'prev': Get newer messages (moves backward through history)
campaign_idstring uuid

Restrict results to messages belonging to a single campaign (UUID). Omit to return messages across all campaigns.

Response

OK

requestobject

Optional metadata (e.g. requestId, traceId)

Example response

{
  "data": {
    "messages": [
      {
        "id": "6fdae71c-dad7-4c36-9734-a69693ecf3b4",
        "message_ref": "optional-ref-123",
        "sender": "14155238886",
        "recipient": "61411122211",
        "content_type": "template",
        "content": {
          "template": {
            "name": "welcome_new_customer",
            "parameters": [
              "Joe"
            ]
          }
        },
        "status": "DELIVERED",
        "created_at": "2021-01-01T00:00:00Z",
        "campaign_id": "9b2e4c1a-7f3d-4a8b-9c5e-2d1f6a8b3c4d"
      }
    ]
  },
  "meta": {
    "pagination": {
      "type": "cursor",
      "next_cursor": "MTIzNDU2",
      "prev_cursor": "MTIzNDkw",
      "has_next": true
    }
  }
}