> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talkpilot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get performance record details

> Returns a single performance record including the full `transcript`
(speech turns plus tool calls and their results, chronologically sorted
by `time_sec`).

Personal data in the transcript is partially redacted before it is
stored (phone numbers, e-mail addresses, IBANs and digit runs of 7+);
names and addresses remain in clear text. Internal debug logs are never
returned.

Requires the `performance:read` permission. With Dashboard JWT auth this
endpoint is restricted to the `super_admin`, `dev_admin` and
`dev_employee` roles.




## OpenAPI

````yaml get /v1/agents/{agentId}/performance/{statisticId}
openapi: 3.1.0
info:
  title: TalkPilot API
  version: 1.0.0
  description: >
    The TalkPilot API allows you to programmatically manage your call center
    agents,

    employees, forwarding slots, knowledge base, and more.


    ## Authentication


    All API requests require an API key passed via the `X-API-Key` header:


    ```

    X-API-Key: tp_live_abc123def456...

    ```


    An API key can reach every organization its creator is a member of (see

    `GET /v1/organization`) and can be restricted to specific agents and
    permissions.

    Create and manage keys in the TalkPilot Dashboard under **Settings > API**

    (Dev-Admin only).


    ## Rate Limiting


    Default limits per API key: **60 requests/minute** and **1,000
    requests/hour**

    (both enforced, both configurable per key).


    Rate limit headers are included in every response to a request authenticated

    with an API key (Dashboard JWT requests are not rate limited):

    - `X-RateLimit-Limit` — Max requests per minute

    - `X-RateLimit-Remaining` — Remaining requests in the current minute window

    - `X-RateLimit-Reset` — Unix timestamp roughly 60 seconds in the future


    When rate limited, the API returns `429 Too Many Requests` with
    `Retry-After: 60`

    (minute window) or `Retry-After: 3600` (hour window).


    ## Pagination


    List endpoints support pagination via query parameters:

    - `page` — Page number (default: 1)

    - `limit` — Items per page (default: 20, max: 100)


    Paginated responses include a `pagination` object with `page`, `limit`,
    `total`, and `pages`.


    ## Error Format


    All errors follow a consistent format:


    ```json

    {
      "error": {
        "code": "VALIDATION_ERROR",
        "message": "Human-readable description",
        "details": [{ "field": "name", "message": "Required" }],
        "request_id": "req_abc123"
      }
    }

    ```
  contact:
    name: TalkPilot Support
    email: support@talkpilot.io
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.talkpilot.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Health
    description: API health and status
  - name: Agents
    description: Manage AI agent configurations
  - name: Workflow
    description: Multi-state conversation flow of an agent
  - name: Tools
    description: Manage agent tools (HTTP requests, call transfers, etc.)
  - name: Employees
    description: Manage employees linked to agents
  - name: Contacts
    description: >-
      Customer contacts (customer_database) per agent — the voice agent
      recognises callers and greets them by name or tag from here
  - name: Forwarding Slots
    description: Manage call forwarding slot assignments
  - name: Knowledge Base
    description: Manage agent knowledge base documents
  - name: Calls
    description: Read call records and transcripts
  - name: Performance
    description: >-
      Read call performance/QA data (latencies, token stats, redflags,
      transcript incl. tool calls)
  - name: Organization
    description: Organization-level settings
  - name: API Keys
    description: Manage API keys (Dashboard JWT auth only; dev_admin)
