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

# Get a turn result



## OpenAPI

````yaml /openapi/platform.v1.json get /v1/threads/{threadId}/turns/{turnId}/result
openapi: 3.0.3
info:
  description: Public platform API for catalog and proxied data-plane routes.
  title: Matrices Platform API
  version: v1
servers:
  - url: https://api.matrices.com
security: []
tags:
  - description: Authenticated bearer credential context.
    name: auth
    x-group: Auth
  - description: Write-only provider credentials with safe connection metadata.
    name: connections
    x-group: Connections
  - description: Materialized workspace principals and active agent counts.
    name: identities
    x-group: Identities
  - description: Remote MCP server registrations.
    name: toolsets
    x-group: Toolsets
  - description: Named allow-only agent tool permissions.
    name: roles
    x-group: Roles
  - description: Client-executed tool calls.
    name: tools
    x-group: Tools
  - description: Reusable agent behavior profiles.
    name: profiles
    x-group: Profiles
  - description: Workspace-owned agent identities.
    name: agents
    x-group: Agents
  - description: Immutable private image inputs.
    name: images
    x-group: Images
  - description: Public model catalog.
    name: models
    x-group: Models
  - description: Running agent threads.
    name: threads
    x-group: Threads
  - description: Agent schedules.
    name: schedules
    x-group: Schedules
  - description: Workspace append-only feeds.
    name: feeds
    x-group: Feeds
  - description: Agent subscriptions over workspace feeds.
    name: subscriptions
    x-group: Subscriptions
  - description: Agent-private and workspace-shared durable memory notes.
    name: memory
    x-group: Memory
  - description: Thread messages.
    name: messages
    x-group: Messages
  - description: Thread event log data.
    name: events
    x-group: Events
  - description: Runtime hook audit and wait resolution.
    name: hooks
    x-group: Hooks
paths:
  /v1/threads/{threadId}/turns/{turnId}/result:
    get:
      tags:
        - threads
      summary: Get a turn result
      operationId: GetTurnResult
      parameters:
        - $ref: '#/components/parameters/ThreadID'
        - $ref: '#/components/parameters/TurnID'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TurnResult'
          description: Terminal state and final visible assistant text for the turn.
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/RuntimeUnavailable'
      security:
        - APIKeyBearer: []
components:
  parameters:
    ThreadID:
      in: path
      name: threadId
      required: true
      schema:
        type: string
    TurnID:
      description: >-
        Use a turn ID, or `active` for the open event-backed turn, `latest` for
        the most recent event-backed turn, or `current` for the open
        event-backed turn when one exists and the latest event-backed turn
        otherwise.
      in: path
      name: turnId
      required: true
      schema:
        type: string
  schemas:
    TurnResult:
      additionalProperties: false
      properties:
        activity:
          $ref: '#/components/schemas/ActivityEventSummary'
        pendingWaits:
          description: >-
            Pending waits for the turn. toolInput is present for platform
            connection waits and for before_tool_call client approval waits up
            to 256 KiB; it is absent for every other wait kind.
          items:
            $ref: '#/components/schemas/PendingWait'
          type: array
        status:
          $ref: '#/components/schemas/ThreadStatus'
        terminal:
          type: boolean
        text:
          type: string
        threadId:
          type: string
        turnId:
          type: string
      required:
        - threadId
        - turnId
        - terminal
        - status
        - text
      type: object
    ActivityEventSummary:
      additionalProperties: false
      description: >-
        Safe-to-show, bounded metadata for one committed thread event. It never
        contains raw tool arguments, results, wait payloads, or principals.
      properties:
        failed:
          type: boolean
        fromAgentId:
          description: >-
            Display attribution for an agent-authored user message; not a
            principal.
          type: string
        occurredAt:
          format: date-time
          type: string
        preview:
          description: >-
            Plain-text message or failure preview, stripped of Markdown and
            bounded to 220 runes.
          type: string
        seq:
          format: int64
          type: integer
        toolCallId:
          type: string
        toolDescription:
          description: >-
            Allowlisted display text derived from known tool fields, bounded to
            160 runes; never raw tool input or output.
          type: string
        toolName:
          type: string
        turnId:
          type: string
        type:
          $ref: '#/components/schemas/ThreadEventType'
      required:
        - seq
        - type
        - occurredAt
      type: object
    PendingWait:
      description: >-
        A compact projection of a wait currently blocking a turn. In a turn
        result, toolInput is present for platform connection waits and for
        before_tool_call client approval waits up to 256 KiB; it is absent for
        every other wait kind.
      properties:
        expiresAt:
          format: date-time
          type: string
        hookId:
          type: string
        id:
          type: string
        point:
          $ref: '#/components/schemas/WaitPoint'
        processor:
          $ref: '#/components/schemas/HookProcessorType'
        reason:
          type: string
        target:
          $ref: '#/components/schemas/WaitTarget'
        toolCallId:
          type: string
        toolInput:
          $ref: '#/components/schemas/JSONValue'
        toolName:
          type: string
        toolsetId:
          type: string
        turnId:
          type: string
      required:
        - id
        - turnId
        - target
      type: object
    ThreadStatus:
      enum:
        - running
        - awaiting
        - idle
        - failed
        - cancelled
      type: string
    ErrorResponse:
      properties:
        attemptsRemaining:
          type: integer
        code:
          type: string
        error:
          type: string
        message:
          type: string
        retryAfterSeconds:
          type: integer
      required:
        - error
        - message
      type: object
    ThreadEventType:
      enum:
        - user_message
        - assistant_message
        - tool_intent
        - tool_result
        - wait_created
        - wait_resolved
        - hook_decision
        - turn_completed
        - turn_cancelled
        - turn_failed
        - compacting
        - compacted
      type: string
    WaitPoint:
      enum:
        - before_turn_start
        - before_tool_call
        - after_tool_result
        - after_model_response
        - tool_execution
      type: string
    HookProcessorType:
      enum:
        - url
        - agent
        - client
      type: string
    WaitTarget:
      enum:
        - url
        - client
        - agent
      type: string
    JSONValue:
      description: Arbitrary JSON value.
  responses:
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Resource not found.
    RuntimeUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Runtime environment is unavailable or cannot be selected.
  securitySchemes:
    APIKeyBearer:
      scheme: bearer
      type: http

````

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