curl -X GET "https://app.autocalls.ai/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7"
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://app.autocalls.ai/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://app.autocalls.ai/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"
}
}
]
}
],
"variables": {
"user_name": "Jane Smith",
"plan": "premium"
}
}
{
"status": true,
"history": [
{
"role": "assistant",
"content": "Hi! I'm following up on your recent inquiry. How can I help you today?"
},
{
"role": "user",
"content": "I wanted to know more about your enterprise plan"
}
],
"variables": {
"lead_id": "12345",
"source": "website"
},
"external_identifier": "crm-lead-12345"
}
{
"status": true,
"history": [
{
"role": "user",
"content": "Hi, I need help with my order"
},
{
"role": "assistant",
"content": "Hello! I'd be happy to help you with your order. Could you please provide your order number?"
}
],
"variables": null,
"whatsapp_sender": {
"name": "Acme Corp Support",
"phone": "+14155551234"
},
"customer": {
"name": "John Doe",
"phone": "+14155559876"
}
}
{
"status": false,
"error": "Conversation not found"
}
Conversations
Get Conversation
Retrieve the message history of a conversation
GET
/
conversations
/
{uuid}
curl -X GET "https://app.autocalls.ai/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7"
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://app.autocalls.ai/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://app.autocalls.ai/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"
}
}
]
}
],
"variables": {
"user_name": "Jane Smith",
"plan": "premium"
}
}
{
"status": true,
"history": [
{
"role": "assistant",
"content": "Hi! I'm following up on your recent inquiry. How can I help you today?"
},
{
"role": "user",
"content": "I wanted to know more about your enterprise plan"
}
],
"variables": {
"lead_id": "12345",
"source": "website"
},
"external_identifier": "crm-lead-12345"
}
{
"status": true,
"history": [
{
"role": "user",
"content": "Hi, I need help with my order"
},
{
"role": "assistant",
"content": "Hello! I'd be happy to help you with your order. Could you please provide your order number?"
}
],
"variables": null,
"whatsapp_sender": {
"name": "Acme Corp Support",
"phone": "+14155551234"
},
"customer": {
"name": "John Doe",
"phone": "+14155559876"
}
}
{
"status": false,
"error": "Conversation not found"
}
This endpoint retrieves the complete message history of an existing conversation. Use this to display previous messages when resuming a conversation or to review conversation content.
Path Parameters
string
required
The unique UUID identifier of the conversation to retrieve
Response Fields
boolean
Indicates whether the request was successful
array
object
Custom variables associated with the conversation (key-value pairs). Returns
null if no variables are set.string
Your external system’s identifier for this conversation. Only present for
api type conversations that have an external identifier set.object
object
Error Responses
boolean
Will be
false when an error occursstring
Error message. Possible values:
Conversation not found- The provided UUID does not match any conversation
curl -X GET "https://app.autocalls.ai/api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7"
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://app.autocalls.ai/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://app.autocalls.ai/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"
}
}
]
}
],
"variables": {
"user_name": "Jane Smith",
"plan": "premium"
}
}
{
"status": true,
"history": [
{
"role": "assistant",
"content": "Hi! I'm following up on your recent inquiry. How can I help you today?"
},
{
"role": "user",
"content": "I wanted to know more about your enterprise plan"
}
],
"variables": {
"lead_id": "12345",
"source": "website"
},
"external_identifier": "crm-lead-12345"
}
{
"status": true,
"history": [
{
"role": "user",
"content": "Hi, I need help with my order"
},
{
"role": "assistant",
"content": "Hello! I'd be happy to help you with your order. Could you please provide your order number?"
}
],
"variables": null,
"whatsapp_sender": {
"name": "Acme Corp Support",
"phone": "+14155551234"
},
"customer": {
"name": "John Doe",
"phone": "+14155559876"
}
}
{
"status": false,
"error": "Conversation not found"
}
Variables
All conversations include avariables field containing custom key-value pairs set when the conversation was created. Use variables to:
- Store user context (name, plan, preferences)
- Track lead information from your forms
- Pass custom data for personalized AI responses
API Conversations
For API-created conversations, the response may include anexternal_identifier field if one was set when creating the conversation. This allows you to:
- Link conversations to your CRM leads or contacts
- Track conversations across your internal systems
- Look up conversations by your external reference
WhatsApp Conversations
For WhatsApp conversations, the response includes additional fields:- whatsapp_sender: The business WhatsApp number that handled the conversation (name and phone)
- customer: The customer who initiated or received the conversation (name and phone)
Use Cases
- Resume conversations: Retrieve history when a user returns to continue a conversation
- Analytics: Review conversation content for quality assurance
- CRM Integration: Use
external_identifierandvariablesto sync with your CRM - WhatsApp tracking: Match conversations to customers using their phone numbers

