Get conversation by id (deprecated)
GET/api/v2/conversation
This endpoint is obsolete. Please use '/api/v2/agent/{agentCode}/conversation/{conversationId}' instead.
Request
Query Parameters
Use this param to override the culture of the response. Options: - en (default) - es
Responses
- 200
- 401
- 403
- 404
- 500
Success
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
Array [
]
Array [
]
Array [
Array [
]
]
Array [
]
Array [
- KnowledgeFile
- KnowledgeWebsite
- WebSearch
]
]
Array [
]
Array [
]
Array [
]
Array [
]
usage
object
The token usage of an instance.
costs
object
The cost of an instance, in the tenant's currency.
The cost of the sub agents the instance executed, already counted in total.
The cost of the whole chain: the instance's own tokens and services plus subAgents.
messages
object[]
nullable
The conversation messages in chronological order, each with the per-message sections requested via include.
metaAnalysis
object
Meta-analysis produced for the message when the agent has meta-analysis enabled. Free-form: the set of sections depends on the agent's configuration.
Meta-analysis produced for the message when the agent has meta-analysis enabled. Free-form: the set of sections depends on the agent's configuration.
tokenUsage
object
The token usage of a single message.
attachedVolatileKnowledges
object[]
nullable
executorTaskLogs
object[]
nullable
input
object[]
nullable
The input used in the message execution. Populated only when include=input.
skills
object[]
nullable
The skills executed for this message. Populated only when include=skills.
input
object[]
nullable
usage
object
knowledge
object[]
nullable
The knowledge retrieved for this message. Populated only when include=knowledge.
citations
object[]
nullable
The citations associated with this message. Populated only when include=citations.
source
object
nullable
oneOf
costs
object
The cost of a single message, in the tenant's currency. Kept apart from the instance cost object:
the token figures here are the message's share of the conversation, not an amount charged to it on its own.
The cost of the sub agents executed during this message, already counted in total.
Messages recorded before the field existed report zero.
True when the user sent this message while the agent was answering, and it was merged into that answer.
costBreakdown
object
The usage and cost of every execution in the conversation's chain, as a tree rooted at the conversation.
Populated only when include=costBreakdown is requested.
usage
object
The token usage of an instance.
cost
object
Sum of prompt and completion, without the services or the sub agents.
services
object
transcription
object[]
nullable
usage
object
cost
object
embeddings
object[]
nullable
usage
object
cost
object
images
object[]
nullable
usage
object
cost
object
subAgents
object[]
nullable
{
"id": "string",
"name": "string",
"startDate": "2024-07-29T15:51:28.071Z",
"endDate": "2024-07-29T15:51:28.071Z",
"messagesJson": "string",
"userIdentifier": "string",
"conversationStarters": [
"string"
],
"useVision": true,
"open": true,
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"costs": {
"prompt": 0,
"completion": 0,
"services": 0,
"subAgents": 0,
"total": 0,
"currency": "string"
},
"messages": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sender": "string",
"type": "string",
"value": "string",
"createdAt": "2024-07-29T15:51:28.071Z",
"metaAnalysis": {},
"tokenUsage": {
"promptTokens": 0,
"completionTokens": 0,
"reasoningTokens": 0,
"calculatedSystemDefinitionTokens": 0,
"calculatedKnowledgeTokens": 0,
"calculatedVolatileKnowledgeTokens": 0,
"calculatedUserMessageTokens": 0,
"calculatedMessagesTokens": 0,
"calculatedSkillInputTokens": 0,
"usedSkills": true,
"includedVision": true
},
"attachedVolatileKnowledges": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"expirationDate": "2024-07-29T15:51:28.071Z",
"fileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"fileName": "string",
"fileSize": 0,
"downloadUrl": "string"
}
],
"executorTaskLogs": [
{
"key": "string",
"description": "string",
"duration": 0,
"success": true
}
],
"canceledByClient": true,
"input": [
{
"key": "string"
}
],
"skills": [
{
"name": "string",
"tool": "string",
"input": [
{
"key": "string"
}
],
"output": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"success": true,
"error": "string",
"iteration": 0,
"durationMs": 0,
"startDate": "2024-07-29T15:51:28.071Z"
}
],
"knowledge": [
{
"fileId": "string",
"fileName": "string",
"content": "string",
"relevance": 0,
"pageFrom": 0,
"pageTo": 0,
"position": 0,
"totalTokenCount": 0
}
],
"citations": [
{
"citationIndex": 0,
"startIndex": 0,
"endIndex": 0,
"relevance": 0,
"source": {},
"citedText": "string"
}
],
"costs": {
"prompt": 0,
"completion": 0,
"services": 0,
"subAgents": 0,
"total": 0,
"currency": "string"
},
"isInterruption": true
}
],
"costBreakdown": {
"instanceId": "string",
"agentId": "string",
"agentCode": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
},
"services": {
"transcription": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"embeddings": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
],
"images": [
{
"instanceId": "string",
"usage": {
"promptTokens": 0,
"completionTokens": 0,
"totalTokens": 0
},
"cost": {
"prompt": 0,
"completion": 0,
"total": 0
}
}
]
},
"subAgents": [
{}
]
}
}
The user is unauthorized or the session expired
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
The user does not have permission
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}
The entity was not found
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
- MOD2
Array [
]
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
errors
object
nullable
Map of keys (an invalid request field or the rule that failed) to messages. Only present when the error has specific detail to report. Values are strings, except on input_validation_error, where each value is an array of messages for that field.
property name*
object
nullable
oneOf
string
string
{
"code": "string",
"message": "string",
"documentationUrl": "string",
"errors": {}
}
There was an unexpected error
- application/json
- Schema
- Example (from schema)
Schema
Stable, machine-readable error code. Branch on this value, not on message.
Human-readable, localised summary of the error.
Link to the documentation section for this error code.
{
"code": "string",
"message": "string",
"documentationUrl": "string"
}