paths:
  /v1/agents/{agentId}/performance/{statisticId}:
    get:
      tags:
        - Performance
      summary: Get performance record details
      description: |
        Returns a single performance record including the full `transcript`
        (speech turns plus tool calls and their results, chronologically sorted
        by `time_sec`).

        Personal data in the transcript is partially redacted before it is
        stored (phone numbers, e-mail addresses, IBANs and digit runs of 7+);
        names and addresses remain in clear text. Internal debug logs are never
        returned.

        Requires the `performance:read` permission. With Dashboard JWT auth this
        endpoint is restricted to the `super_admin`, `dev_admin` and
        `dev_employee` roles.
      operationId: getPerformanceRecordDetails
      parameters:
        - $ref: '#/components/parameters/AgentId'
        - $ref: '#/components/parameters/StatisticId'
      responses:
        '200':
          description: Performance record details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformanceRecordDetail'
              example:
                id: 9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f
                call_id: lk_call_abc123
                caller_phone: '+491701234567'
                agent_phone_number: '+4930123456'
                agent_id: 550e8400-e29b-41d4-a716-446655440000
                duration_seconds: 184
                disconnect_reason: user_hangup
                session_status: completed
                e2e_latency_p90: 1.42
                e2e_latency_median: 0.98
                e2e_latency_min: 0.61
                transcription_latency_p90: 0.31
                transcription_latency_median: 0.22
                transcription_latency_min: 0.14
                llm_latency_p90: 0.82
                llm_latency_median: 0.55
                llm_latency_min: 0.33
                tts_latency_p90: 0.29
                tts_latency_median: 0.21
                tts_latency_min: 0.12
                llm_total_tokens: 4820
                llm_prompt_tokens: 4120
                llm_completion_tokens: 700
                pre_call_variables:
                  caller_name: Hans Meier
                extracted_variables:
                  appointment_date: '2026-04-02'
                llm_provider: openai
                llm_model: gpt-4o-mini
                tts_provider: elevenlabs
                stt: deepgram
                pipeline_mode: stt_llm_tts
                created_at: '2026-03-19T10:30:00Z'
                final_result:
                  outcome: true
                  outcome_label: success
                  final_score: 8
                  summary_reasoning: Termin erfolgreich vereinbart, keine Rueckfragen offen.
                prompt_fingerprint: >-
                  3b1f0c9d8e7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c
                assistant_misunderstood_multiple_times:
                  detected: false
                  reasoning: Keine Rueckfragen des Assistenten notwendig.
                  score_impact: 0
                repeated_same_sentence:
                  detected: false
                  reasoning: Keine Wiederholungen erkannt.
                  score_impact: 0
                abrupt_end_without_goodbye:
                  detected: false
                  reasoning: Gespraech wurde regulaer beendet.
                  score_impact: 0
                connection_issue_repeated:
                  detected: false
                  reasoning: Stabile Verbindung.
                  score_impact: 0
                assistant_policy_violation:
                  detected: false
                  reasoning: Keine Richtlinienverstoesse.
                  score_impact: 0
                technical_error:
                  detected: false
                  reasoning: Keine technischen Fehler.
                  score_impact: 0
                early_hangup_by_caller:
                  detected: false
                  reasoning: Anrufer blieb bis zum Ende in der Leitung.
                  score_impact: 0
                transcript:
                  - role: assistant
                    text: Guten Tag, Praxis Mustermann, was kann ich fuer Sie tun?
                    timestamp: '2026-03-19T10:30:02Z'
                    time_sec: 2.1
                  - role: user
                    text: Ich moechte einen Termin am zweiten April.
                    timestamp: '2026-03-19T10:30:09Z'
                    time_sec: 9.4
                  - role: tool_call_invocation
                    tool_call_id: call_7Hd2
                    name: check_availability
                    arguments: '{"date":"2026-04-02"}'
                    time_sec: 10.8
                  - role: tool_call_result
                    tool_call_id: call_7Hd2
                    successful: true
                    content: '{"slots":["09:00","14:30"]}'
                    time_sec: 11.6
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    AgentId:
      name: agentId
      in: path
      required: true
      description: Agent UUID
      schema:
        type: string
        format: uuid
    StatisticId:
      name: statisticId
      in: path
      required: true
      description: Performance record UUID (`call_statistics.id`)
      schema:
        type: string
        format: uuid
  schemas:
    PerformanceRecordDetail:
      description: Full performance record including the transcript
      allOf:
        - $ref: '#/components/schemas/PerformanceRecord'
        - type: object
          properties:
            transcript:
              type:
                - array
                - 'null'
              description: >
                Speech turns and tool calls in one chronological list. `null`
                for

                calls recorded before transcript capture was enabled.
              items:
                $ref: '#/components/schemas/TranscriptEntry'
    PerformanceRecord:
      type: object
      description: >-
        Performance/QA record of one call (list view — no transcript, no
        internal debug logs)
      properties:
        id:
          type: string
          format: uuid
        call_id:
          type: string
          description: External call ID (e.g. LiveKit) — links to the `calls` resource
        caller_phone:
          type:
            - string
            - 'null'
        agent_phone_number:
          type:
            - string
            - 'null'
        agent_id:
          type:
            - string
            - 'null'
          format: uuid
        duration_seconds:
          type: integer
          description: Call duration in seconds
        disconnect_reason:
          type:
            - string
            - 'null'
        session_status:
          type:
            - string
            - 'null'
        e2e_latency_p90:
          type:
            - number
            - 'null'
          description: End-to-end response latency, 90th percentile (seconds)
        e2e_latency_median:
          type:
            - number
            - 'null'
        e2e_latency_min:
          type:
            - number
            - 'null'
        transcription_latency_p90:
          type:
            - number
            - 'null'
          description: Speech-to-text latency, 90th percentile (seconds)
        transcription_latency_median:
          type:
            - number
            - 'null'
        transcription_latency_min:
          type:
            - number
            - 'null'
        llm_latency_p90:
          type:
            - number
            - 'null'
          description: Language model latency, 90th percentile (seconds)
        llm_latency_median:
          type:
            - number
            - 'null'
        llm_latency_min:
          type:
            - number
            - 'null'
        tts_latency_p90:
          type:
            - number
            - 'null'
          description: Text-to-speech latency, 90th percentile (seconds)
        tts_latency_median:
          type:
            - number
            - 'null'
        tts_latency_min:
          type:
            - number
            - 'null'
        llm_total_tokens:
          type:
            - integer
            - 'null'
        llm_prompt_tokens:
          type:
            - integer
            - 'null'
        llm_completion_tokens:
          type:
            - integer
            - 'null'
        pre_call_variables:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Variables handed to the agent before the call started
        extracted_variables:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Variables the agent extracted during the call
        llm_provider:
          type:
            - string
            - 'null'
        llm_model:
          type:
            - string
            - 'null'
        tts_provider:
          type:
            - string
            - 'null'
        stt:
          type:
            - string
            - 'null'
          description: Speech-to-text provider
        pipeline_mode:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        final_result:
          oneOf:
            - $ref: '#/components/schemas/PerformanceFinalResult'
            - type: 'null'
        prompt_fingerprint:
          type:
            - string
            - 'null'
          description: >-
            SHA-256 of the prompt template used — groups calls of the same
            prompt version
        assistant_misunderstood_multiple_times:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
        repeated_same_sentence:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
        abrupt_end_without_goodbye:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
        connection_issue_repeated:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
        assistant_policy_violation:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
        technical_error:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
        early_hangup_by_caller:
          oneOf:
            - $ref: '#/components/schemas/FailureCause'
            - type: 'null'
    TranscriptEntry:
      description: |
        One entry of a performance transcript. Three kinds share a single list,
        sorted chronologically by `time_sec` — distinguish them by `role`:

        - `user` / `assistant` — a speech turn, text in `text`
        - `tool_call_invocation` — the agent calling a tool; `arguments` is a
          **JSON string**, not an object
        - `tool_call_result` — the tool's answer; the payload is in `content`,
          not in `text`
      type: object
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - tool_call_invocation
            - tool_call_result
        time_sec:
          type: number
          description: Seconds since call start — the sort key of the list
        text:
          type: string
          description: Spoken text (`user` and `assistant` entries only)
        timestamp:
          type: string
          format: date-time
          description: Wall-clock time of the speech turn
        tool_call_id:
          type: string
          description: Links an invocation to its result
        name:
          type: string
          description: Tool name (`tool_call_invocation` only)
        arguments:
          type: string
          description: >-
            Tool arguments as a JSON string (`tool_call_invocation` only) —
            parse it before use
        successful:
          type:
            - boolean
            - 'null'
          description: Whether the tool call succeeded (`tool_call_result` only)
        content:
          type: string
          description: Tool result payload (`tool_call_result` only)
      required:
        - role
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              enum:
                - VALIDATION_ERROR
                - UNAUTHORIZED
                - FORBIDDEN
                - AGENT_NOT_ACCESSIBLE
                - NOT_FOUND
                - CONFLICT
                - AGENT_HAS_NUMBER
                - POOL_EMPTY
                - NOT_POOL_NUMBER
                - RATE_LIMITED
                - INTERNAL_ERROR
            message:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
            request_id:
              type: string
    PerformanceFinalResult:
      type: object
      description: Overall automated evaluation of the call
      properties:
        outcome:
          type:
            - boolean
            - 'null'
        outcome_label:
          type: string
          enum:
            - success
            - failed
            - neutral
        final_score:
          type: number
          description: Overall quality score of the call
        summary_reasoning:
          type: string
    FailureCause:
      type: object
      description: |
        Automated QA assessment of a single failure pattern ("redflag").
        Written by the analysis pipeline, not by the caller.
      properties:
        detected:
          type: boolean
          description: Whether this failure pattern occurred in the call
        reasoning:
          type: string
          description: Short explanation of the assessment
        score_impact:
          type: number
          description: How strongly this pattern lowered the final score
  responses:
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key
              request_id: req_abc123
    Forbidden:
      description: >
        Insufficient permissions (`FORBIDDEN`), or the agent is outside the
        key's

        `allowed_agent_ids` (`AGENT_NOT_ACCESSIBLE`)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingPermission:
              value:
                error:
                  code: FORBIDDEN
                  message: 'API key lacks required permission: agents:write'
                  request_id: req_abc123
            agentNotAccessible:
              value:
                error:
                  code: AGENT_NOT_ACCESSIBLE
                  message: API key does not have access to this agent
                  request_id: req_abc123
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Agent not found
              request_id: req_abc123
    RateLimited:
      description: Too many requests for this API key (60/minute or 1,000/hour by default)
      headers:
        Retry-After:
          description: >-
            Seconds to wait before retrying — 60 for the minute window, 3600 for
            the hour window
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: RATE_LIMITED
              message: Rate limit exceeded. Try again in 60 seconds.
              request_id: req_abc123
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        API key for external access. Format: `tp_live_<32-hex-chars>`.
        Create keys in the TalkPilot Dashboard under Settings > API.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.