← Hub API
Chats
Singular: Chat — Base URL: https://hub-api.ayoune.app — Access: CRUD
Try it now
beta
Response (live)
Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.
Example response (recorded) sample
A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.
{
"payload": {
"_id": "65e06ecb1e1be45a37c624bc",
"_user": "6045f4d25704710012485569",
"priority": 0,
"ayoune_ac": "",
"status": "new",
"isStarted": false,
"botSentFirstMessage": false,
"isClosed": false,
"topic": "support",
"name": "",
"email": "",
"goal": "",
"rating": 0,
"language": "de",
"createdBy": "6045f4d25704710012485569",
"createdAt": "2024-02-29T11:47:23.256Z",
"updatedAt": "2024-02-29T11:47:23.256Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://hub-api.ayoune.app/chats/65e06ecb1e1be45a37c624bc",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "Teams",
"title": "MODEL_TEAM",
"href": "https://api.ayoune.app/config/teams",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.teams"
},
{
"rel": "Consumers",
"title": "MODEL_CONSUMER",
"href": "https://api.ayoune.app/crm/consumers",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "crm.consumers"
},
{
"rel": "ChatWidgets",
"title": "MODEL_CHATWIDGET",
"href": "https://api.ayoune.app/marketing/chatwidgets",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "marketing.chatwidgets"
},
{
"rel": "Tasks",
"title": "MODEL_TASK",
"href": "https://api.ayoune.app/pm/tasks",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "pm.tasks"
},
{
"rel": "Bots",
"title": "MODEL_BOT",
"href": "https://api.ayoune.app/ai/bots",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "ai.bots"
}
],
"debugId": "6a62e03c2b20d6ae273beed8",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_CHAT",
"href": "https://api.ayoune.app/hub/chats/65e06ecb1e1be45a37c624bc/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_CHAT",
"href": "https://api.ayoune.app/hub/chats/65e06ecb1e1be45a37c624bc/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.11.3",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "2491",
"reset": "1784868426",
"resetDate": "Fri Jul 24 2026"
},
"responseTime": 111.982432,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /chats |
List with filters/pagination | hub.chats.view |
| GET | /chats/:id |
Single record | hub.chats.view |
| POST | /chats |
Create new record | hub.chats.new |
| PUT | /chats |
Update record | hub.chats.edit |
| DELETE | /chats/:id |
Delete record | hub.chats.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.hub.chats.find().limit(10).exec();
// Single record
const one = await ay.hub.chats.findById('OBJECT_ID').exec();
// Create
const created = await ay.hub.chats.create({ name: 'Foo' });