Connect Chatter with your booking system, your CRM, or with n8n, Make or Zapier. Three pieces that can be used together or separately: a REST API, outbound notifications (webhooks) and AI actions.
Download OpenAPI spec
Use it to generate SDKs and schemas with any OpenAPI-compatible tool.
Integrations are included from the Basic plan (Basic, Professional, Business, Corporate and Enterprise). They are not available on Free or Starter: there the API and notifications respond 403. API keys, webhooks and AI actions are created and managed from the admin panel, in the 🔌 Integraciones tab.
| Resource | Limit |
|---|---|
| Active API keys | 10 per company |
| Webhooks | 10 per company |
| AI actions | 20 per company, up to 10 data fields per action |
| API requests | 120 per minute per key |
| Message text | 4000 characters |
Base: https://chat.teraservercloud.com/api/v1. It is a server-to-server API (CORS is not needed, and it is not meant to be used from a browser). All responses are JSON and everything is limited to the company that owns the key.
Create a key in the panel (Integraciones → Claves de API). It is shown in full only once; Chatter only stores its fingerprint. Send it with every request:
Authorization: Bearer chk_0123456789abcdef0123456789abcdef0123456789abcdef
120 requests per minute per key and 300 per minute across all the company's keys. Each response includes X-RateLimit-Limit and X-RateLimit-Remaining. If you go over, you get 429; wait until the next minute.
| Code | Meaning |
|---|---|
400 | Invalid or missing parameter (the body contains {"error": "..."}). |
401 | The key is missing, invalid or was revoked. |
403 | The company's plan does not include the API, the company is not active, or the WhatsApp line cannot send. |
404 | The resource (chat, ticket, user, etc.) does not exist or belongs to another company. |
409 | State or duplicate conflict: chat already closed, Instagram/Facebook outside the 24 h window, email mailbox that cannot send, chat not closed when reopening, number or holiday already added. |
422 | The data has the right type but is not acceptable (too long, out of range, URL not allowed, inactive user). |
429 | You exceeded a limit: 120 requests per minute per key, 300 per company, or the send limits (see below). |
502 | The message was saved but the channel (WhatsApp, Instagram, etc.) could not deliver it. |
500 | Internal error. |
/conversations — list chatsOptional parameters: status (open = new, open and pending, closed or all; default all), channel (whatsapp, instagram, facebook, webchat, telegram, email, mercadolibre), since (ISO 8601 date: chats with activity since that moment), limit (1 to 100, default 50) and offset, and the filters assigned_user_id, contact and q (see Chats). Order: most recent first.
Mercado Libre (channel=mercadolibre): conversations about item questions accept a single answer (409 if it was already answered) and sales conversations (after-sale) accept answers of up to 350 characters.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/conversations?status=open&limit=20"
{
"data": [
{
"id": 1234,
"channel": "whatsapp",
"status": "open",
"contact_phone": "5491122334455",
"contact_name": "María Pérez",
"assigned_user_id": 7,
"opened_at": "2026-10-01T13:02:11.000Z",
"last_message_at": "2026-10-01T13:40:02.000Z"
}
],
"limit": 20,
"offset": 0
}
contact_phone is the number on WhatsApp and Telegram, the contact identifier on Instagram and Facebook, and the email on Webchat and Email, and the numeric ID of the buyer on Mercado Libre (their nickname goes in contact_name).
/conversations/:id — detail and messagesReturns the chat and its latest messages in chronological order. limit (1 to 200, default 50) sets how many messages are returned.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/conversations/1234?limit=30"
{
"conversation": {
"id": 1234, "channel": "whatsapp", "status": "open",
"contact_phone": "5491122334455", "contact_name": "María Pérez",
"assigned_user_id": 7,
"opened_at": "2026-10-01T13:02:11.000Z", "closed_at": null,
"last_message_at": "2026-10-01T13:40:02.000Z",
"contact_lang": "en"
},
"messages": [
{ "id": 9001, "direction": "in", "text": "Hola, quiero un turno", "type": "text",
"media_url": null, "created_at": "2026-10-01T13:02:11.000Z", "sender": null,
"original_text": "Hello, I would like an appointment", "translated_lang": "en" },
{ "id": 9002, "direction": "out", "text": "¡Hola! ¿Para qué día?", "type": "text",
"media_url": null, "created_at": "2026-10-01T13:02:40.000Z", "sender": "Laura",
"original_text": "Hello! For which day?", "translated_lang": "en" }
]
}
direction is in (from the customer) or out (from your team, the AI or the API). media_url, when there is an attachment, is an absolute URL.
Automatic translation. If the company has automatic translation turned on (AI tab), text always comes in the company's language. When a message was translated, original_text holds the customer's original text (on an in message) or what was actually sent to the customer (on an out message), and translated_lang the language of that text (ISO code, for example en); if there was no translation, both are null. conversation.contact_lang is the last language detected for the customer (null if none was detected). What you send with POST /conversations/:id/messages is written in the company's language and is translated only just before it reaches the customer; each translation counts as one AI response toward the quota.
/conversations/:id/messages — reply to a chatSend limits: up to 5 messages per minute per chat and up to 10 consecutive API messages without the customer writing (429). On Instagram and Facebook you can only reply within 24 h of the customer's last message, and on Email only if the mailbox has its outgoing mail (SMTP) tested: otherwise you get 409 and nothing is saved. The same limits apply to /media.
Sends a text in that chat through its same channel (WhatsApp, Instagram, Facebook, Telegram, Webchat, Email or Mercado Libre). It only works on existing chats that are not closed. Mercado Libre: item questions accept a single answer and do not accept attachments; sales messages accept up to 350 characters.
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"text":"Tu turno quedó confirmado para el martes a las 10:00."}' \
"https://chat.teraservercloud.com/api/v1/conversations/1234/messages"
HTTP 201
{ "ok": true,
"message": { "id": 9010, "conversation_id": 1234, "direction": "out",
"text": "Tu turno quedó confirmado para el martes a las 10:00.",
"ack": "sent", "created_at": "2026-10-01T13:45:00.000Z" } }
On WhatsApp the message goes out at the same "human" pace as the panel (it may take a few seconds). If the channel rejects the message, the response is 502 with message_id.
/conversations/:id/close — close a chatcurl -X POST -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/conversations/1234/close"
{ "ok": true }
This is the same close action as in the panel: if the post-chat survey is enabled, it is sent to the customer.
Besides reading, replying to and closing chats, the API lets you do almost everything an administrator can do in the panel. The endpoints in this section always respond with {"data": ...} (lists add total, limit and offset when applicable) or {"error": "..."}. Everything is limited to the key's company: an id from another company responds 404, including when it comes in the body (for example user_id or conversation_id). Every write action is recorded in the platform log and shown live in your team's panel.
Request bodies are validated strictly: types, maximum lengths and allowed values. A wrong type responds 400; a value with the right type but not acceptable (too long, out of range, inactive user) responds 422.
/conversations — additional filtersBesides status, channel, since, limit and offset, it accepts: assigned_user_id (user id, or none for chats with no agent), contact (2 to 100 characters: searches the phone/identifier and the name) and q (2 to 100 characters: searches the text of messages from the last 6 months, or since since if that is more recent).
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/conversations?status=open&assigned_user_id=none&q=turno"
/conversations/:id/reopen — reopen a closed chatThe chat goes back to the queue (status new, no assigned agent), the same as when the contact writes again. It does not send anything to the customer.
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
"https://chat.teraservercloud.com/api/v1/conversations/1234/reopen"
{ "data": { "id": 1234, "status": "new" } }
Errors: 404 the chat does not exist; 409 the chat is not closed.
/conversations/:id/assign — assign or release a chatAssigns the chat to an active user in your company (same effects as taking or transferring it in the panel: it stays open, pending transfers are cancelled, and the agent sees it immediately). With user_id: null it goes back to the queue with no agent.
| Field | Type | Description |
|---|---|---|
user_id | integer or null | Id of a user (see GET /users). null returns it to the queue. |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"user_id":7}' \
"https://chat.teraservercloud.com/api/v1/conversations/1234/assign"
{ "data": { "id": 1234, "status": "open", "assigned_user_id": 7 } }
Errors: 400 user_id missing; 404 chat or user does not exist (or belongs to another company); 409 the chat is closed; 422 the user is not active.
/conversations/:id/notes — add an internal noteThe note appears in the chat thread inside the panel, visible only to your team. It is not sent to the customer, does not trigger outgoing notifications, does not count as a reply, and the AI does not read it. In the chat messages it appears with type: "note".
| Field | Type | Description |
|---|---|---|
text | string | Up to 4000 characters. |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"text":"Cliente VIP, derivar a Laura."}' \
"https://chat.teraservercloud.com/api/v1/conversations/1234/notes"
{ "data": { "id": 9020, "conversation_id": 1234, "text": "📝 Cliente VIP, derivar a Laura.", "created_at": "2026-10-01T14:00:00.000Z" } }
Errors: 400 text missing; 422 exceeds 4000 characters; 404 the chat does not exist.
/conversations/:id/media — send an image, audio, video or fileChatter downloads the URL you provide, stores it and sends it through the chat's same channel (WhatsApp, Instagram, Facebook, Telegram, Webchat, Email or Mercado Libre). On Mercado Libre, questions do not accept attachments, and in sales only jpg, png, pdf and txt are accepted, with messages of up to 350 characters. The URL must be https:// and public: private or internal addresses are rejected, redirects are not followed, the file cannot exceed 16 MB, and its Content-Type must match the requested type (the type is taken from the response's Content-Type, not from the URL extension) and be one of the allowed ones (image: jpg, png, gif, webp · audio: mp3, ogg, wav, m4a, webm · video: mp4, webm, mov · file: pdf, doc, docx, xls, xlsx, txt, zip). The chat must be open. Limits per company: one download at a time, 10 per minute and 300 per day (429); if sending fails, the file is discarded.
| Field | Type | Description |
|---|---|---|
url | string | Public https URL of the file (up to 500 characters). |
type | string | image, audio, video or file. Must match the file's extension. |
caption | string | Optional. Accompanying text (up to 1000 characters; on WhatsApp and Telegram it travels as a caption). |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://ejemplo.com/turno.pdf","type":"file","caption":"Comprobante de tu turno"}' \
"https://chat.teraservercloud.com/api/v1/conversations/1234/media"
HTTP 201
{ "data": { "id": 9021, "conversation_id": 1234, "direction": "out", "type": "file",
"text": "Comprobante de tu turno", "media_url": "https://chat.chatter.com.ar/media/uploads/12/ab12_1727790000.pdf",
"ack": "sent", "created_at": "2026-10-01T14:05:00.000Z" } }
Errors: 400 url or type missing; 404 the chat does not exist; 409 the chat is closed; 422 URL not allowed, could not be downloaded, over 16 MB or Content-Type not allowed; 429 company or per-chat limits; 409 channel without a 24 h window or without SMTP; 403 the WhatsApp line cannot send; 502 the channel could not deliver the file (message_id is included).
/users — company teamAgents, supervisors and administrators. Never returns passwords or access data. The email is only shown for agents and supervisors. Optional filter: role (agent, supervisor, admin).
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/users?role=agent"
{ "data": [ { "id": 7, "name": "Laura Gómez", "role": "agent", "active": true, "online": true,
"email": "[email protected]", "last_login": "2026-10-01T12:58:00.000Z" } ] }
/channels — WhatsApp lines and channelsLists the company's lines and channels with their status and whether the AI is active on each one. Never returns tokens, keys or email credentials. kind (line or channel) together with id identifies the account in PATCH /ai/accounts/:kind/:id.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/channels"
{ "data": [
{ "kind": "line", "id": 3, "type": "whatsapp", "label": "Ventas", "detail": "5491122334455", "status": "active", "ai_enabled": true },
{ "kind": "channel", "id": 11, "type": "webchat", "label": "Web", "detail": "https://miempresa.com", "status": "active", "ai_enabled": false } ] }
/stats — statistics for a periodOpen and closed chats per channel in the range, current status of all chats, messages received and sent, and AI response usage. from and to (YYYY-MM-DD, inclusive, sent together; maximum 92 days). Default: the last 30 days. responses_limit is null if there is no cap. It does not include first-response times: Chatter does not calculate them.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/stats?from=2026-09-01&to=2026-09-30"
{ "data": { "from": "2026-09-01", "to": "2026-09-30",
"conversations": { "opened": 410, "closed": 395,
"by_channel": { "whatsapp": { "opened": 300, "closed": 290 }, "instagram": { "opened": 60, "closed": 55 } } },
"current_by_status": { "new": 3, "open": 12, "pending": 0, "closed": 2890 },
"messages": { "in": 2210, "out": 2340 },
"ai": { "responses_used": 120, "responses_limit": 500 } } }
Errors: 400 invalid date; 422 the range exceeds 92 days.
/surveys — answered surveysRating (1 to 5), comment and chat of each survey answered in the range (from/to, default 30 days, maximum 366). Filters: rating (1 to 5), channel; paginated with limit (1 to 100) and offset.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/surveys?from=2026-09-01&to=2026-09-30&rating=5"
{ "data": [ { "conversation_id": 1234, "channel": "whatsapp", "contact_name": "María Pérez", "assigned_user_id": 7,
"rating": 5, "comment": "Excelente atención", "answered_at": "2026-09-12T15:20:00.000Z" } ],
"total": 1, "limit": 50, "offset": 0 }
Available if the company has tickets enabled (403 otherwise). Statuses: open, in_progress, closed. Priorities: low, normal, high, urgent.
/tickets — list ticketsFilters: status, priority, assigned_user_id, conversation_id, q (subject or contact), limit (1 to 100), offset.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/tickets?status=open&priority=urgent"
{ "data": [ { "id": 55, "subject": "No llega el turno", "description": null, "status": "open", "priority": "urgent",
"conversation_id": 1234, "contact_name": "María Pérez", "contact_phone": "5491122334455",
"assigned_user_id": null, "comment_count": 2, "created_at": "...", "updated_at": "...", "closed_at": null } ],
"total": 1, "limit": 50, "offset": 0 }
/tickets/:id — detail with commentscurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/tickets/55"
{ "data": { "id": 55, "subject": "No llega el turno", "status": "open", "priority": "urgent", "...": "...",
"comments": [ { "id": 1, "text": "Lo reviso hoy", "internal": true, "author": "API", "created_at": "..." } ] } }
Errors: 404 the ticket does not exist (or belongs to another company).
/tickets — create a ticketIf you provide conversation_id, the ticket is linked and an internal note appears in the chat.
| Field | Type | Description |
|---|---|---|
subject | string | Required, up to 300 characters. |
description | string | Up to 10000. |
priority | string | Default normal. |
conversation_id | integer | Linked chat (optional). |
contact_name / contact_phone | string | Optional; if there is a chat, they are taken from it. |
assigned_user_id | integer | Assigned user (optional). |
comment | string | First comment (optional, up to 4000). |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"subject":"No llega el turno","priority":"high","conversation_id":1234,"comment":"Reportado por WhatsApp"}' \
"https://chat.teraservercloud.com/api/v1/tickets"
HTTP 201
{ "data": { "id": 56 } }
Errors: 400 subject missing; 404 the chat or the assigned user does not exist; 422 field too long.
/tickets/:id — update a ticketSend only the fields that change: status, priority, subject, description (can be null), assigned_user_id (a user in your company or null).
curl -X PATCH -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"status":"closed"}' \
"https://chat.teraservercloud.com/api/v1/tickets/55"
{ "data": { "id": 55, "updated": true } }
Errors: 400 no fields or invalid value; 404 ticket or user does not exist.
/tickets/:id/comments — comment on a ticket| Field | Type | Description |
|---|---|---|
text | string | Required, up to 4000 characters. |
is_internal | boolean | Optional. true = internal comment. |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"text":"Resuelto, avisamos al cliente.","is_internal":false}' \
"https://chat.teraservercloud.com/api/v1/tickets/55/comments"
HTTP 201
{ "data": { "id": 2, "ticket_id": 55 } }
Errors: 400 text missing; 404 the ticket does not exist.
/quick-replies — quick repliescurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/quick-replies"
{ "data": [ { "id": 4, "label": "Saludo", "text": "¡Hola! ¿En qué te ayudo?", "sort_order": 0 } ] }
/quick-replies — create a quick replyMaximum 200 per company.
| Field | Type | Description |
|---|---|---|
label | string | Button text, up to 40 characters. |
text | string | Message, up to 4000. |
sort_order | integer | 0 to 100000 (optional). |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"label":"Saludo","text":"¡Hola! ¿En qué te ayudo?","sort_order":0}' \
"https://chat.teraservercloud.com/api/v1/quick-replies"
HTTP 201
{ "data": { "id": 4, "label": "Saludo", "text": "...", "sort_order": 0 } }
Errors: 400 fields missing; 422 label exceeds 40 or text exceeds 4000 characters.
/quick-replies/:id — edit a quick replySend at least one of label, text, sort_order; anything you do not send is kept.
curl -X PUT -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"text":"¡Hola! Gracias por escribirnos."}' \
"https://chat.teraservercloud.com/api/v1/quick-replies/4"
{ "data": { "id": 4, "label": "Saludo", "text": "¡Hola! Gracias por escribirnos.", "sort_order": 0 } }
Errors: 404 does not exist.
/quick-replies/:id — delete a quick replycurl -X DELETE -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
"https://chat.teraservercloud.com/api/v1/quick-replies/4"
{ "data": { "id": 4, "deleted": true } }
Errors: 404 does not exist.
/bans — blocked numberscurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/bans"
{ "data": [ { "id": 2, "phone": "5491100000000", "reason": "spam", "created_at": "..." } ] }
/bans — block a numberAs in the panel, it requires confirmation with "confirm": "BLOQUEAR" (in uppercase). Messages from a blocked number are ignored.
| Field | Type | Description |
|---|---|---|
phone | string | Only the digits are stored. |
reason | string | Optional, up to 255. |
confirm | string | Must be exactly BLOQUEAR. |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"phone":"+54 9 11 0000-0000","reason":"spam","confirm":"BLOQUEAR"}' \
"https://chat.teraservercloud.com/api/v1/bans"
HTTP 201
{ "data": { "id": 2, "phone": "5491100000000", "reason": "spam" } }
Errors: 400 confirm or phone missing; 409 already blocked; 422 the number must have between 4 and 20 digits.
/bans/:id — unblock a numbercurl -X DELETE -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
"https://chat.teraservercloud.com/api/v1/bans/2"
{ "data": { "id": 2, "deleted": true } }
Errors: 404 does not exist.
/business-hours — business hoursReturns the 7 days (day_of_week 0 to 6), whether the schedule is active, the time zone and the out-of-hours message.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/business-hours"
{ "data": { "enabled": true, "timezone": "America/Argentina/Buenos_Aires", "out_of_hours_message": "Atendemos de 9 a 18.",
"hours": [ { "day_of_week": 1, "is_open": true, "open_time": "09:00", "close_time": "18:00" } ] } }
/business-hours — replace the scheduleAll 7 days must always be sent. Optional: enabled (boolean), timezone (IANA zone) and out_of_hours_message (up to 1000).
curl -X PUT -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"enabled":true,"hours":[{"day_of_week":0,"is_open":false},{"day_of_week":1,"is_open":true,"open_time":"09:00","close_time":"18:00"}, "... hasta 7 días ..."]}' \
"https://chat.teraservercloud.com/api/v1/business-hours"
{ "data": { "updated": true } }
Errors: 400 not 7 days, a repeated day or invalid format; 422 open_time is not before close_time, or invalid time zone.
/holidays — holidayscurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/holidays"
{ "data": [ { "id": 9, "date": "2026-12-25", "name": "Navidad" } ] }
/holidays — add a holidaycurl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"date":"2026-12-25","name":"Navidad"}' \
"https://chat.teraservercloud.com/api/v1/holidays"
HTTP 201
{ "data": { "id": 9, "date": "2026-12-25", "name": "Navidad" } }
Errors: 400 invalid date; 409 there is already a holiday on that day.
/holidays/:id — delete a holidaycurl -X DELETE -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
"https://chat.teraservercloud.com/api/v1/holidays/9"
{ "data": { "id": 9, "deleted": true } }
Errors: 404 does not exist.
/knowledge/sources — knowledge base sourcescurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/knowledge/sources"
{ "data": [ { "id": 3, "type": "file", "name": "precios.txt", "chars": 4210, "created_at": "...", "updated_at": "..." } ] }
/knowledge/sources/:id — content of a sourcecurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/knowledge/sources/3"
{ "data": { "id": 3, "type": "file", "name": "precios.txt", "content": "...", "created_at": "...", "updated_at": "..." } }
Errors: 404 does not exist.
/knowledge/sources — upload or replace a sourceSame as uploading a text file in the panel: if a source with that name already exists, its content is replaced. The total of all sources cannot exceed 100000 characters (422). The summary the AI uses is not regenerated during the request: it stays "distill": "pending" and updates on its own within a few minutes (at most once every 10 minutes).
| Field | Type | Description |
|---|---|---|
name | string | Source name, up to 300 characters. |
content | string | Text, up to 100000 characters. |
curl -X POST -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"name":"precios.txt","content":"Plan Básico: ..."}' \
"https://chat.teraservercloud.com/api/v1/knowledge/sources"
HTTP 201
{ "data": { "id": 3, "name": "precios.txt", "chars": 4210, "changed": true, "distill": "pending" } }
Errors: 400 fields missing; 422 the content (or the knowledge base total) exceeds 100000 characters.
/knowledge/sources/:id — delete a sourcecurl -X DELETE -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
"https://chat.teraservercloud.com/api/v1/knowledge/sources/3"
{ "data": { "id": 3, "deleted": true, "distill": "pending" } }
Errors: 404 does not exist.
/ai — AI settingscurl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/ai"
{ "data": { "ai_enabled": true, "ai_mode": "first_line", "prompt": "Sos el asistente de ...", "escalation_keyword": "humano",
"platform_ai": true, "has_own_ai_key": false, "responses_used": 120, "responses_limit": 500 } }
/ai — change the AIOnly the fields an administrator can change in the panel. ai_mode: off, outside_hours (only outside business hours), first_line (always replies first) or no_agents (when no agents are online). ai_enabled: false is a shortcut for ai_mode: "off"; whether the AI is enabled for the company is set by the plan, which is why ai_enabled: true is not accepted (send ai_mode instead). As in the panel, if the plan does not include platform AI, you need to load your own key from the panel.
| Field | Type | Description |
|---|---|---|
ai_mode | string | See above. |
prompt | string | AI instructions, up to 20000 characters. |
escalation_keyword | string | Word that hands off to a person, up to 50. |
ai_enabled | boolean | Only false. |
curl -X PATCH -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"ai_mode":"outside_hours","prompt":"Sos el asistente de Mi Empresa..."}' \
"https://chat.teraservercloud.com/api/v1/ai"
{ "data": { "ai_enabled": true, "ai_mode": "outside_hours", "...": "..." } }
Errors: 400 no fields or invalid value; 403 the plan or the company does not have AI enabled; 422 prompt exceeds 20000 characters or ai_enabled: true.
/ai/accounts — AI per accountSame as GET /channels: each line and channel with its ai_enabled.
curl -H "Authorization: Bearer $CHATTER_KEY" \
"https://chat.teraservercloud.com/api/v1/ai/accounts"
/ai/accounts/:kind/:id — turn the AI on or off for an accountkind is line (WhatsApp line) or channel (Instagram, Facebook, Telegram, Webchat, Email, Mercado Libre), as listed in GET /channels.
curl -X PATCH -H "Authorization: Bearer $CHATTER_KEY" -H "Content-Type: application/json" \
-d '{"ai_enabled":false}' \
"https://chat.teraservercloud.com/api/v1/ai/accounts/line/3"
{ "data": { "kind": "line", "id": 3, "ai_enabled": false } }
Errors: 400 invalid kind or ai_enabled not a boolean; 404 the account does not exist (or belongs to another company).
Prefix: /api/v1/agenda. The API requires a Chatter key in the Authorization: Bearer header. The Agenda module must be enabled and the company must have API access. It is included from Basic. Successful responses use { "data": ... }, except for the pagination fields indicated.
| Method and route | Body or query | Successful response | Errors |
|---|---|---|---|
GET/slots | service_id required. Optional: professional_id, location_id, prefer_professional_id, from, to, mode (next, date, professional) and limit (1–5, default 5). Dates YYYY-MM-DD; to is inclusive and requires from. Without to, it searches up to 30 days; maximum 120 inclusive days. | { "data": Slot[] } | 400 invalid query, date, mode, range or limit; 403 module, API or company not enabled; 404 service, professional or location not found; 500. |
POST/appointments | { "client_id": integer, "service_id": integer, "slot": ApiSlotInput }. slot.service_id is optional and, if present, must match the service in the body. Extra keys are rejected. | 201 { "data": ApiAppointment }. The appointment is confirmed with source: "api". | 400 invalid body, ID or slot; 403 module, API or company not enabled; 404 client, service or reference not found; 409 professional does not offer the service, or time slot not available; 500. |
GET/appointments/:id | No body. | { "data": ApiAppointment } | 400 invalid ID; 403 module, API or company not enabled; 404 appointment not found; 500. |
PATCH/appointments/:id | Exactly one option: { "status": "confirmed" | "cancelled" | "attended" | "no_show", "cancelled_reason"?: string | null } or { "slot": ApiSlotInput, "service_id"?: integer }. The cancellation reason accepts up to 255 characters and is only sent when cancelling. The service sent must match the appointment's service. Extra keys are rejected. | { "data": ApiAppointment } | 400 invalid ID, body, status, slot, reason or service; 403 module, API or company not enabled; 404 appointment or reference not found; 409 conflicting time or status; 500. |
ApiSlotInput includes professional_id, location_id, start_at and end_at; optionally service_id and resource_id. Timestamps use ISO 8601 with seconds and a time zone, in UTC (Z) or with an offset ±HH:MM; they accept up to six decimals and 40 characters. The possible statuses are pending, confirmed, attended, no_show and cancelled.
Slot, returned by GET /slots, includes professional_id, professional_name, specialty_label, service_id, service_name, location_id, location_name, resource_id, resource_name, start_at, end_at, start_at_local, end_at_local and timezone. UTC dates are ISO 8601; resource fields can be null.
ApiAppointment returns the appointment and client data: id, company_id, client_id, first and last name, document, phone, professional, service, location, resource, start and end dates, time zone, status, source, conversation, notes, cancellation reason, reminders, attendance confirmation, author, and creation and update dates. Some optional fields can be null; timestamps are serialized as ISO 8601 UTC. Appointments include the client's document data and are limited to the key's company.
Search respects the service's duration and buffer, availability, time zone, business hours, blocks, appointments and temporary holds. Booking validates availability again; if the time slot was already taken, it responds 409.
| Method and route | Body or query | Successful response | Errors |
|---|---|---|---|
GET/clients | Optional: q (2–100 characters after trimming; searches document, name and phone), limit (1–100, default 50) and offset (0–1000000000, default 0). | { "data": ApiClientListItem[], "limit": number, "offset": number } | 400 invalid query; 403 module, API or company not enabled; 500. |
POST/clients | doc_number, first_name and last_name are required. Optional: doc_type (DNI, CUIT, PASSPORT or OTHER), phone (E.164), email, birth_date (YYYY-MM-DD), insurance, insurance_number and notes. It does not accept company_id or conversation_contact. | 201 { "data": ApiClient } | 400 invalid body, field, document, date, phone or email; 403 module, API or company not enabled; 409 duplicate document; 500. |
ApiClientListItem includes id, document, first and last name, phone, email, birth date, coverage, affiliate number, chat contact, and creation and update dates. It omits notes and company_id; the POST /clients response adds both keys.
doc_number accepts up to 40 characters of input and 32 after normalization; first_name and last_name, up to 100 characters. The phone accepts 20, the email 254, the coverage 160, the affiliate number 80 and the notes 2000. For existing clients, the list omits notes and company_id; POST /clients returns both keys. The document number is normalized to digits. Other types are trimmed and converted to uppercase.
Data and operations are limited to the company associated with the key. The API has no endpoints to request or validate identity codes through WhatsApp.
These routes are public: they do not use an API key. They are used by the booking page and by the portal the company shares with its patients. Each company has its own link (slug) and, on a white-label brand, they respond only under the brand's domain. All limits are counted on the server (per IP, per document and per patient) and return 429 when exceeded. The /api/v1/agenda API does not change: the statuses remain pending, confirmed, attended, no_show and cancelled; the visit stages (notified, waiting room, in progress) are internal panel data and are not exposed through the API.
| Method and route | Body or query | Response |
|---|---|---|
GET/api/public/agenda/:slug | No parameters. | Title, services and professionals enabled for online booking. No patient data. |
GET/api/public/agenda/:slug/slots | service_id (required), professional_id and from (YYYY-MM-DD) optional. | { "slots": [...] } with seven days of free times, respecting the company's minimum notice and maximum number of days. |
POST/api/public/agenda/:slug/book | service_id, slot, cf_token (Cloudflare Turnstile challenge) and patient with document number, date of birth, first name, last name, phone and email, all required. | 202 { "ok": true, "message": ... } always the same, whether or not the data matches a record: it does not reveal who is a patient. New patients and requests stay pending the clinic's confirmation. Errors before identity checks: 400, 409 time slot taken, 429 limits per IP, per company and per document. |
POST/api/portal/:slug/session | { "token": string } (single-use link, expires in 48 hours). | { "session": string }. The session lasts two hours and is sent as Authorization: Bearer. |
POST/api/portal/:slug/code/request and /code/verify | Document number, date of birth and channel (email or whatsapp); then the 6-digit code. | The request always responds the same, whether or not the data matches. Verification returns a session or 401. |
GET/api/portal/:slug/appointments, /shares | With session. | The patient's appointments and the quotes or files the clinic shared with them. |
POST/api/portal/:slug/appointments/:id/cancel and /reschedule | With session. The change carries { "slot": ... } with the same professional. | { "ok": true }. 409 if less than the minimum notice remains. |
POST/baja/:token | No body. It is the target of the List-Unsubscribe-Post header of campaigns. | Marks the patient as unsubscribed from the clinic's emails. |
The portal is installed as an app (PWA) from the phone's browser: /portal/:slug publishes its manifest.webmanifest and a service worker that only stores static files, never patient data.
Chatter sends a POST with JSON to your URL each time an event you subscribed to occurs. They are configured in the panel (Integraciones → Avisos): a public https:// URL, the events, and a secret that is generated automatically.
| Event | When |
|---|---|
message.received | A message from the customer arrived. |
message.sent | A message was sent to the customer (from an agent, the AI or the API). |
conversation.created | A new chat was opened (not triggered when an existing one is reopened). |
conversation.closed | A chat was closed. |
test | Sent by the "Enviar prueba" button in the panel. |
POST /tu/ruta HTTP/1.1
Content-Type: application/json
X-Chatter-Event: message.received
X-Chatter-Delivery: 5521
X-Chatter-Timestamp: 1790860931
X-Chatter-Signature: sha256=9f2c...e1
{
"event": "message.received",
"company_id": 12,
"created_at": "2026-10-01T13:02:11.482Z",
"data": {
"conversation": {
"id": 1234, "channel": "whatsapp", "status": "new",
"contact_phone": "5491122334455", "contact_name": "María Pérez",
"assigned_user_id": null,
"opened_at": "2026-10-01T13:02:11.000Z", "closed_at": null
},
"message": {
"id": 9001, "direction": "in", "text": "Hola, quiero un turno",
"type": "text", "media_url": null,
"created_at": "2026-10-01T13:02:11.000Z", "sender": "María Pérez"
}
}
}
In conversation.created and conversation.closed, data only contains conversation. If the message has an attachment, type is image, audio, video, etc., and media_url holds the absolute URL. In messages written by the AI, sender is "ai" and text comes without the robot prefix (in agent messages, sender is the agent's name). Incoming attachments are sent a few seconds later, when the download finishes. X-Chatter-Delivery is unique per delivery: use it to avoid processing the same event twice.
Respond with 2xx in less than 8 seconds. If you do not (error, timeout or any other code), Chatter retries up to 5 times, at 1, 5, 15, 60 and 240 minutes; after that it discards the notification. The result of the last attempt is shown in the panel. Redirects are not followed (a 3xx counts as a failure). It is best to respond quickly and process afterwards.
X-Chatter-Timestamp is the send time in Unix seconds. X-Chatter-Signature is sha256= followed by the HMAC-SHA256, in hexadecimal, of the string timestamp + "." + raw body using your secret. Compute it over the bytes received, before parsing the JSON, and reject requests whose timestamp differs by more than 5 minutes from your clock (this prevents someone from replaying a captured notification).
// Node.js (Express)
const crypto = require('crypto');
app.post('/chatter/aviso', express.raw({ type: 'application/json' }), (req, res) => {
const ts = req.get('X-Chatter-Timestamp') || '';
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(401); // more than 5 min
const esperado = 'sha256=' + crypto.createHmac('sha256', process.env.CHATTER_SECRET)
.update(ts + '.' + req.body).digest('hex');
const recibido = req.get('X-Chatter-Signature') || '';
const ok = esperado.length === recibido.length &&
crypto.timingSafeEqual(Buffer.from(esperado), Buffer.from(recibido));
if (!ok) return res.sendStatus(401);
const evento = JSON.parse(req.body);
// ... process evento.event / evento.data ...
res.sendStatus(200);
});
<?php
// PHP
$crudo = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_CHATTER_TIMESTAMP'] ?? '';
if (abs(time() - (int) $ts) > 300) { http_response_code(401); exit; } // more than 5 min
$esperado = 'sha256=' . hash_hmac('sha256', $ts . '.' . $crudo, getenv('CHATTER_SECRET'));
$recibido = $_SERVER['HTTP_X_CHATTER_SIGNATURE'] ?? '';
if (!hash_equals($esperado, $recibido)) { http_response_code(401); exit; }
$evento = json_decode($crudo, true);
// ... process $evento['event'] / $evento['data'] ...
http_response_code(200);
An action gives Chatter's AI a tool to query or record something in your system while it serves a customer. You define it in the panel (Integraciones → Acciones de la IA): a name (a-z, 0-9 and _), a description that the AI reads to know when to use it, the URL, and the data fields it needs (name, type text/number/yes-no, description, and whether it is required). The AI decides by itself when to use it and asks the customer for any missing required data. It works with any AI provider the account uses.
A JSON POST, signed the same way as the notifications (X-Chatter-Timestamp and X-Chatter-Signature with the action's secret):
{
"action": "consultar_turnos_libres",
"args": { "fecha": "2026-10-06" },
"conversation": { "id": 1234, "channel": "whatsapp",
"contact_phone": "5491122334455", "contact_name": "María Pérez" },
"company_id": 12
}
The headers include X-Chatter-Event: ai.action. When the action is tested with the panel's button, X-Chatter-Test: 1 is added and conversation.id is 0.
A 2xx with text or JSON (up to 32 KB; the AI reads the first 4000 characters), in less than 8 seconds. Any other code or a timeout is reported to the AI as an error, and the AI tells the customer it could not check. Return data, not instructions: the AI treats the response as information.
{ "fecha": "2026-10-06",
"turnos_libres": ["09:00", "09:30", "11:00", "16:30"],
"profesional": "Dra. Gómez" }
An action can be used up to 3 times per customer message (for example, check availability and then book).
Two actions defined in the panel:
| Name | Description for the AI | Data |
|---|---|---|
consultar_turnos_libres | Returns the free time slots for a day. Use it when the customer asks about availability. | fecha (text, required): YYYY-MM-DD |
reservar_turno | Books an appointment. Use it only when the customer has already chosen a day and time and confirmed. | fecha (text, required), hora (text, required): HH:MM, nombre (text, required) |
A real chat: the customer writes "do you have an appointment on Tuesday?" → the AI runs consultar_turnos_libres with that Tuesday's date → your system returns the times → the AI replies "We have 09:00, 09:30 and 11:00" → the customer picks 11:00 and gives their name → the AI runs reservar_turno → your system responds {"ok":true,"turno":"2026-10-06 11:00"} → the AI confirms the appointment.
// Node.js: one URL for both actions
app.post('/chatter/accion', express.raw({ type: 'application/json' }), async (req, res) => {
// 1) verify the signature (same as for notifications, using the action secret)
const ts = req.get('X-Chatter-Timestamp') || '';
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(401);
const esperado = 'sha256=' + crypto.createHmac('sha256', process.env.CHATTER_ACTION_SECRET)
.update(ts + '.' + req.body).digest('hex');
const recibido = req.get('X-Chatter-Signature') || '';
if (esperado.length !== recibido.length ||
!crypto.timingSafeEqual(Buffer.from(esperado), Buffer.from(recibido))) return res.sendStatus(401);
const { action, args } = JSON.parse(req.body);
if (action === 'consultar_turnos_libres') {
const libres = await miSistema.turnosLibres(args.fecha); // your logic
return res.json({ fecha: args.fecha, turnos_libres: libres });
}
if (action === 'reservar_turno') {
const turno = await miSistema.reservar(args.fecha, args.hora, args.nombre);
return res.json({ ok: true, turno });
}
res.status(400).json({ error: 'acción desconocida' });
});
If you use n8n, Make or Zapier, point the action to a Webhook node of the workflow (which must be public and https): the workflow queries Dentalink or another system and returns the response with a "Respond to Webhook" node.
Chatter is built to serve: it receives what your customers write, replies (with people or with AI) and integrates those chats with your systems. That is why the Chatter API does not allow writing first to a number that never wrote in.
For new outgoing messages, for example appointment reminders, TeraServer offers a separate service, the WhatsApp messaging service (WhatsApp API), which is contracted separately. Plans and terms: teraserver.com.ar/servicio-de-mensajes-de-whatsapp.
When you contract the service you receive a token for your plan in the client panel. Send a POST with JSON:
curl -X POST "https://wz.teraservercloud.com/endpoint/api_endpoint.php" \
-H "Content-Type: application/json" \
-d '{"token":"TU_TOKEN","phone":"5491122334455","text":"Hola María, te recordamos tu turno de mañana a las 10:00. Respondé este mensaje para confirmarlo o cambiarlo."}'
HTTP 202
{ "success": true, "message": "Message queued.", "message_id": "48213" }
phone is the number with country code, without +. The message is queued and goes out respecting the plan's sending pace and schedule. Common error responses: 401 (invalid token or inactive plan), 403 (expired plan), 429 (quota used up), 409 (outside the sending schedule). For attachments (media_url or media_base64) and the full details, see the service documentation or write to TeraServer support.
https://, without a username or password, on port 443 or 8443, and the domain cannot point to private or reserved addresses (localhost, 10.x, 172.16–31.x, 192.168.x, 169.254.x, 100.64–127.x and their IPv6 equivalents) or to this same server. They are validated when saved and again on each send, and redirects are not followed.X-Chatter-Delivery or by message.id.args on your system; it comes from a conversation with a customer.Questions about the integration? Write to us from the Chatter panel or to TeraServer support.