Chats
Chats on your website widget (channel: web) and on WhatsApp (channel: whatsapp, with the customer's
number in contact_address). Reading needs chats:read; replying and closing need chats:write.
WhatsApp only allows free-form replies within 24 hours of the customer's last message: after that a reply
is refused with whatsapp_window_closed (reply_window_open tells you beforehand).
Replies you send show in the visitor's widget straight away, from "Team", exactly like a reply typed in
the portal inbox. Replying to a chat the AI is answering takes it over (status with_owner), so the AI
stops answering. To build a bot or route chats to your own help desk, subscribe a webhook endpoint to
chat.message.created and answer with POST /chats/{chat}/messages; skip messages with via_api: true,
which are your own.
Your website chats, newest first.
Query parameters
statusstringOptionalWho is answering a website chat right now.
One ofaiwith_agentwith_ownerclosedsincestring (date-time)OptionalChats started at or after this time (ISO 8601).
untilstring (date-time)OptionalChats started before this time (ISO 8601).
per_pageintegerOptionalHow many items per page, 1 to 100.
Minimum 1 · Maximum 100
cursorstring | nullOptionalThe
meta.next_cursor(ormeta.prev_cursor) of the previous page.Up to 1024 characters
Returns
Paginated set of ChatResource
dataarray of objectsRequiredlinksobjectRequiredmetaobjectRequired
Responses
- 200Paginated set of
ChatResource - 401The API key is missing, invalid, expired or revoked.
- 403The key does not have the
chats:readscope. - 422Validation error
- 429Too many requests for this key. Wait for the
Retry-Afterseconds.
curl https://vocenya.com/api/public/v1/chats \
-H "Authorization: Bearer $VOCENYA_API_KEY"{
"data": [
{
"id": 1,
"livemode": true,
"channel": "web",
"contact_address": "string",
"reply_window_open": true,
"status": "ai",
"page_url": "https://www.example.com/contact",
"handoff_summary": "string",
"handed_off_at": "2026-10-02T14:03:11+00:00",
"closed_at": "2026-10-02T14:03:11+00:00",
"last_message_at": "2026-10-02T14:03:11+00:00",
"lead_id": 1,
"messages": [
{
"id": 1,
"livemode": true,
"sender": "string",
"role": "visitor",
"author": "string",
"body": "string",
"via_api": true,
"created_at": "2026-10-02T14:03:11+00:00"
}
],
"created_at": "2026-10-02T14:03:11+00:00"
}
],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"meta": {
"path": "string",
"per_page": 1,
"next_cursor": "string",
"prev_cursor": "string"
}
}One chat with its messages. HIPAA-mode accounts get the chat without messages or handoff summary.
Path parameters
chatintegerRequiredThe chat id.
Returns
ChatResource
dataobjectRequired
Responses
- 200
ChatResource - 401The API key is missing, invalid, expired or revoked.
- 403The key does not have the
chats:readscope. - 404No record with that id belongs to your account.
- 429Too many requests for this key. Wait for the
Retry-Afterseconds.
curl https://vocenya.com/api/public/v1/chats/205 \
-H "Authorization: Bearer $VOCENYA_API_KEY"{
"data": {
"id": 1,
"livemode": true,
"channel": "web",
"contact_address": "string",
"reply_window_open": true,
"status": "ai",
"page_url": "https://www.example.com/contact",
"handoff_summary": "string",
"handed_off_at": "2026-10-02T14:03:11+00:00",
"closed_at": "2026-10-02T14:03:11+00:00",
"last_message_at": "2026-10-02T14:03:11+00:00",
"lead_id": 1,
"messages": [
{
"id": 1,
"livemode": true,
"sender": "string",
"role": "visitor",
"author": "string",
"body": "string",
"via_api": true,
"created_at": "2026-10-02T14:03:11+00:00"
}
],
"created_at": "2026-10-02T14:03:11+00:00"
}
}Reply in a live chat as your team. The visitor sees it at once, from "Team". A reply to a chat the AI is answering takes it over. Limited to 30 replies a minute per key, on top of the overall limit.
curl -X POST https://vocenya.com/api/public/v1/chats/205/messages \
-H "Authorization: Bearer $VOCENYA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body": "Thanks for waiting! We have an opening on Thursday at 3pm."}'Path parameters
chatintegerRequiredThe chat id.
Request body
bodystringRequiredThe reply, as plain text. The visitor sees it from "Team".
Up to 2000 characters
Returns
The message that was sent.
dataobjectRequired
Responses
- 201The message that was sent.
- 401The API key is missing, invalid, expired or revoked.
- 403Website live chat is not part of the plan (
live_chat_unavailable). - 404No record with that id belongs to your account.
- 409The chat has ended (
chat_closed). - 422A WhatsApp chat whose 24-hour reply window has closed (
whatsapp_window_closed): follow up with an approved template from the inbox. - 429Too many requests for this key. Wait for the
Retry-Afterseconds.
curl -X POST https://vocenya.com/api/public/v1/chats/205/messages \
-H "Authorization: Bearer $VOCENYA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "Thanks for waiting! We have an opening on Thursday at 3pm. Shall I hold it for you?"
}'{
"data": {
"id": 1,
"livemode": true,
"chat_id": 205,
"sender": "string",
"role": "team",
"author": "Team",
"body": "string",
"via_api": true,
"created_at": "2026-10-02T14:03:11+00:00"
}
}End a chat. The visitor sees that it ended. Closing a chat that already ended changes nothing.
curl -X POST https://vocenya.com/api/public/v1/chats/205/close \
-H "Authorization: Bearer $VOCENYA_API_KEY"Path parameters
chatintegerRequiredThe chat id.
Returns
ChatResource
dataobjectRequired
Responses
- 200
ChatResource - 401The API key is missing, invalid, expired or revoked.
- 403Website live chat is not part of the plan (
live_chat_unavailable). - 404No record with that id belongs to your account.
- 429Too many requests for this key. Wait for the
Retry-Afterseconds.
curl -X POST https://vocenya.com/api/public/v1/chats/205/close \
-H "Authorization: Bearer $VOCENYA_API_KEY"{
"data": {
"id": 1,
"livemode": true,
"channel": "web",
"contact_address": "string",
"reply_window_open": true,
"status": "ai",
"page_url": "https://www.example.com/contact",
"handoff_summary": "string",
"handed_off_at": "2026-10-02T14:03:11+00:00",
"closed_at": "2026-10-02T14:03:11+00:00",
"last_message_at": "2026-10-02T14:03:11+00:00",
"lead_id": 1,
"messages": [
{
"id": 1,
"livemode": true,
"sender": "string",
"role": "visitor",
"author": "string",
"body": "string",
"via_api": true,
"created_at": "2026-10-02T14:03:11+00:00"
}
],
"created_at": "2026-10-02T14:03:11+00:00"
}
}