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



## OpenAPI

````yaml /openapi/platform.v1.json get /v1/threads/{threadId}
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}:
    get:
      tags:
        - threads
      summary: Get a thread
      operationId: GetThread
      parameters:
        - $ref: '#/components/parameters/ThreadID'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadView'
          description: Thread status and ownership metadata.
        '202':
          $ref: '#/components/responses/PendingOperation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/RuntimeUnavailable'
      security:
        - APIKeyBearer: []
        - AgentLeaseBearer: []
components:
  parameters:
    ThreadID:
      in: path
      name: threadId
      required: true
      schema:
        type: string
  schemas:
    ThreadView:
      properties:
        budgetSpend:
          $ref: '#/components/schemas/BudgetSpend'
        inFlightWaitIds:
          items:
            type: string
          type: array
        lastSeq:
          format: int64
          type: integer
        model:
          description: Model selected by the latest admitted turn, including queued work.
          type: string
        pendingWaits:
          items:
            $ref: '#/components/schemas/PendingWait'
          type: array
        queued:
          items:
            $ref: '#/components/schemas/QueuedMessage'
          type: array
        status:
          $ref: '#/components/schemas/ThreadStatus'
        thread:
          $ref: '#/components/schemas/ThreadRecord'
        updatedAt:
          format: date-time
          type: string
        usage:
          allOf:
            - $ref: '#/components/schemas/ModelUsage'
          description: Total billable model usage, including context compaction.
      required:
        - thread
        - status
        - model
        - lastSeq
        - updatedAt
      type: object
    BudgetSpend:
      additionalProperties: false
      properties:
        generatedAt:
          format: date-time
          type: string
        spent:
          format: double
          minimum: 0
          type: number
        window:
          enum:
            - 24h
            - 7d
            - total
          type: string
      required:
        - spent
        - window
        - generatedAt
      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
    QueuedMessage:
      properties:
        content:
          $ref: '#/components/schemas/MessageContent'
        id:
          type: string
        principal:
          $ref: '#/components/schemas/Principal'
        queuedAt:
          format: date-time
          type: string
        submitMode:
          $ref: '#/components/schemas/SubmitMode'
        turnId:
          type: string
      required:
        - id
        - turnId
        - content
        - submitMode
        - queuedAt
      type: object
    ThreadStatus:
      enum:
        - running
        - awaiting
        - idle
        - failed
        - cancelled
      type: string
    ThreadRecord:
      properties:
        agentId:
          type: string
        createdAt:
          format: date-time
          type: string
        createdBy:
          $ref: '#/components/schemas/Principal'
        id:
          type: string
        identity:
          $ref: '#/components/schemas/Identity'
        maxCost:
          description: Optional USD cost cap pinned when the thread is created.
          format: double
          minimum: 0
          type: number
        updatedAt:
          format: date-time
          type: string
        updatedBy:
          $ref: '#/components/schemas/Principal'
        workspaceId:
          type: string
      required:
        - id
        - workspaceId
        - agentId
        - createdBy
        - updatedBy
        - createdAt
        - updatedAt
      type: object
    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
    OperationResponse:
      additionalProperties: false
      properties:
        operation:
          $ref: '#/components/schemas/Operation'
      required:
        - operation
      type: object
    ErrorResponse:
      properties:
        attemptsRemaining:
          type: integer
        code:
          type: string
        error:
          type: string
        message:
          type: string
        retryAfterSeconds:
          type: integer
      required:
        - error
        - message
      type: object
    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.
    MessageContent:
      description: >-
        Ordered message content, bounded to 512 KiB of encoded JSON. At most 20
        image blocks are permitted and image IDs must be unique within the
        message.
      items:
        $ref: '#/components/schemas/MessageContentBlock'
      maxItems: 40
      minItems: 1
      type: array
    Principal:
      properties:
        id:
          type: string
        identity:
          $ref: '#/components/schemas/Identity'
        origin:
          $ref: '#/components/schemas/Origin'
        type:
          enum:
            - user
            - api_key
            - agent
            - schedule
            - trigger
            - subscription
          type: string
      required:
        - type
        - id
      type: object
    SubmitMode:
      enum:
        - queue
        - steer
        - interrupt
      type: string
    Identity:
      description: >-
        Provenance identity. Surrounding whitespace is trimmed on input; values
        may contain at most 512 UTF-8 bytes and no Unicode control characters.
      type: string
    Operation:
      additionalProperties: false
      properties:
        action:
          type: string
        agentId:
          type: string
        createdAt:
          format: date-time
          type: string
        expiresAt:
          format: date-time
          type: string
        id:
          type: string
        resolvedAt:
          format: date-time
          type: string
        resolvedBy:
          $ref: '#/components/schemas/Principal'
        result:
          $ref: '#/components/schemas/OperationResult'
        state:
          $ref: '#/components/schemas/OperationState'
      required:
        - id
        - agentId
        - action
        - state
        - createdAt
        - expiresAt
      type: object
    MessageContentBlock:
      discriminator:
        mapping:
          image: '#/components/schemas/MessageImageContentBlock'
          text: '#/components/schemas/MessageTextContentBlock'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/MessageTextContentBlock'
        - $ref: '#/components/schemas/MessageImageContentBlock'
    Origin:
      additionalProperties: false
      description: >-
        Caller-asserted external event metadata. Only trigger principals may
        assert it; every other principal is rejected.
      properties:
        channelId:
          description: Provider channel identifier, limited to 512 UTF-8 bytes.
          type: string
        messageId:
          description: Provider message identifier, limited to 512 UTF-8 bytes.
          type: string
        provider:
          $ref: '#/components/schemas/OriginProvider'
        senderId:
          description: Provider sender identifier, limited to 512 UTF-8 bytes.
          type: string
        tenantId:
          description: Provider tenant identifier, limited to 512 UTF-8 bytes.
          type: string
        threadId:
          description: Provider thread identifier, limited to 512 UTF-8 bytes.
          type: string
      required:
        - provider
        - tenantId
        - senderId
      type: object
    OperationResult:
      additionalProperties: false
      properties:
        body: {}
        status:
          maximum: 599
          minimum: 100
          type: integer
      required:
        - status
      type: object
    OperationState:
      enum:
        - pending
        - denied
        - expired
        - executing
        - executed
        - failed
      type: string
    MessageImageContentBlock:
      additionalProperties: false
      properties:
        imageId:
          $ref: '#/components/schemas/ImageID'
        type:
          enum:
            - image
          type: string
      required:
        - type
        - imageId
      type: object
    MessageTextContentBlock:
      additionalProperties: false
      properties:
        text:
          description: >-
            Non-blank UTF-8 text. User messages permit at most 8 KiB total text;
            assistant messages permit 64 KiB.
          minLength: 1
          pattern: \S
          type: string
        type:
          enum:
            - text
          type: string
      required:
        - type
        - text
      type: object
    OriginProvider:
      description: >-
        Caller-asserted external event provider. This value carries no
        authority.
      enum:
        - slack
      type: string
    ImageID:
      description: Opaque identifier for one immutable private image.
      maxLength: 68
      minLength: 68
      pattern: ^img_[0-9a-f]{64}$
      type: string
  responses:
    PendingOperation:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OperationResponse'
      description: >-
        Request parked for workspace approval. Poll the returned operation
        handle for a terminal result.
    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
    AgentLeaseBearer:
      description: >-
        Short-lived agent lease bearer installed in a sandbox provider HTTP
        boundary. Requests run as the owning agent and are checked against live
        agent permissions.
      scheme: bearer
      type: http

````

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