curl "https://zeplo.ai/api/conversations/1/messages?page=1&limit=50" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "x-channel-id: YOUR_CHANNEL_ID"
{
"success": true,
"data": [
{
"id": 42,
"conversationId": 1,
"type": "text",
"content": { "text": "Hello!" },
"direction": "inbound",
"status": "delivered",
"senderName": "John Doe",
"senderPhone": "919876543210",
"createdAt": "2026-01-15T10:00:00Z"
},
{
"id": 43,
"conversationId": 1,
"type": "text",
"content": { "text": "Hi John! How can we help?" },
"direction": "outbound",
"status": "read",
"senderName": "Agent Smith",
"createdAt": "2026-01-15T10:01:00Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 120,
"totalPages": 3
}
}
Messages
GET List Messages
Retrieve a paginated list of WhatsApp messages for a conversation.
GET
/
api
/
conversations
/
:conversationId
/
messages
curl "https://zeplo.ai/api/conversations/1/messages?page=1&limit=50" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "x-channel-id: YOUR_CHANNEL_ID"
{
"success": true,
"data": [
{
"id": 42,
"conversationId": 1,
"type": "text",
"content": { "text": "Hello!" },
"direction": "inbound",
"status": "delivered",
"senderName": "John Doe",
"senderPhone": "919876543210",
"createdAt": "2026-01-15T10:00:00Z"
},
{
"id": 43,
"conversationId": 1,
"type": "text",
"content": { "text": "Hi John! How can we help?" },
"direction": "outbound",
"status": "read",
"senderName": "Agent Smith",
"createdAt": "2026-01-15T10:01:00Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 120,
"totalPages": 3
}
}
List Messages
GET /api/conversations/:conversationId/messages
Retrieve all messages in a conversation, sorted chronologically. Supports cursor-based pagination and filtering.
curl "https://zeplo.ai/api/conversations/1/messages?page=1&limit=50" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "x-channel-id: YOUR_CHANNEL_ID"
Authorization
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
x-api-secret | Yes | Your API secret key |
x-channel-id | Yes | WhatsApp channel ID |
Path parameters
integer
required
The conversation ID.
Query parameters
integer
default:"1"
Page number for pagination.
integer
default:"50"
Messages per page (max: 100).
string
Message ID to fetch messages before.
string
Message ID to fetch messages after.
{
"success": true,
"data": [
{
"id": 42,
"conversationId": 1,
"type": "text",
"content": { "text": "Hello!" },
"direction": "inbound",
"status": "delivered",
"senderName": "John Doe",
"senderPhone": "919876543210",
"createdAt": "2026-01-15T10:00:00Z"
},
{
"id": 43,
"conversationId": 1,
"type": "text",
"content": { "text": "Hi John! How can we help?" },
"direction": "outbound",
"status": "read",
"senderName": "Agent Smith",
"createdAt": "2026-01-15T10:01:00Z"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 120,
"totalPages": 3
}
}
Message types
Messages can have the followingtype values:
| Type | Content shape |
|---|---|
text | {"text": "..."} |
image | {"url": "...", "caption": "..."} |
document | {"url": "...", "caption": "...", "filename": "..."} |
audio | {"url": "..."} |
video | {"url": "...", "caption": "..."} |
sticker | {"url": "..."} |
contacts | {"contacts": [...]} |
location | {"latitude": 0, "longitude": 0, "name": "..."} |
interactive | {"type": "button|list", ...} |
template | {"templateName": "...", ...} |
reaction | {"emoji": "..."} |
Message status
| Status | Description |
|---|---|
queued | Message is queued for sending |
sent | Message sent to WhatsApp |
delivered | Message delivered to recipient’s device |
read | Message read by recipient |
failed | Message delivery failed |
