---
title: "Get thread with messages"
method: GET
path: "/v1/threads/{threadId}"
tags: ["v1"]
---

# Get thread with messages

`GET /v1/threads/{threadId}`

Get a thread by ID with all its messages. The thread must belong to the authenticated project.

## Path parameters

- `threadId` string, required

## Query parameters

- `userKey` string

## Response `200`

Thread with messages

- GetThreadResponse
  - `id` string, required — Unique identifier for this thread
  - `name` string — Thread name (auto-generated or user-set)
  - `userKey` string — Optional user key for thread organization
  - `runStatus` 'idle' | 'waiting' | 'streaming', required — Current run status: idle (no run), waiting (run started, awaiting content), streaming (receiving content)
  - `currentRunId` string — ID of the currently active run (when not idle)
  - `statusMessage` string — Human-readable status message (e.g., 'Fetching weather data...')
  - `lastRunCancelled` boolean — Whether the last run was cancelled
  - `lastRunError` RunError
    - `code` string — Error code
    - `message` string, required — Error message
  - `pendingToolCallIds` string[] — Tool call IDs awaiting client-side results. If non-empty, next run must provide tool_result content with previousRunId set.
  - `lastCompletedRunId` string — ID of the last completed run. Required as previousRunId when continuing after tool calls.
  - `metadata` object — Additional metadata
  - `createdAt` string, required — When the thread was created (ISO 8601)
  - `updatedAt` string, required — When the thread was last updated (ISO 8601)
  - `messages` Message[], required — Messages in this thread
    - `id` string, required — Unique identifier for this message
    - `role` 'user' | 'assistant' | 'system', required — Message role
    - `content` union[], required — Content blocks in this message
      - union
        - TextContent
          - `type` 'text', required — Content block type identifier
          - `text` string, required — The text content
        - ResourceContent
          - `type` 'resource', required — Content block type identifier
          - `resource` Resource, required
            - `uri` string — URI identifying the resource (e.g., file://, https://, s3://)
            - `name` string — Human-readable name for the resource
            - `description` string — Optional description of the resource
            - `mimeType` string — MIME type of the resource
            - `text` string — Inline text content (alternative to uri)
            - `blob` string — Base64-encoded blob data (alternative to uri or text)
            - `annotations` ResourceAnnotations
              - …
        - ToolUseContent
          - `type` 'tool_use', required — Content block type identifier
          - `id` string, required — Unique identifier for this tool call
          - `name` string, required — Name of the tool being called
          - `input` object, required — Input arguments for the tool
        - ToolResultContent
          - `type` 'tool_result', required — Content block type identifier
          - `toolUseId` string, required — ID of the tool call this result responds to
          - `content` union[], required — Result content (text or resource blocks)
            - union
              - …
          - `isError` boolean — Whether the tool call resulted in an error
        - ComponentContent
          - `type` 'component', required — Content block type identifier
          - `id` string, required — Unique identifier for this component instance
          - `name` string, required — Name of the component to render
          - `props` object, required — Props to pass to the component
          - `state` object — Current state of the component
    - `createdAt` string — When the message was created (ISO 8601)
    - `metadata` object — Additional metadata
    - `parentMessageId` string — The id of the parent message, if the message was created during the generation of another message, such as during an agent call, MCP Elicitation, or MCP Sample
    - `isCancelled` boolean — Whether this message was interrupted by a run cancellation. When true, the message content may be incomplete.

## Other responses

- `404` — Thread not found

---

[API](https://skmtc.net/tambo-ai/apis/tambo-api.md) · [All operations](https://skmtc.net/tambo-ai/apis/tambo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tambo-ai/tambo-api/versions/312691b28f1c/schema)
