---
title: "Get a message by ID"
method: GET
path: "/api/v0/sessions/{sessionId}/messages/{messageId}"
tags: ["Sessions"]
---

# Get a message by ID

`GET /api/v0/sessions/{sessionId}/messages/{messageId}`

Returns a single message from the session by its ID. This feature is enabled for selected organizations only.

## Path parameters

- `sessionId` string, required — Session ID
- `messageId` string, required — Message ID

## Query parameters

- `computerId` string — Computer ID to query directly

## Response `200`

Response for status 200

- GetMessage200ResponseBody
  - `id` string, required
  - `role` 'user' | 'assistant' | 'tool' | 'system', required
  - `content` union[], required
    - union
      - object
        - `id` string
        - `type` 'text', required
        - `text` string, required
      - object
        - `id` string
        - `type` 'image', required
        - `source` object, required
          - `type` 'base64', required
          - `data` string, required
          - `mediaType` 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp', required
        - `generated` boolean
      - object
        - `id` string
        - `type` 'thinking', required
        - `signature` string, required
        - `signatureProvider` union
          - 'anthropic' | 'openai' | 'generic-chat-completion-api' | 'factory' | 'google' | 'xai' | 'voyage' | 'bedrock-converse'
          - 'unknown'
        - `thinking` string, required
        - `durationMs` number
      - object
        - `id` string
        - `type` 'redacted_thinking', required
        - `data` string, required
      - object
        - `type` 'tool_use', required
        - `id` string, required
        - `input` object, required
        - `name` string, required
        - `thoughtSignature` string
      - object
        - `id` string
        - `type` 'tool_result', required
        - `toolUseId` string, required
        - `content` union
          - string
          - union[]
            - union
              - …
        - `isError` boolean
      - object
        - `id` string
        - `type` 'document', required
        - `source` union, required
          - object
            - `type` 'base64', required
            - `mediaType` 'application/pdf', required
            - `data` string, required
            - `parsedData` string
            - `name` string
            - `path` string
          - object
            - `type` 'text', required
            - `mediaType` 'text/plain', required
            - `data` string, required
            - `name` string
            - `mime` string
  - `createdAt` number, required
  - `updatedAt` number, required
  - `parentId` string
  - `userMessageSource` 'web' | 'desktop' | 'cli_tui' | 'cli_exec' | 'cli_acp' | 'slack' | 'jira' | 'linear' | 'microsoft-teams' | 'sessions_api' | 'api' | 'sdk' | 'automation' | 'readiness-remediation' | 'readiness-evaluation' | 'wiki-generation' | 'wiki-ci-setup'
  - `interactionMode` 'auto' | 'spec' | 'agi' | 'mission'
  - `visibility` 'both' | 'llm_only' | 'user_only'
  - `openaiMessageId` string
  - `openaiPhase` 'commentary' | 'final_answer', nullable
  - `openaiEncryptedContent` string
  - `openaiReasoningId` string
  - `openaiReasoningSummary` string
  - `geminiThoughtSignature` string — @deprecated Use thinking block `signature` fields with `signatureProvider: "google"` instead. Do not use in new code.
  - `chatCompletionReasoningField` 'reasoning' | 'reasoning_content'
  - `chatCompletionReasoningContent` string
  - `isUserVisible` boolean
  - `isError` boolean
  - `modelId` string
  - `routerId` string
  - `reasoningEffort` 'none' | 'dynamic' | 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'
  - `hookEventName` string
  - `hookMatcher` string
  - `hookCommands` object[]
    - `command` string, required
    - `timeout` number
  - `hookStatus` 'executing' | 'completed' | 'error'
  - `hookResults` object[]
    - `exitCode` number, required
    - `stdout` string, required
    - `stderr` string, required
    - `suppressOutput` boolean
  - `hookToolCallId` string
  - `hiddenFromUserViews` boolean
  - `hookStartTime` number
  - `hookEndTime` number
  - `isParallelExecution` boolean
  - `parallelGroupId` string

## Other responses

- `400` — Response for status 400
- `401` — Response for status 401
- `403` — Response for status 403
- `404` — Response for status 404
- `500` — Response for status 500
- `503` — Response for status 503

---

[API](https://skmtc.net/factory/apis/factory-public-api.md) · [All operations](https://skmtc.net/factory/apis/factory-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/factory/factory-public-api/versions/684f94d47ca9/schema)
