Smart Chat API
Messages, WhatsApp templates, conversations, agents and webhooks.
- Production:
https://chat.keybeapi.com - OpenAPI spec: chat.json
Every operation is authenticated with your API key, except the ones marked as public or user token only. See Authentication.
Some operations live on another host: each operation page shows its full URL.
Messages
Send messages as an agent and read the messages of a conversation.
| Method | Operation | Path |
|---|---|---|
| POST | Send a message as an agent | /message/adviser |
| GET | Get a message | /message |
| GET | List the messages of a conversation | /room/message |
Templates
WhatsApp templates: the way to start a conversation or to write after the 24-hour window.
| Method | Operation | Path |
|---|---|---|
| GET | List the templates of a WhatsApp line | /template |
| POST | Send a WhatsApp template | /message/proactivity |
Conversations
Find, list, transfer and close conversations (rooms) with your contacts.
| Method | Operation | Path |
|---|---|---|
| GET | Get a conversation | /rooms/byId |
| GET | Find the conversation of a contact | /rooms/roomByUser |
| GET | List conversations | /inbox/room |
| GET | List an agent's inbox filters | /config/filter |
| POST | Transfer a conversation | /rooms/transfer |
| POST | Close a conversation | /rooms/end |
Webhooks
Receive Smart Chat message events in your own system. Register up to 10 URLs per app; Biky sends a POST to each one with every message that matches its filters.
Events (type field of the payload)
| Event | When | Enabled by |
|---|---|---|
newMessage | A message is created in a conversation: written by the contact, an agent, the AI agent, a bot or an integration (templates included). | newMessages |
updateMessage | A message changes: delivery status (sent, user = delivered, read, failed with error), reactions, audio transcription… The previous version comes in oldMessage. | updateMessages |
senders filters both events by message.sender (user, advisor, bot, api, internal); by default only the contact's messages (user) are sent. Internal status messages (assignments, transfers, closures) are never sent.
Payload (WebhookEvent): { type, message, oldMessage?, room }. message is a Message and room is the Conversation as it is when the event is delivered.
Request: POST with Content-Type: application/json. If the webhook has a token, it comes in the Authorization header as <authorizationType> <token> (for example Bearer whsec_…), or the bare token when authorizationType is empty. Requests are not signed: use HTTPS, configure a token and check it; if you need certainty, read the message again with GET /message.
Delivery and retries: answer any 2xx within 10 seconds. If your endpoint doesn't answer in time, can't be reached, or answers 5xx or 429, Biky retries 30 to 60 seconds later, up to 3 attempts in total; after that the event is dropped. Other 4xx answers are final. Delivery is at least once and not ordered: deduplicate with type + message._id + message.updatedAt. Each webhook is retried on its own.
The payload schema and two full examples are in the callback of POST /v1/webhook.
| Method | Operation | Path |
|---|---|---|
| GET | List webhooks | /v1/webhook |
| POST | Create a webhook | /v1/webhook |
| GET | Get a webhook | /v1/webhook/{id} |
| PUT | Update a webhook | /v1/webhook/{id} |
| DEL | Delete a webhook | /v1/webhook/{id} |
Agents
People of your team, and the AI agent, who attend conversations.
| Method | Operation | Path |
|---|---|---|
| GET | List agents | /adviser |
Channels
WhatsApp lines, Instagram account and Facebook page connected to your app.
| Method | Operation | Path |
|---|---|---|
| GET | List connected channels | /config/channels |
| GET | List the product catalogs of a WhatsApp line | /config/whatsapp/{appUUID}/phone/{phoneNumber}/catalog |
Spaces
Spaces (inboxes) that split conversations by line, page, team or topic.
| Method | Operation | Path |
|---|---|---|
| GET | List spaces | /inbox |
Groups
Labels to organize the spaces of your app; a space references its groups by key.
| Method | Operation | Path |
|---|---|---|
| GET | List groups | /groups |
| POST | Create a group | /groups |
| GET | Get a group | /groups/{id} |
| PATCH | Rename a group | /groups/{id} |
| DEL | Delete a group | /groups/{id} |