curl -X GET "https://call.aiployees.com/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7"
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://call.aiployees.com/api/conversations/${conversationId}`
);
const data = await response.json();
console.log(data.history);
import requests
conversation_id = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
response = requests.get(
f'https://call.aiployees.com/api/conversations/{conversation_id}'
)
data = response.json()
print(data['history'])
{
"status": true,
"history": [
{
"role": "assistant",
"content": "Hello! Welcome to our support. How can I help you today?"
},
{
"role": "user",
"content": "I'd like to schedule a demo"
},
{
"role": "assistant",
"content": "I'd be happy to help you schedule a demo! I have availability tomorrow at 2 PM or Thursday at 10 AM. Which works better for you?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"date_range": "next_7_days"
},
"result": {
"available_slots": ["2025-01-10 14:00", "2025-01-12 10:00"]
}
}
]
},
{
"role": "user",
"content": "Thursday at 10 AM works for me"
},
{
"role": "assistant",
"content": "I've scheduled your demo for Thursday, January 12th at 10 AM. You'll receive a calendar invitation shortly. Is there anything specific you'd like us to cover during the demo?",
"function_calls": [
{
"name": "book_appointment",
"arguments": {
"datetime": "2025-01-12T10:00:00",
"title": "Product Demo"
},
"result": {
"success": true,
"booking_id": "abc123"
}
}
]
}
]
}
{
"status": false,
"error": "Conversation not found"
}
Разговори
Получаване на разговор
Извличане на историята на съобщенията от разговор
GET
/
conversations
/
{uuid}
curl -X GET "https://call.aiployees.com/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7"
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://call.aiployees.com/api/conversations/${conversationId}`
);
const data = await response.json();
console.log(data.history);
import requests
conversation_id = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
response = requests.get(
f'https://call.aiployees.com/api/conversations/{conversation_id}'
)
data = response.json()
print(data['history'])
{
"status": true,
"history": [
{
"role": "assistant",
"content": "Hello! Welcome to our support. How can I help you today?"
},
{
"role": "user",
"content": "I'd like to schedule a demo"
},
{
"role": "assistant",
"content": "I'd be happy to help you schedule a demo! I have availability tomorrow at 2 PM or Thursday at 10 AM. Which works better for you?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"date_range": "next_7_days"
},
"result": {
"available_slots": ["2025-01-10 14:00", "2025-01-12 10:00"]
}
}
]
},
{
"role": "user",
"content": "Thursday at 10 AM works for me"
},
{
"role": "assistant",
"content": "I've scheduled your demo for Thursday, January 12th at 10 AM. You'll receive a calendar invitation shortly. Is there anything specific you'd like us to cover during the demo?",
"function_calls": [
{
"name": "book_appointment",
"arguments": {
"datetime": "2025-01-12T10:00:00",
"title": "Product Demo"
},
"result": {
"success": true,
"booking_id": "abc123"
}
}
]
}
]
}
{
"status": false,
"error": "Conversation not found"
}
Този endpoint извлича пълната история на съобщенията от съществуващ разговор. Използвайте го за показване на предишни съобщения при възобновяване на разговор или за преглед на съдържанието на разговора.
Path параметри
string
required
Уникалният UUID идентификатор на разговора за извличане
Полета в отговора
boolean
Указва дали заявката е била успешна
array
Масив от съобщения в разговора, подредени хронологично (най-старите първи).
Отговори при грешка
boolean
Ще бъде
false когато възникне грешкаstring
Съобщение за грешка. Възможни стойности:
Conversation not found- Предоставеният UUID не съответства на никой разговор
curl -X GET "https://call.aiployees.com/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7"
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://call.aiployees.com/api/conversations/${conversationId}`
);
const data = await response.json();
console.log(data.history);
import requests
conversation_id = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
response = requests.get(
f'https://call.aiployees.com/api/conversations/{conversation_id}'
)
data = response.json()
print(data['history'])
{
"status": true,
"history": [
{
"role": "assistant",
"content": "Hello! Welcome to our support. How can I help you today?"
},
{
"role": "user",
"content": "I'd like to schedule a demo"
},
{
"role": "assistant",
"content": "I'd be happy to help you schedule a demo! I have availability tomorrow at 2 PM or Thursday at 10 AM. Which works better for you?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"date_range": "next_7_days"
},
"result": {
"available_slots": ["2025-01-10 14:00", "2025-01-12 10:00"]
}
}
]
},
{
"role": "user",
"content": "Thursday at 10 AM works for me"
},
{
"role": "assistant",
"content": "I've scheduled your demo for Thursday, January 12th at 10 AM. You'll receive a calendar invitation shortly. Is there anything specific you'd like us to cover during the demo?",
"function_calls": [
{
"name": "book_appointment",
"arguments": {
"datetime": "2025-01-12T10:00:00",
"title": "Product Demo"
},
"result": {
"success": true,
"booking_id": "abc123"
}
}
]
}
]
}
{
"status": false,
"error": "Conversation not found"
}
Случаи на употреба
- Възобновяване на разговори: Извличане на история когато потребител се връща за да продължи разговор
- Аналитика: Преглед на съдържанието на разговора за осигуряване на качество
- Интеграция: Синхронизиране на данни от разговор с вашата CRM или support система
⌘I

