API Documentation
Presence
Presence is the online, typing, recording, paused, or offline state for a connected session or chat. Use it to make automations feel live, such as showing typing before sending a reply.
Common rules
Authentication
Send Authorization: Bearer YOUR_API_KEY with every request.
Presence values
online and offline are global. typing, recording, and paused require a chat.
Chat ID
Use chat_id like {number}@c.us, or send to with a phone number for set presence.
Endpoints
https://chatflow.zeltacode.com/api/v1/messages/presence
Set the connected session as online, offline, typing, recording, or paused.
https://chatflow.zeltacode.com/api/v1/presence/chat/{chat_id}
Return the latest known presence state for one chat.
https://chatflow.zeltacode.com/api/v1/presence/chat/{chat_id}/subscribe
Subscribe to presence updates for one chat so updates can be delivered by webhook.
https://chatflow.zeltacode.com/api/v1/presence
Return all known presence entries for the connected session.
Events
Presence updates can be delivered to your configured webhook after you subscribe to a chat or when the session receives presence activity.
presence.update
1. Set presence
Set the connected session as online, offline, typing, recording, or paused.
API name
Set presence
Purpose
Set the connected session as online, offline, typing, recording, or paused. Use it when your application needs live state around chats and replies.
Endpoint
POST https://chatflow.zeltacode.com/api/v1/messages/presence
curl -X POST "https://chatflow.zeltacode.com/api/v1/messages/presence" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}",
"to": "{number}",
"payload": {
"presence": "typing"
}
}'
{
"session": "{session}",
"to": "{number}",
"payload": {
"presence": "typing"
}
}
{
"success": true,
"message": "Message action completed.",
"data": {
"action": "presence",
"session": "{session}",
"chat_id": null,
"presence_response": {
"success": true
}
}
}
2. Get chat presence
Return the latest known presence state for one chat.
API name
Get chat presence
Purpose
Return the latest known presence state for one chat. Use it when your application needs live state around chats and replies.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/presence/chat/{chat_id}
curl -X GET "https://chatflow.zeltacode.com/api/v1/presence/chat/{number}@c.us?session={session}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}"
}
{
"success": true,
"message": "Presence action completed.",
"data": {
"action": "chat",
"session": "{session}",
"chat_id": "{number}@c.us",
"presence_response": {
"id": "{number}@c.us",
"lastKnownPresence": "available",
"lastSeen": 1784617989
}
}
}
3. Subscribe to chat presence
Subscribe to presence updates for one chat so updates can be delivered by webhook.
API name
Subscribe to chat presence
Purpose
Subscribe to presence updates for one chat so updates can be delivered by webhook. Use it when your application needs live state around chats and replies.
Endpoint
POST https://chatflow.zeltacode.com/api/v1/presence/chat/{chat_id}/subscribe
curl -X POST "https://chatflow.zeltacode.com/api/v1/presence/chat/{number}@c.us/subscribe" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"session": "{session}"
}'
{
"session": "{session}"
}
{
"success": true,
"message": "Presence action completed.",
"data": {
"action": "subscribe",
"session": "{session}",
"chat_id": "{number}@c.us",
"presence_response": {
"success": true
}
}
}
4. Get all presence
Return all known presence entries for the connected session.
API name
Get all presence
Purpose
Return all known presence entries for the connected session. Use it when your application needs live state around chats and replies.
Endpoint
GET https://chatflow.zeltacode.com/api/v1/presence
curl -X GET "https://chatflow.zeltacode.com/api/v1/presence?session={session}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
{
"session": "{session}"
}
{
"success": true,
"message": "Presence action completed.",
"data": {
"action": "list",
"session": "{session}",
"chat_id": null,
"presence_response": [
{
"id": "{number}@c.us",
"lastKnownPresence": "composing"
}
]
}
}