Conversation History
Retrieve conversation history, messages, audio sources, tags, response recommendations, and insights.
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.
Query Parameters
Get Conversation Messages
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.
Retrieve Message Source
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.
No content
Query Parameters
Modify Conversation Tags
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.
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.
No content
Recommend Responses
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.
Get Interaction Insights
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.
Last updated
Was this helpful?

