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

# Retrieve a run

> Returns one run with conversation messages, execution steps, evaluation attributes, and redacted tool payloads.



## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/runs/{run_id}
openapi: 3.0.3
info:
  title: Duckie API
  version: 1.0.0
  description: >-
    Read-only API for exporting Duckie runs, tool catalog data, agents,
    guidelines, guardrails, and runbooks.
servers:
  - url: https://app.useduckie.ai
    description: Duckie app
security:
  - DuckieApiKey: []
tags:
  - name: Runs
    description: Run history, run detail, and run filter helpers.
  - name: Tools
    description: Built-in, app, custom, and MCP tools available to the organization.
  - name: Agents
    description: Agent configuration data.
  - name: Guidelines
    description: Published guidelines.
  - name: Guardrails
    description: Escalation and restriction guardrails.
  - name: Runbooks
    description: Published, non-deleted runbooks.
paths:
  /api/v1/runs/{run_id}:
    get:
      tags:
        - Runs
      summary: Retrieve a run
      description: >-
        Returns one run with conversation messages, execution steps, evaluation
        attributes, and redacted tool payloads.
      operationId: getRun
      parameters:
        - $ref: '#/components/parameters/RunId'
      responses:
        '200':
          description: Run detail.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunDetailResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    RunId:
      name: run_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  headers:
    XRateLimitLimit:
      description: Request limit for the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitRemaining:
      description: Requests remaining in the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitReset:
      description: Unix timestamp when the active rate-limit bucket resets.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
  schemas:
    RunDetailResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/RunDetail'
    RunDetail:
      allOf:
        - $ref: '#/components/schemas/RunSummary'
        - type: object
          required:
            - conversation
            - steps
            - evaluation_attributes
          properties:
            trigger:
              $ref: '#/components/schemas/RunTriggerDetail'
            agent:
              $ref: '#/components/schemas/RunAgentDetail'
            conversation:
              type: array
              items:
                $ref: '#/components/schemas/RunMessage'
            steps:
              type: array
              items:
                $ref: '#/components/schemas/RunStep'
            evaluation_attributes:
              type: array
              items:
                $ref: '#/components/schemas/RunEvaluationAttribute'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    RunSummary:
      type: object
      required:
        - id
        - object
        - created_at
        - updated_at
        - status
        - source
        - duration_seconds
        - ticket
        - agent
        - category
        - resolution
        - trigger
        - approval
        - scheduled_resume_at
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
          enum:
            - run
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        status:
          type: string
          nullable: true
        source:
          type: string
        duration_seconds:
          type: number
        ticket:
          $ref: '#/components/schemas/RunTicket'
        agent:
          $ref: '#/components/schemas/NullableEntityRef'
        category:
          $ref: '#/components/schemas/NullableEntityRef'
        resolution:
          $ref: '#/components/schemas/NullableResolution'
        trigger:
          $ref: '#/components/schemas/RunTriggerSummary'
        approval:
          $ref: '#/components/schemas/RunApproval'
        scheduled_resume_at:
          type: string
          format: date-time
          nullable: true
    RunTriggerDetail:
      allOf:
        - $ref: '#/components/schemas/RunTriggerSummary'
        - type: object
          properties:
            message_text:
              type: string
              nullable: true
            latest_comment:
              type: string
              nullable: true
    RunAgentDetail:
      type: object
      required:
        - id
        - name
        - description
      properties:
        id:
          type: string
          format: uuid
          nullable: true
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
    RunMessage:
      type: object
      required:
        - id
        - order
        - role
        - user_name
        - message
        - source_timestamp
        - recorded_at
      properties:
        id:
          type: string
          format: uuid
        order:
          type: integer
        role:
          type: string
          nullable: true
        user_name:
          type: string
          nullable: true
        message:
          type: string
        source_timestamp:
          type: string
          nullable: true
        recorded_at:
          type: string
          format: date-time
          nullable: true
    RunStep:
      type: object
      required:
        - id
        - order
        - timestamp
        - type
        - title
        - content
        - status
        - duration_seconds
      properties:
        id:
          type: string
          format: uuid
        order:
          type: integer
        timestamp:
          type: string
          format: date-time
          nullable: true
        type:
          type: string
          nullable: true
        title:
          type: string
        content:
          type: string
        status:
          type: string
          nullable: true
        duration_seconds:
          type: number
          nullable: true
        tool:
          $ref: '#/components/schemas/RunStepTool'
    RunEvaluationAttribute:
      type: object
      required:
        - id
        - attribute_id
        - name
        - description
        - value
        - recorded_at
      properties:
        id:
          type: string
          format: uuid
        attribute_id:
          type: string
          format: uuid
        name:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
        recorded_at:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          enum:
            - invalid_request
            - unauthenticated
            - permission_denied
            - not_found
            - rate_limited
            - internal_error
        message:
          type: string
        request_id:
          type: string
        retry_after:
          type: integer
          minimum: 1
    RunTicket:
      type: object
      required:
        - id
        - title
        - url
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
          format: uri
          nullable: true
    NullableEntityRef:
      type: object
      nullable: true
      required:
        - id
        - name
      properties:
        id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
    NullableResolution:
      type: object
      nullable: true
      required:
        - type
        - summary
      properties:
        type:
          type: string
        summary:
          type: string
    RunTriggerSummary:
      type: object
      properties:
        event_type:
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        timestamp:
          type: string
          nullable: true
        ticket_status:
          type: string
          nullable: true
        ticket_priority:
          type: string
          nullable: true
        ticket_tags:
          type: array
          items:
            type: string
          nullable: true
        trigger_message_type:
          type: string
          nullable: true
        internal_notes_only:
          type: boolean
          nullable: true
        is_messaging_ticket:
          type: boolean
          nullable: true
        customer_name:
          type: string
          nullable: true
    RunApproval:
      type: object
      required:
        - waiting_for_approval
        - pending
      properties:
        waiting_for_approval:
          type: boolean
        pending:
          $ref: '#/components/schemas/NullablePendingApproval'
    RunStepTool:
      type: object
      description: Present when a step is a tool call or has a recorded tool name.
      required:
        - name
        - type
        - input
        - output
        - redacted
        - truncated
        - error
      properties:
        name:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        input:
          description: Redacted and truncated tool input payload.
          nullable: true
        output:
          description: Redacted and truncated tool output payload.
          nullable: true
        redacted:
          type: boolean
        truncated:
          type: boolean
        error:
          type: string
          nullable: true
    NullablePendingApproval:
      type: object
      nullable: true
      properties:
        step_id:
          type: string
          nullable: true
        tool_id:
          type: string
          nullable: true
        tool_name:
          type: string
          nullable: true
        tool_type:
          type: string
          nullable: true
        params:
          description: Redacted and truncated approval parameters.
          nullable: true
        redacted:
          type: boolean
        truncated:
          type: boolean
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The request is missing a valid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The API key does not have the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The resource was not found in the API key's organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: A rate limit was exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: The API could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    DuckieApiKey:
      type: http
      scheme: bearer
      description: API key created in Duckie Settings -> API Access.

````