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

# Get Interaction

> One interaction record; ``trace.verified`` is recomputed from the stored steps on every read.

API key permission: Admin.



## OpenAPI

````yaml /api-reference/openapi.json get /interactions/{interaction_id}
openapi: 3.1.0
info:
  title: Neural Factory API
  version: 0.1.0
  description: >-
    The endpoints a program can call with an API key. Exchange the key's secret
    for a token at POST /apikeys/token and send it as a Bearer token.
servers:
  - url: https://api.neuralfactory.ai
    description: SaaS
  - url: https://{apiHost}
    description: 'Enterprise: the API address of your own deployment'
    variables:
      apiHost:
        default: api.example.com
        description: Your deployment's API host
security:
  - bearerAuth: []
tags:
  - name: API keys
  - name: Chat
  - name: Runs
  - name: Agents
  - name: Workflows
  - name: Schedules
  - name: Knowledge bases
  - name: Documents
  - name: Search
  - name: Skills
  - name: Toolkits
  - name: Files
  - name: Interactions
  - name: Usage and billing
  - name: Catalogue
  - name: Browser
  - name: Users
  - name: Groups
  - name: Builds
paths:
  /interactions/{interaction_id}:
    get:
      tags:
        - Interactions
      summary: Get Interaction
      description: >-
        One interaction record; ``trace.verified`` is recomputed from the stored
        steps on every read.


        API key permission: Admin.
      operationId: get_interaction_interactions__interaction_id__get
      parameters:
        - name: interaction_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            title: Interaction Id
        - name: include
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: 'Repeatable: content'
            title: Include
          description: 'Repeatable: content'
        - name: env
          in: query
          required: false
          schema:
            title: Env
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InteractionDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InteractionDetail:
      properties:
        type:
          type: string
          const: interaction
          title: Type
          default: interaction
        id:
          type: string
          title: Id
        source:
          type: string
          title: Source
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        active_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Ms
        waiting_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Waiting Ms
        client:
          anyOf:
            - type: string
            - type: 'null'
          title: Client
        actor:
          anyOf:
            - $ref: '#/components/schemas/Actor'
            - type: 'null'
        people:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/Person'
              type: object
            - type: 'null'
          title: People
        agent:
          anyOf:
            - $ref: '#/components/schemas/AgentRef'
            - type: 'null'
        workflow:
          anyOf:
            - $ref: '#/components/schemas/WorkflowRef'
            - type: 'null'
        subject:
          anyOf:
            - $ref: '#/components/schemas/Subject'
            - type: 'null'
        counts:
          anyOf:
            - $ref: '#/components/schemas/Counts'
            - type: 'null'
        flags:
          anyOf:
            - $ref: '#/components/schemas/Flags'
            - type: 'null'
        trace:
          $ref: '#/components/schemas/TraceInfo'
        retention:
          anyOf:
            - $ref: '#/components/schemas/Retention'
            - type: 'null'
        error:
          anyOf:
            - $ref: '#/components/schemas/ErrorInfo'
            - type: 'null'
        ended_by:
          anyOf:
            - $ref: '#/components/schemas/EndedBy'
            - type: 'null'
        cost:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Cost
        feedback_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback Type
        feedback_comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback Comment
        tools_used:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tools Used
        subagents_used:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Subagents Used
        knowledge_bases_used:
          anyOf:
            - {}
            - type: 'null'
          title: Knowledge Bases Used
        run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Id
        chat_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chat Id
        execution_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Execution Id
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Id
        api_key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Id
        api_key_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Name
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Id
        run_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Run Status
        triggered_via:
          anyOf:
            - type: string
            - type: 'null'
          title: Triggered Via
        parent:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parent
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
        input:
          anyOf:
            - {}
            - type: 'null'
          title: Input
        output:
          anyOf:
            - {}
            - type: 'null'
          title: Output
        context:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Context
        files:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Files
      type: object
      required:
        - id
        - source
        - created_at
        - trace
      title: InteractionDetail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Actor:
      properties:
        kind:
          type: string
          title: Kind
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        group_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Group Ids
        on_behalf_of:
          anyOf:
            - $ref: '#/components/schemas/Actor'
            - type: 'null'
      type: object
      required:
        - kind
      title: Actor
    Person:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      title: Person
    AgentRef:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
        config_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Config Hash
      type: object
      title: AgentRef
    WorkflowRef:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        revision:
          anyOf:
            - type: integer
            - type: 'null'
          title: Revision
        config_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Config Hash
      type: object
      title: WorkflowRef
    Subject:
      properties:
        kind:
          type: string
          title: Kind
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
      type: object
      required:
        - kind
      title: Subject
    Counts:
      properties:
        steps:
          type: integer
          title: Steps
          default: 0
        model_calls:
          type: integer
          title: Model Calls
          default: 0
        tool_calls:
          type: integer
          title: Tool Calls
          default: 0
        delegations:
          type: integer
          title: Delegations
          default: 0
        human_inputs:
          type: integer
          title: Human Inputs
          default: 0
        errors:
          type: integer
          title: Errors
          default: 0
        skipped:
          type: integer
          title: Skipped
          default: 0
      type: object
      title: Counts
    Flags:
      properties:
        has_error:
          type: boolean
          title: Has Error
          default: false
        has_approval:
          type: boolean
          title: Has Approval
          default: false
        has_skipped:
          type: boolean
          title: Has Skipped
          default: false
      type: object
      title: Flags
    TraceInfo:
      properties:
        status:
          type: string
          title: Status
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        schema_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Schema Version
        step_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Step Count
        digest:
          anyOf:
            - type: string
            - type: 'null'
          title: Digest
        sealed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sealed At
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        gaps:
          anyOf:
            - items:
                $ref: '#/components/schemas/TraceGap'
              type: array
            - type: 'null'
          title: Gaps
        message_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Hash
        response_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Hash
        details_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Details Hash
        input_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Hash
        output_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Hash
        erased_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Erased At
        erased_by:
          anyOf:
            - {}
            - type: 'null'
          title: Erased By
        verified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Verified
        first_mismatch:
          anyOf:
            - $ref: '#/components/schemas/TraceMismatch'
            - type: 'null'
        anchor:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Anchor
      type: object
      required:
        - status
      title: TraceInfo
    Retention:
      properties:
        keep_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Keep Until
        legal_hold:
          anyOf:
            - $ref: '#/components/schemas/LegalHold'
            - type: 'null'
      type: object
      title: Retention
    ErrorInfo:
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      title: ErrorInfo
    EndedBy:
      properties:
        kind:
          type: string
          title: Kind
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - kind
      title: EndedBy
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TraceGap:
      properties:
        after_seq:
          type: integer
          title: After Seq
        reason:
          type: string
          title: Reason
      type: object
      required:
        - after_seq
        - reason
      title: TraceGap
    TraceMismatch:
      properties:
        seq:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seq
        reason:
          type: string
          title: Reason
      type: object
      required:
        - reason
      title: TraceMismatch
    LegalHold:
      properties:
        by:
          anyOf:
            - {}
            - type: 'null'
          title: By
        at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: At
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      title: LegalHold
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        The access_token returned by POST /apikeys/token for an API key's
        secret.

````

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