Conversation History
Retrieve conversation history, messages, audio sources, tags, response recommendations, and insights.
Retrieve and analyze historical conversation data for users and services.
List Conversations
Retrieve conversations in an organization based on supplied filters.
Permissions
This endpoint may be impacted by the following permissions:
- The
final_messagefield in the response is only non-empty if the authenticated user has theConversation.GetMessagepermission on the final message. - The
version_set_infofield in the response is only non-empty if the authenticated user has theService.GetVersionSetpermission on the version set. - Only conversations for which the user has the
Conversation.GetConversationpermission are returned.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The identifier of the user whose conversations to retrieve.
[]The identifier of the service whose conversation to retrieve.
[]Whether the conversation is finished.
The ID of the conversation to retrieve.
[]The maximum number of conversations to retrieve.
150The continuation token returned from the previous response to retrieve the next set of conversations.
0The field to sort the conversations by. Supported fields are created_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.
[]The tags of the dynamic behavior sets. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.
[]The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
Whether there are more conversations to retrieve.
A token to supply to the next request to retrieve the next page of conversations. Only populated if has_more is True.
Invalid authorization credentials.
Missing required permissions.
Invalid request path parameter or query parameter failed validation.
The user has exceeded the rate limit of 15 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/conversation/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"conversations": [
{
"id": "text",
"user_id": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"is_finished": true,
"is_analyzed": true,
"completed_post_processings": [
"generate-user-models"
],
"final_message": "text",
"service_id": "text",
"version_set_info": {
"name": "text",
"agent_version_info": [],
"service_hierarchical_state_machine_version_info": [],
"llm_model_preferences": {
"ANY_ADDITIONAL_PROPERTY": {
"llm_name": "text",
"params": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
},
"num_messages": 1,
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
],
"has_more": true,
"continuation_token": 1
}Query Parameters
user_id
string (repeatable)
Filter by specific users
service_id
string (repeatable)
Filter by specific services
is_finished
boolean
Filter by conversation state
id
string (repeatable)
Filter by specific conversation IDs
tag
string (repeatable)
Filter by tags using key:value syntax (* matches any value; an empty value matches None)
sort_by
string (repeatable)
Sort field; supports created_at with a + (ascending) or - (descending) prefix
limit
integer
Results per page (max 150, default 150)
continuation_token
integer
Pagination token (a zero-based offset, default 0)
Get Conversation Messages
Retrieve all messages from a specific conversation.
Retrieve messages in a conversation, sorted in the specified order, up to the specified limit.
Permissions
This endpoint is impacted by the following permissions:
- Only messages that the authenticated user has
Conversation.GetMessagepermission on will be returned.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The identifier of the conversation.
^[a-f0-9]{24}$The IDs of the messages to retrieve.
[]The IDs of the interactions to retrieve messages for.
[]The maximum number of messages to return. At most 500 messages can be returned in one request.
500The continuation token to use to retrieve the next set of messages.
0The field to sort the messages by. Supported fields are interaction_id and created_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.
[]The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
Whether there are more, earlier messages in the conversation to retrieve.
The continuation token to use to retrieve the next set of messages.
Invalid authorization credentials.
Missing required permissions.
Specified organization or conversation is not found.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/conversation/{conversation_id}/messages/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"messages": [
{
"id": "text",
"interaction_id": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"sender": "text",
"message": "text",
"format": "text",
"message_type": "user-message"
}
],
"has_more": true,
"continuation_token": 1
}Retrieve Message Source
For non-text messages (for example, audio from voice channels), retrieve the original source data. The response is a signed URL to the raw message content.
Retrieve message source
Retrieve the raw source of the given message. It's only applicable to messages that did not originate as texts.
Permissions
This endpoint requires the following permissions:
Conversation:GetMessageon the the message.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The identifier of the conversation.
^[a-f0-9]{24}$The identifier of the message.
^[a-f0-9]{24}$Whether to generate a long-lived URL which lasts 12 hours. For security purposes, it's recommended to set this to false as much as possible.
falseThe Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
The message is a text message.
Invalid authorization credentials.
Missing required permissions.
Specified organization or message is not found.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 30 request per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/conversation/{conversation_id}/messages/{message_id}/source HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
No content
Query Parameters
long_lived
boolean
false
Generate a long-lived URL valid for 12 hours. Short-lived URLs are recommended for security.
Modify Conversation Tags
Add, update, or remove tags on a conversation. Tags are key-value pairs for categorization, filtering, and routing.
Permission required: Conversation:ModifyConversation
Modify the tags of a conversation.
Permissions
This endpoint requires the following permissions:
Conversation:ModifyConversationfor the conversation to modify tags for.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
^[a-f0-9]{24}$The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]A list of tags to remove from the conversation.
[]Succeeded.
No content
The conversation cannot contain more than 20 tags.
Invalid authorization credentials.
Missing required permissions.
Specified organization or conversation is not found.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/conversation/{conversation_id}/tags/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"updates": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"deletes": [
"text"
]
}No content
The request body supports two operations:
updates
object
A mapping of tags to add or update. Existing tags not included here remain unchanged.
deletes
array
A list of tag keys to remove from the conversation.
Recommend Responses
Generate recommended responses for the user based on the conversation history. Call this when the most recent interaction has concluded but the user has not yet responded.
Permission required: Conversation:GetRecommendedResponses
Recommend responses for interaction
Generate a recommended response for the user to send based on the existing chat history. This should be called when the most recent interaction had concluded for a while but the user still hasn't responded.
Permissions:
This endpoint requires the following permissions:
Conversation:GetRecommendedResponseson this conversation.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The identifier of the conversation.
^[a-f0-9]{24}$The identifier of the most recent interaction.
^[a-f0-9]{24}$The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]The context under which the recommended responses should be generated.
PERSONA:
Name: User
Background: A typical person seeking this service.
---
SCENARIO:
Name: Complete Service
Objective: Successfully complete the service interaction.
Instructions: Engage naturally with the agent to achieve the service objective.
Succeeded.
The recommended responses to the user.
The conversation is finished, or the supplied interaction ID doesn't correspond to the latest, completed interaction.
Invalid authorization credentials.
Missing required permissions.
Specified organization or conversation is not found.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/recommend_responses HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 270
{
"context": "\nPERSONA:\nName: User\nBackground: A typical person seeking this service.\n---\nSCENARIO:\nName: Complete Service\nObjective: Successfully complete the service interaction.\nInstructions: Engage naturally with the agent to achieve the service objective.\n"
}{
"recommended_responses": [
"text"
]
}The optional context field in the request body provides additional context for generating the recommendations.
Get Interaction Insights
Retrieve insights into the agent's reasoning and behavior for a given interaction. The response covers the current state, state transitions, working memory, reflections, and tool call logs.
Permissions required:
Conversation:GetInteractionInsightson the conversationOrganization:GetServiceHierarchicalStateMachineon the context graph used by the interaction
Get interaction insights
Retrieve insights about the agent's message for a given interaction.
Permissions:
This endpoint requires the following permissions:
Conversation:GetInteractionInsightson the conversation.Organization:GetServiceHierarchicalStateMachineon the state machine that the current interaction is in.
This endpoint may be impacted by the following permissions:
- Only reflection messages for which the authenticated user has the
Conversation:GetMessagepermission are included in the response.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The identifier of the conversation.
^[a-f0-9]{24}$The identifier of the interaction.
^[a-f0-9]{24}$The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
[]Succeeded.
The state the agent is in.
The action taken in the current state.
The objective of the current state.
A list of reflections the agent made during the generation of this message.
The ID and version number of the dynamic behavior set that was activated during this interaction.
Invalid authorization credentials.
Missing required permissions.
Specified organization, conversation, or interaction is not found.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 20 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/insights HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"current_state_name": "text",
"current_state_action": "text",
"current_state_objective": "text",
"state_transition_logs": [
{
"previous_state": "text",
"previous_service_hierarchical_state_machine_version_info": [],
"next_state": "text",
"next_service_hierarchical_state_machine_version_info": [],
"type": "action",
"previous_state_exit_condition_description": "text",
"tool_call_logs": [
[
{
"tool_name": "text",
"tool_id": "text",
"tool_version": "text",
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"output": "text",
"duration": 1
}
]
]
}
],
"working_memory": [
{
"content": "text",
"context": "text"
}
],
"reflections": [
"text"
],
"triggered_dynamic_behavior_set_version_info": [],
"select_next_action_tool_call_logs": [
[
{
"tool_name": "text",
"tool_id": "text",
"tool_version": "text",
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"output": "text",
"duration": 1
}
]
],
"engage_user_tool_call_logs": [
[
{
"tool_name": "text",
"tool_id": "text",
"tool_version": "text",
"input": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"output": "text",
"duration": 1
}
]
]
}The response includes:
current_state_name
The state the agent is currently in
current_state_action
The action taken in the current state
current_state_objective
The objective of the current state
state_transition_logs
Log of state transitions during the interaction
working_memory
Active memories used to generate the message
reflections
Reflections the agent made during message generation
triggered_dynamic_behavior_set_version_info
Dynamic behavior that was activated, if any
select_next_action_tool_call_logs
Tool calls during the SelectNextAction step
engage_user_tool_call_logs
Tool calls during the EngageUser step
Last updated
Was this helpful?

