v1

latestOpenAPI 3.0.22026-08-045831103.6 KB
Messages

List messages by chat

Retrieve a paginated list of messages for a specific chat (WHATSAPP_OFFICIAL, WHATSAPP or INSTAGRAM). Messages are sorted by created_at descending.

get/v2/messages/chat/{chatId}

Path parameters

chatIdstring uuid required
Example:550e8400-e29b-41d4-a716-446655440000

UUID of the chat

Query parameters

limitinteger

Max number of rows returned

offsetinteger

Number of rows skipped of the result

pageinteger

Select the page of the result

content_type'TEXT' | 'IMAGE' | 'AUDIO' | 'VIDEO' | 'DOCUMENT'
Example:TEXT

Filter messages by content type

created_at_startstring date-time
Example:2020-01-01T14:15:00.000000+00:00

Filter messages whose created_at is greater than or equal to this date (ISO-8601; a bare YYYY-MM-DD is treated as the start of the day). Use for incremental extraction by time window.

created_at_endstring date-time
Example:2020-01-01T14:15:00.000000+00:00

Filter messages whose created_at is less than or equal to this date (ISO-8601). A bare YYYY-MM-DD normalizes to start-of-day, so it excludes that calendar day — pass a full timestamp (e.g. ...T23:59:59Z) to include it.

updated_at_startstring date-time
Example:2020-01-01T14:15:00.000000+00:00

Filter messages whose updated_at is greater than or equal to this date (ISO-8601). updated_at reflects the last change to a message — including delivery/read status changes — so use it to re-fetch messages whose status changed since your last sync.

updated_at_endstring date-time
Example:2020-01-01T14:15:00.000000+00:00

Filter messages whose updated_at is less than or equal to this date (ISO-8601). A bare YYYY-MM-DD normalizes to start-of-day, so it excludes that calendar day — pass a full timestamp (e.g. ...T23:59:59Z) to include it.

Headers

api-tokenstring required

API Token

Response

A paginated list of messages

statusinteger

Response status

total_countinteger

Total items based on current filters

pageinteger

Current page

total_pagesinteger

Total pages based on current filters

has_nextboolean

Indicates that has next page

has_previousboolean

Indicates that has previous page

Example response

{
  "status": 200,
  "total_count": 50,
  "page": 1,
  "total_pages": 10,
  "has_next": true,
  "data": [
    {
      "id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
      "created_at": "2020-01-01T14:15:00.000000+00:00",
      "updated_at": "2020-01-01T14:15:00.000000+00:00",
      "chat_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
      "user_id": "8feade82-d77b-4e8b-9d35-fd43e972b5c8",
      "content": "Hello, how can I help you?",
      "type": "USER",
      "sent": true,
      "delivered": true,
      "content_type": "TEXT",
      "content_url": "https://example.com/file.jpg",
      "external_id": "wamid.HBgNNTU0ODk...",
      "status": "DELIVERED",
      "source": "API"
    }
  ]
}