curl -X GET "https://call.aiployees.com/api/user/conversations?type=widget&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://call.aiployees.com/api/user/conversations?type=widget&per_page=10',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data.data); // Array of conversations
import requests
response = requests.get(
'https://call.aiployees.com/api/user/conversations',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'type': 'widget',
'per_page': 10
}
)
data = response.json()
print(data['data'])
{
"current_page": 1,
"data": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"assistant_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"assistant_name": "Support Assistant",
"type": "widget",
"message_count": 12,
"total_cost": 0.0045,
"ai_enabled": true,
"created_at": "2025-01-25 14:30:00",
"updated_at": "2025-01-25 14:45:22"
},
{
"id": "8d0f7780-8536-51ef-055c-f18fd2g01bf8",
"assistant_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"assistant_name": "Support Assistant",
"type": "whatsapp",
"message_count": 8,
"total_cost": 0.0032,
"ai_enabled": true,
"created_at": "2025-01-25 10:15:00",
"updated_at": "2025-01-25 10:28:45"
}
],
"first_page_url": "https://call.aiployees.com/api/user/conversations?page=1",
"from": 1,
"last_page": 5,
"last_page_url": "https://call.aiployees.com/api/user/conversations?page=5",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://call.aiployees.com/api/user/conversations?page=1",
"label": "1",
"active": true
},
{
"url": "https://call.aiployees.com/api/user/conversations?page=2",
"label": "2",
"active": false
}
],
"next_page_url": "https://call.aiployees.com/api/user/conversations?page=2",
"path": "https://call.aiployees.com/api/user/conversations",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 68
}
Разговори
Списък на разговорите
Извеждане на всички разговори за автентифицирания потребител с филтриране и пагинация
GET
/
user
/
conversations
curl -X GET "https://call.aiployees.com/api/user/conversations?type=widget&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://call.aiployees.com/api/user/conversations?type=widget&per_page=10',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data.data); // Array of conversations
import requests
response = requests.get(
'https://call.aiployees.com/api/user/conversations',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'type': 'widget',
'per_page': 10
}
)
data = response.json()
print(data['data'])
{
"current_page": 1,
"data": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"assistant_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"assistant_name": "Support Assistant",
"type": "widget",
"message_count": 12,
"total_cost": 0.0045,
"ai_enabled": true,
"created_at": "2025-01-25 14:30:00",
"updated_at": "2025-01-25 14:45:22"
},
{
"id": "8d0f7780-8536-51ef-055c-f18fd2g01bf8",
"assistant_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"assistant_name": "Support Assistant",
"type": "whatsapp",
"message_count": 8,
"total_cost": 0.0032,
"ai_enabled": true,
"created_at": "2025-01-25 10:15:00",
"updated_at": "2025-01-25 10:28:45"
}
],
"first_page_url": "https://call.aiployees.com/api/user/conversations?page=1",
"from": 1,
"last_page": 5,
"last_page_url": "https://call.aiployees.com/api/user/conversations?page=5",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://call.aiployees.com/api/user/conversations?page=1",
"label": "1",
"active": true
},
{
"url": "https://call.aiployees.com/api/user/conversations?page=2",
"label": "2",
"active": false
}
],
"next_page_url": "https://call.aiployees.com/api/user/conversations?page=2",
"path": "https://call.aiployees.com/api/user/conversations",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 68
}
Този endpoint връща пагиниран списък на разговорите, принадлежащи на асистентите на автентифицирания потребител. Използвайте го за показване на история на разговорите, филтриране по тип или интеграция с вашия CRM.
Този endpoint изисква автентификация. Подайте вашия API ключ в
Authorization заглавката като Bearer token.Query параметри
string
Филтриране на разговори по тип. Възможни стойности:
test, widget, whatsapp, apiinteger
Филтриране на разговори по ID на асистент (трябва да принадлежи на автентифицирания потребител)
string
Филтриране на разговори от тази дата (YYYY-MM-DD формат)
string
Филтриране на разговори до тази дата (YYYY-MM-DD формат)
integer
Брой разговори на страница (1-100, по подразбиране: 15)
integer
Номер на страницата (по подразбиране: 1)
Полета в отговора
array
Show properties
Show properties
string
Уникалният UUID идентификатор на разговора
string
UUID на асистента, който обработва този разговор
string
Името на асистента, който обработва този разговор
string
Типът на разговора:
test, widget, whatsapp, или apiinteger
Общ брой съобщения в разговора
number
Общата цена на разговора в USD
boolean
Дали AI отговорите са разрешени за този разговор
string
Датата и часът, когато разговорът е създаден
string
Датата и часът, когато разговорът е последно обновен
integer
Номерът на текущата страница
integer
Брой елементи на страница
integer
Общ брой разговори, отговарящи на критериите
integer
Номерът на последната страница
curl -X GET "https://call.aiployees.com/api/user/conversations?type=widget&per_page=10" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://call.aiployees.com/api/user/conversations?type=widget&per_page=10',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data.data); // Array of conversations
import requests
response = requests.get(
'https://call.aiployees.com/api/user/conversations',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'type': 'widget',
'per_page': 10
}
)
data = response.json()
print(data['data'])
{
"current_page": 1,
"data": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"assistant_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"assistant_name": "Support Assistant",
"type": "widget",
"message_count": 12,
"total_cost": 0.0045,
"ai_enabled": true,
"created_at": "2025-01-25 14:30:00",
"updated_at": "2025-01-25 14:45:22"
},
{
"id": "8d0f7780-8536-51ef-055c-f18fd2g01bf8",
"assistant_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"assistant_name": "Support Assistant",
"type": "whatsapp",
"message_count": 8,
"total_cost": 0.0032,
"ai_enabled": true,
"created_at": "2025-01-25 10:15:00",
"updated_at": "2025-01-25 10:28:45"
}
],
"first_page_url": "https://call.aiployees.com/api/user/conversations?page=1",
"from": 1,
"last_page": 5,
"last_page_url": "https://call.aiployees.com/api/user/conversations?page=5",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://call.aiployees.com/api/user/conversations?page=1",
"label": "1",
"active": true
},
{
"url": "https://call.aiployees.com/api/user/conversations?page=2",
"label": "2",
"active": false
}
],
"next_page_url": "https://call.aiployees.com/api/user/conversations?page=2",
"path": "https://call.aiployees.com/api/user/conversations",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 68
}
Типове разговори
| Тип | Описание |
|---|---|
test | Вътрешни тестови разговори от интерфейса за тестване на асистента |
widget | Разговори от web chat widget-а |
whatsapp | WhatsApp Business разговори |
api | Разговори, създадени чрез API |
Случаи на употреба
- Analytics табло: Показване на метрики и тенденции на разговорите
- CRM интеграция: Синхронизация на данните за разговорите с вашата клиентска база данни
- Мониторинг на качеството: Преглед на обемите разговори по тип и асистент
- Преглед на фактурирането: Проследяване на разходите за разговори в цялата ви организация

