> ## 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 snapshot



## OpenAPI

````yaml /openapi/platform.v1.json get /v1/threads/{threadId}/turns/{turnId}
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}:
    get:
      tags:
        - threads
      summary: Get a turn snapshot
      operationId: GetTurnSnapshot
      parameters:
        - $ref: '#/components/parameters/ThreadID'
        - $ref: '#/components/parameters/TurnID'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TurnSnapshot'
          description: Turn status and resolved config snapshot.
        '400':
          $ref: '#/components/responses/BadRequest'
        '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:
    TurnSnapshot:
      properties:
        createdAt:
          format: date-time
          type: string
        elapsedMs:
          format: int64
          type: integer
        eventCount:
          type: integer
        resolvedConfig:
          $ref: '#/components/schemas/PublicResolvedAgentConfig'
        status:
          $ref: '#/components/schemas/ThreadStatus'
        terminal:
          type: boolean
        threadId:
          type: string
        totalUsage:
          allOf:
            - $ref: '#/components/schemas/ModelUsage'
          description: Total billable model usage, including context compaction.
        turnId:
          type: string
        usage:
          $ref: '#/components/schemas/ModelUsage'
      required:
        - turnId
        - threadId
        - status
        - terminal
        - resolvedConfig
        - eventCount
        - elapsedMs
        - createdAt
      type: object
    PublicResolvedAgentConfig:
      properties:
        access:
          $ref: '#/components/schemas/PublicResolvedAccess'
        hooks:
          items:
            $ref: '#/components/schemas/HookDefinition'
          type: array
        instructions:
          type: string
        model:
          $ref: '#/components/schemas/PublicModelTarget'
        source:
          $ref: '#/components/schemas/ResolvedConfigSource'
      required:
        - source
        - model
        - access
      type: object
    ThreadStatus:
      enum:
        - running
        - awaiting
        - idle
        - failed
        - cancelled
      type: string
    ModelUsage:
      properties:
        cacheReadTokens:
          type: integer
        cacheWriteTokens:
          type: integer
        estimatedCost:
          format: double
          type: number
        inputTokens:
          type: integer
        outputTokens:
          type: integer
        reasoningTokens:
          type: integer
        totalTokens:
          type: integer
      required:
        - inputTokens
        - outputTokens
        - totalTokens
      type: object
    ErrorResponse:
      properties:
        attemptsRemaining:
          type: integer
        code:
          type: string
        error:
          type: string
        message:
          type: string
        retryAfterSeconds:
          type: integer
      required:
        - error
        - message
      type: object
    PublicResolvedAccess:
      properties:
        agentId:
          type: string
        builtIns:
          description: Exact selected built-in tool names.
          items:
            type: string
          type: array
        conditional:
          items:
            $ref: '#/components/schemas/ConditionalGrant'
          type: array
        roles:
          items:
            $ref: '#/components/schemas/ResolvedRoleSource'
          maxItems: 8
          type: array
        toolsets:
          items:
            $ref: '#/components/schemas/PublicResolvedToolset'
          maxItems: 66
          type: array
        version:
          type: string
      required:
        - roles
        - builtIns
        - toolsets
        - version
      type: object
    HookDefinition:
      properties:
        asyncTimeoutMs:
          format: int64
          type: integer
        id:
          description: Slug-shaped hook id, unique within the profile.
          type: string
        match:
          $ref: '#/components/schemas/HookMatch'
        onFailure:
          $ref: '#/components/schemas/HookFailurePolicy'
        point:
          $ref: '#/components/schemas/HookPoint'
        processor:
          $ref: '#/components/schemas/HookProcessor'
        timeoutMs:
          format: int64
          type: integer
      required:
        - id
        - point
        - processor
      type: object
    PublicModelTarget:
      properties:
        apiFamily:
          $ref: '#/components/schemas/ModelAPIFamily'
        cacheRetention:
          $ref: '#/components/schemas/ModelCacheRetention'
        contextWindowTokens:
          type: integer
        id:
          type: string
        imageInputFormats:
          items:
            $ref: '#/components/schemas/ImageFormat'
          maxItems: 4
          type: array
          uniqueItems: true
        inputModalities:
          items:
            $ref: '#/components/schemas/ModelModality'
          type: array
        maxOutputTokens:
          type: integer
        outputModalities:
          items:
            $ref: '#/components/schemas/ModelModality'
          type: array
        provider:
          $ref: '#/components/schemas/ModelProvider'
        providerModel:
          type: string
        reasoningEffort:
          $ref: '#/components/schemas/ModelReasoningEffort'
        supportsThinking:
          type: boolean
        supportsTools:
          type: boolean
        thinkingBudgetTokens:
          type: integer
      required:
        - id
        - provider
        - apiFamily
        - providerModel
        - contextWindowTokens
        - maxOutputTokens
        - supportsTools
        - supportsThinking
        - inputModalities
        - outputModalities
        - imageInputFormats
      type: object
    ResolvedConfigSource:
      properties:
        profileId:
          type: string
        profileVersion:
          format: int64
          minimum: 1
          type: integer
      required:
        - profileId
        - profileVersion
      type: object
    ConditionalGrant:
      additionalProperties: false
      properties:
        tool:
          $ref: '#/components/schemas/ToolPermission'
        where:
          items:
            $ref: '#/components/schemas/MatchCondition'
          maxItems: 8
          type: array
      required:
        - tool
      type: object
    ResolvedRoleSource:
      properties:
        id:
          type: string
        name:
          type: string
        version:
          format: int64
          type: integer
      required:
        - id
        - name
        - version
      type: object
    PublicResolvedToolset:
      properties:
        id:
          type: string
        namespace:
          type: string
        source:
          enum:
            - managed
            - workspace
          type: string
        toolFilter:
          description: Optional MCP tool-name filter. Omit to expose all discovered tools.
          items:
            type: string
          type: array
        tools:
          items:
            $ref: '#/components/schemas/ToolDefinition'
          type: array
        type:
          $ref: '#/components/schemas/ToolsetType'
      required:
        - namespace
        - source
        - type
      type: object
    HookMatch:
      properties:
        tools:
          items:
            type: string
          type: array
        where:
          items:
            $ref: '#/components/schemas/MatchCondition'
          type: array
      type: object
    HookFailurePolicy:
      enum:
        - fail_closed
        - fail_open
      type: string
    HookPoint:
      enum:
        - before_turn_start
        - before_tool_call
        - after_tool_result
        - after_model_response
      type: string
    HookProcessor:
      properties:
        agentId:
          type: string
        type:
          $ref: '#/components/schemas/HookProcessorType'
        url:
          type: string
      required:
        - type
      type: object
    ModelAPIFamily:
      enum:
        - fake
        - openai_responses
        - openai_chat_completions
        - anthropic_messages
        - google_generative_ai
        - bedrock_converse
      type: string
    ModelCacheRetention:
      enum:
        - none
        - short
        - long
      type: string
    ImageFormat:
      description: Caller-declared encoded image format.
      enum:
        - jpeg
        - png
        - gif
        - webp
      type: string
    ModelModality:
      enum:
        - text
        - image_input
      type: string
    ModelProvider:
      enum:
        - fake
        - openai
        - anthropic
        - google
        - fireworks
        - xai
        - bedrock
      type: string
    ModelReasoningEffort:
      enum:
        - minimal
        - low
        - medium
        - high
        - xhigh
      type: string
    ToolPermission:
      maxLength: 176
      pattern: >-
        ^tool:(\*|(builtin|managed|workspace):(\*|[a-z0-9][a-z0-9_-]{0,31}\.\*|[a-z0-9][a-z0-9_-]{0,31}\.[A-Za-z0-9][A-Za-z0-9_.-]{0,127}))$
      type: string
    MatchCondition:
      properties:
        op:
          $ref: '#/components/schemas/MatchOp'
        path:
          type: string
        quantifier:
          $ref: '#/components/schemas/MatchQuantifier'
        value:
          $ref: '#/components/schemas/JSONValue'
      required:
        - path
        - op
      type: object
    ToolDefinition:
      properties:
        description:
          type: string
        inputSchema:
          allOf:
            - $ref: '#/components/schemas/JSONObject'
          description: >-
            JSON object schema, limited to 16 KiB when authored on a client
            toolset.
        name:
          type: string
        outputSchema:
          allOf:
            - $ref: '#/components/schemas/JSONObject'
          description: >-
            JSON object output schema, limited to 16 KiB when authored on a
            client toolset.
        timeoutMs:
          description: >-
            Client tool wait timeout in milliseconds. Use 0 for the runtime
            default, otherwise 10000 through 86400000.
          format: int64
          type: integer
      required:
        - name
      type: object
    ToolsetType:
      enum:
        - mcp
        - client
      type: string
    HookProcessorType:
      enum:
        - url
        - agent
        - client
      type: string
    MatchOp:
      enum:
        - eq
        - neq
        - prefix
        - not_prefix
        - suffix
        - not_suffix
        - contains
        - not_contains
        - in
        - not_in
        - exists
        - absent
      type: string
    MatchQuantifier:
      enum:
        - any
        - all
      type: string
    JSONValue:
      description: Arbitrary JSON value.
    JSONObject:
      additionalProperties: true
      description: Arbitrary JSON object.
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Invalid request.
    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.