Skip to main content
GET
/
whatsapp
/
messages
List messages
curl --request GET \
  --url https://api.kapso.ai/platform/v1/whatsapp/messages \
  --header 'X-API-Key: <api-key>'
{ "data": [ { "id": "wamid.HBgMMTIzNDU2Nzg5MBUCABIYGTA5RTlCQkI2NTI3", "timestamp": "1705395000", "type": "text", "from": "14155550123", "text": { "body": "Hello, I need help with my order" }, "kapso": { "direction": "inbound", "status": "delivered", "processing_status": "processed", "origin": "cloud_api", "phone_number": "14155550123", "phone_number_id": "123456789012345", "has_media": false, "whatsapp_conversation_id": "c63ced48-1283-4d55-8c8d-930f525aa0e5", "contact_name": "Alicia", "content": "Hello, I need help with my order" } } ], "meta": { "page": 1, "per_page": 20, "total_pages": 1, "total_count": 1 } }

Authorizations

X-API-Key
string
header
required

Query Parameters

phone_number_id
string

Filter by WhatsApp phone number ID

conversation_id
string<uuid>

Filter by conversation ID

phone_number
string

Filter by contact phone number (partial match)

direction
enum<string>

Filter by message direction

Available options:
inbound,
outbound
status
enum<string>

Filter by message status

Available options:
pending,
sent,
delivered,
read,
failed
message_type
string

Filter by message type

has_media
boolean

Filter messages with media attachments

page
integer
default:1

Page number for legacy offset pagination. Deprecated — use cursor pagination (limit, after, before) instead. Maximum page: 50. Maximum window (page × per_page): 5,000. Requests exceeding these limits return a 400 error.

Required range: x <= 50
per_page
integer
default:20

Items per page for legacy offset pagination.

Required range: x <= 100
limit
integer
default:20

Maximum number of results per cursor-paginated page (default 20, max 100).

Required range: 1 <= x <= 100
before
string

Cursor for the previous page (Base64 encoded).

after
string

Cursor for the next page (Base64 encoded).

Response

List of messages

data
object[]
required
meta
object
paging
object