Skip to main content

Get conversation by id

GET 

/api/v2/agent/:agentCode/conversation/:conversationId

Gets the detail of a conversational-agent instance (Assistant / Copilot). Use include to expand each message with optional execution sections, each returned inside the message it belongs to. Use include=costBreakdown to add the usage and cost of every execution in the conversation's chain, as a tree.

Request​

Path Parameters

    agentCode stringrequired

    The unique code identifying the agent the conversation belongs to.

    conversationId uuidrequired

    The conversation id.

Query Parameters

    include string

    Comma-separated list of optional sections to include: input, skills, knowledge, citations (each returned inside the message it belongs to), and costBreakdown (returned at the conversation level). Each section is populated only when requested.

    showExecutorTaskLogs boolean

    When true, includes the executor task logs per message.

    culture string

    Use this param to override the culture of the response. Options: - en (default) - es

Responses​

Success

Schema

    id stringnullable
    name stringnullable
    startDate date-time
    endDate date-time
    messagesJson stringnullable
    userIdentifier stringnullable
    conversationStarters string[]nullable
    useVision boolean
    open boolean

    usage

    object

    The token usage of an instance.

    promptTokens int32
    completionTokens int32
    totalTokens int32

    costs

    object

    The cost of an instance, in the tenant's currency.

    prompt double
    completion double
    services double
    subAgents double

    The cost of the sub agents the instance executed, already counted in total.

    total double

    The cost of the whole chain: the instance's own tokens and services plus subAgents.

    currency stringnullable

    messages

    object[]

    nullable

    The conversation messages in chronological order, each with the per-message sections requested via include.

  • Array [

  • id uuid
    sender stringnullable
    type stringnullable
    value stringnullable
    createdAt date-time

    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.

    property name* any

    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.

    promptTokens int32
    completionTokens int32
    reasoningTokens int32
    calculatedSystemDefinitionTokens int32
    calculatedKnowledgeTokens int32
    calculatedVolatileKnowledgeTokens int32
    calculatedUserMessageTokens int32
    calculatedMessagesTokens int32
    calculatedSkillInputTokens int32
    usedSkills boolean
    includedVision boolean

    attachedVolatileKnowledges

    object[]

    nullable

  • Array [

  • id uuid
    expirationDate date-timenullable
    fileId uuidnullable
    fileName stringnullable
    fileSize int64nullable
    downloadUrl stringnullable
  • ]

  • executorTaskLogs

    object[]

    nullable

  • Array [

  • key stringnullable
    description stringnullable
    duration int64
    success boolean
  • ]

  • canceledByClient boolean

    input

    object[]

    nullable

    The input used in the message execution. Populated only when include=input.

  • Array [

  • key stringnullable
    value nullable
  • ]

  • skills

    object[]

    nullable

    The skills executed for this message. Populated only when include=skills.

  • Array [

  • name stringnullable
    tool stringnullable

    input

    object[]

    nullable

  • Array [

  • key stringnullable
    value nullable
  • ]

  • output stringnullable

    usage

    object

    promptTokens int32
    completionTokens int32
    totalTokens int32
    success boolean
    error stringnullable
    iteration int32nullable
    durationMs int64nullable
    startDate date-time
  • ]

  • knowledge

    object[]

    nullable

    The knowledge retrieved for this message. Populated only when include=knowledge.

  • Array [

  • fileId stringnullable
    fileName stringnullable
    content stringnullable
    relevance double
    pageFrom int32
    pageTo int32
    position int32
    totalTokenCount int32
  • ]

  • citations

    object[]

    nullable

    The citations associated with this message. Populated only when include=citations.

  • Array [

  • citationIndex int32
    startIndex int32
    endIndex int32
    relevance double

    source

    object

    nullable

    oneOf

    fileName stringnullable
    knowledgeFileVersionId uuid
    sectionId stringnullable
    pageRange stringnullable
    isDownloadable boolean
    citedText stringnullable
  • ]

  • 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.

    prompt double
    completion double
    services double
    subAgents double

    The cost of the sub agents executed during this message, already counted in total. Messages recorded before the field existed report zero.

    total double
    currency stringnullable
    isInterruption boolean

    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.

    instanceId stringnullable
    agentId stringnullable
    agentCode stringnullable

    usage

    object

    The token usage of an instance.

    promptTokens int32
    completionTokens int32
    totalTokens int32

    cost

    object

    prompt double
    completion double
    total double

    Sum of prompt and completion, without the services or the sub agents.

    services

    object

    transcription

    object[]

    nullable

  • Array [

  • instanceId stringnullable

    usage

    object

    promptTokens int32nullable
    completionTokens int32nullable
    totalTokens int32

    cost

    object

    prompt doublenullable
    completion doublenullable
    total double
  • ]

  • embeddings

    object[]

    nullable

  • Array [

  • instanceId stringnullable

    usage

    object

    promptTokens int32nullable
    completionTokens int32nullable
    totalTokens int32

    cost

    object

    prompt doublenullable
    completion doublenullable
    total double
  • ]

  • images

    object[]

    nullable

  • Array [

  • instanceId stringnullable

    usage

    object

    promptTokens int32nullable
    completionTokens int32nullable
    totalTokens int32

    cost

    object

    prompt doublenullable
    completion doublenullable
    total double
  • ]

  • subAgents

    object[]

    nullable

  • Array [

  • 0
    1
    2
    3
    4
    5
    6
    7
    8
    9
  • ]

Loading...