API Documentation
Chats
Use chat APIs to build chat lists, fetch chat pictures, read messages, and inspect or update individual chat messages. These endpoints require a connected dashboard session owned by the API key account.
Common rules
Authentication
Send Authorization: Bearer YOUR_API_KEY with every request.
Session
Use the dashboard session name, such as {session}, or the session ID.
Chat ID
Use chat_id like {number}@c.us, or send to with a phone number.
Endpoints
https://chatflow.zeltacode.com/api/v1/chats
Return chats for a connected session. Use pagination for large accounts.
https://chatflow.zeltacode.com/api/v1/chats/overview
Return chat list data with name, picture, and last message.
https://chatflow.zeltacode.com/api/v1/chats/overview
Use POST overview when filtering many chat IDs.
https://chatflow.zeltacode.com/api/v1/chats/picture
Return the profile picture URL for one direct chat or group chat.
https://chatflow.zeltacode.com/api/v1/chats/unread
Mark a chat as unread.
https://chatflow.zeltacode.com/api/v1/chats/messages/read
Mark unread messages in one chat as read.
https://chatflow.zeltacode.com/api/v1/chats/messages
Return messages from one chat. Use chat_id=all only when searching by message id across chats.
https://chatflow.zeltacode.com/api/v1/chats/messages/{message_id}
Return one message by ID from a chat.
https://chatflow.zeltacode.com/api/v1/chats/messages/{message_id}
Edit a text message or media caption.
https://chatflow.zeltacode.com/api/v1/chats/messages/{message_id}
Delete one message from a chat.
1. Get all chats
Return chats for a connected session. Use pagination for large accounts.
API name
Get all chats
Purpose
Return chats for a connected session. Use pagination for large accounts. Use it when your application needs chat data without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/chats
curl -X GET "https://chatflow.zeltacode.com/api/v1/chats?session={session}&limit=20&offset=0&sortBy=conversationTimestamp&sortOrder=desc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"limit": 20,
"offset": 0,
"sortBy": "conversationTimestamp",
"sortOrder": "desc"
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "list",
"session": "{session}",
"chat_id": null,
"chat_response": [
{
"id": "{number}@c.us",
"name": "Test Contact"
}
]
}
}
2. Get chats overview
Return chat list data with name, picture, and last message.
API name
Get chats overview
Purpose
Return chat list data with name, picture, and last message. Use it when your application needs chat data without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/chats/overview
curl -X GET "https://chatflow.zeltacode.com/api/v1/chats/overview?session={session}&limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"limit": 20,
"offset": 0
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "overview",
"session": "{session}",
"chat_id": null,
"chat_response": [
{
"id": "{number}@c.us",
"name": "Test Contact",
"picture": null,
"lastMessage": {
"id": "false_{number}@c.us_MESSAGE_ID",
"body": "Hello"
}
}
]
}
}
3. Get chats overview by ids
Use POST overview when filtering many chat IDs.
API name
Get chats overview by ids
Purpose
Use POST overview when filtering many chat IDs. Use it when your application needs chat data without opening the dashboard.
Endpoint
POST https://chatflow.zeltacode.com/api/v1/chats/overview
curl -X POST "https://chatflow.zeltacode.com/api/v1/chats/overview" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}",
"pagination": {
"limit": 20,
"offset": 0
},
"filter": {
"ids": [
"{number}@c.us"
]
}
}'
{
"session": "{session}",
"pagination": {
"limit": 20,
"offset": 0
},
"filter": {
"ids": [
"{number}@c.us"
]
}
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "overview",
"session": "{session}",
"chat_id": null,
"chat_response": [
{
"id": "{number}@c.us",
"name": "Test Contact",
"picture": null
}
]
}
}
4. Get chat picture
Return the profile picture URL for one direct chat or group chat.
API name
Get chat picture
Purpose
Return the profile picture URL for one direct chat or group chat. Use it when your application needs chat data without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/chats/picture
curl -X GET "https://chatflow.zeltacode.com/api/v1/chats/picture?session={session}&chat_id={number}@c.us&refresh=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"chat_id": "{number}@c.us",
"refresh": false
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "picture",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": {
"url": "https://example.com/picture.jpg"
}
}
}
5. Mark chat unread
Mark a chat as unread.
API name
Mark chat unread
Purpose
Mark a chat as unread. Use it when your application needs chat data without opening the dashboard.
Endpoint
POST https://chatflow.zeltacode.com/api/v1/chats/unread
curl -X POST "https://chatflow.zeltacode.com/api/v1/chats/unread" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}",
"chat_id": "{number}@c.us"
}'
{
"session": "{session}",
"chat_id": "{number}@c.us"
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "unread",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": {
"success": true
}
}
}
6. Read chat messages
Mark unread messages in one chat as read.
API name
Read chat messages
Purpose
Mark unread messages in one chat as read. Use it when your application needs chat data without opening the dashboard.
Endpoint
POST https://chatflow.zeltacode.com/api/v1/chats/messages/read
curl -X POST "https://chatflow.zeltacode.com/api/v1/chats/messages/read" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}",
"chat_id": "{number}@c.us",
"messages": 30,
"days": 7
}'
{
"session": "{session}",
"chat_id": "{number}@c.us",
"messages": 30,
"days": 7
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "read-messages",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": {
"ids": [
"false_{number}@c.us_MESSAGE_ID"
]
}
}
}
7. Get chat messages
Return messages from one chat. Use chat_id=all only when searching by message id across chats.
API name
Get chat messages
Purpose
Return messages from one chat. Use chat_id=all only when searching by message id across chats. Use it when your application needs chat data without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/chats/messages
curl -X GET "https://chatflow.zeltacode.com/api/v1/chats/messages?session={session}&chat_id={number}@c.us&limit=10&offset=0&downloadMedia=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"chat_id": "{number}@c.us",
"limit": 10,
"offset": 0,
"downloadMedia": false
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "messages",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": [
{
"id": "false_{number}@c.us_MESSAGE_ID",
"from": "{number}@c.us",
"fromMe": false,
"body": "Hello"
}
]
}
}
8. Get message by id
Return one message by ID from a chat.
API name
Get message by id
Purpose
Return one message by ID from a chat. Use it when your application needs chat data without opening the dashboard.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/chats/messages/{message_id}
curl -X GET "https://chatflow.zeltacode.com/api/v1/chats/messages/false_{number}@c.us_MESSAGE_ID?session={session}&chat_id={number}@c.us&downloadMedia=1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}",
"chat_id": "{number}@c.us",
"downloadMedia": true
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "message",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": {
"id": "false_{number}@c.us_MESSAGE_ID",
"from": "{number}@c.us",
"body": "Hello",
"hasMedia": false
}
}
}
9. Edit message
Edit a text message or media caption.
API name
Edit message
Purpose
Edit a text message or media caption. Use it when your application needs chat data without opening the dashboard.
Endpoint
PUT https://chatflow.zeltacode.com/api/v1/chats/messages/{message_id}
curl -X PUT "https://chatflow.zeltacode.com/api/v1/chats/messages/false_{number}@c.us_MESSAGE_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}",
"chat_id": "{number}@c.us",
"text": "Updated message text"
}'
{
"session": "{session}",
"chat_id": "{number}@c.us",
"text": "Updated message text"
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "update-message",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": {
"success": true
}
}
}
10. Delete message
Delete one message from a chat.
API name
Delete message
Purpose
Delete one message from a chat. Use it when your application needs chat data without opening the dashboard.
Endpoint
DELETE https://chatflow.zeltacode.com/api/v1/chats/messages/{message_id}
curl -X DELETE "https://chatflow.zeltacode.com/api/v1/chats/messages/false_{number}@c.us_MESSAGE_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}",
"chat_id": "{number}@c.us"
}'
{
"session": "{session}",
"chat_id": "{number}@c.us"
}
{
"success": true,
"message": "Chat action completed.",
"data": {
"action": "delete-message",
"session": "{session}",
"chat_id": "{number}@c.us",
"chat_response": {
"success": true
}
}
}