Sessions

Get a message by ID

Changed on

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

get/api/v0/sessions/{sessionId}/messages/{messageId}

Request

  • Base URL
    https://api.factory.ai
  • Auth
    HTTP bearer

Path parameters

sessionId, string required

Session ID

messageId, string required

Message ID

Query parameters

computerId, string

Computer ID to query directly

Headers

X-Factory-Org-Id, string

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Response

Response for status 200

GetMessage200ResponseBody required
id, string required
role, 'user' | 'assistant' | 'tool' | 'system' required
content, union[] required
createdAt, number required

Unix timestamp, in milliseconds, when the message was created.

updatedAt, number required

Unix timestamp, in milliseconds, when the message last changed.

parentId, string
seq, integer
userMessageSource, 'web' | 'desktop' | 'cli_tui' | 'cli_exec' | 'cli_acp' | 'slack' | 'jira' | 'linear' | 'microsoft-teams' | 'google-chat' | 'sessions_api' | 'api' | 'sdk' | 'automation' | 'readiness-remediation' | 'readiness-evaluation' | 'wiki-generation' | 'wiki-ci-setup' | 'ios'
sender, union
author, object
docCommentThread, object
sessionRename, object
mentions, object[]
replyTo, string[]
interactionMode, 'auto' | 'spec' | 'agi' | 'mission'
visibility, 'both' | 'llm_only' | 'user_only'
systemNotice, true

Marks a notice the harness wrote into the conversation, such as a provider error or a skill activation. The role is unchanged by it, so readers that predate the marker still show its text.

noticeKind, 'reasoning_effort_disabled'

On a system notice: what it reports; more values may be added, and a reader treats one it does not know as absent. Readers that hide system notices show the reasoning_effort_disabled kind, because it explains why the reasoning level in use differs from the one selected.

reasoningEffortStepDown, object

On a reasoning_effort_disabled notice: the model, the selected reasoning level the organization disabled, and the level that ran instead. Absent on notices written before the field existed. A level the reader does not know reads as absent.

hookRowId, string

On a notice that repeats a hook's error: the id of the hook row that already shows the error. A client that draws that hook row can leave the notice out.

endedEarly, true

Marks an assistant message that ended early. When the session is loaded, a model-owned call of it that has no result is not run or resumed, unless a pending marker reserves that call or a message without the mark also makes it.

openaiMessageId, string
openaiPhase, 'commentary' | 'final_answer' | 'null' 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
geminiNativeContent, string
isUserVisible, boolean
isError, boolean
modelId, string
apiProvider, 'bedrock' | 'anthropic' | 'vertex_anthropic' | 'bedrock_anthropic' | 'bedrock_converse' | 'bedrock_openai' | 'openai' | 'azure_openai' | 'azure_anthropic' | 'google' | 'xai' | 'mistral' | 'fireworks' | 'baseten' | 'together' | 'snowflake' | 'databricks'
routerId, string
reasoningEffort, 'none' | 'dynamic' | 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'
hookEventName, string
hookMatcher, string
hookCommands, object[]
hookStatus, 'executing' | 'completed' | 'error'
hookResults, object[]
hookToolCallId, string
hookParentId, string
hookOrder, number
hookPreventedAction, boolean
hiddenFromUserViews, boolean
hookStartTime, number

Unix timestamp, in milliseconds, when the hook started.

hookEndTime, number

Unix timestamp, in milliseconds, when the hook finished.

isParallelExecution, boolean
parallelGroupId, string

Changes

    • info

      added the optional property author/sharedSessionMember to the response with the status

    • info

      added the optional property content/items/anyOf[subschema #6]/respondedBy/sharedSessionMember to the response with the status

    • info

      added the optional property noticeKind to the response with the status

    1 more change in this revision