---
title: "Get session message"
method: GET
path: "/session-messages/{session_message_id}"
tags: ["Session Messages"]
---

# Get session message

`GET /session-messages/{session_message_id}`

## Request

- Base URL: `https://api.metorial.com`
- URL: `https://api.metorial.com/session-messages/{session_message_id}`
- Auth: HTTP bearer

Retrieves a specific message from a session.

## Path parameters

- `session_message_id` string, required

## Headers

- `Metorial-Version` string

## Response `200`

Successful response

- SubspaceSessionMessage
  - `object` 'session.message', required: String representing the object's type
  - `id` string, required: Unique session message identifier
  - `type` 'tool_call' | 'mcp_control' | 'mcp_message' | 'unknown', required: Message type
  - `status` 'waiting_for_response' | 'failed' | 'succeeded', required: Message status
  - `source` 'client' | 'provider', required: Message source
  - `session_id` string, required: Parent session ID
  - `session_provider_id` string, nullable, required: Session provider ID
  - `connection_id` string, nullable, required: Connection ID
  - `provider_run_id` string, nullable, required: Provider run ID
  - `hierarchy` Hierarchy, required: Message hierarchy information
    - `object` 'session.message.hierarchy', required
    - `type` string, required: Hierarchy type
    - `parent_message_id` string, nullable, required: Parent message ID
    - `child_message_ids` string[], required: List of child message IDs
  - `transport` Transport, required: Transport information
    - `object` 'session.message.transport', required
    - `type` 'mcp' | 'tool_call' | 'metorial_protocol' | 'system', required: Transport type
    - `mcp` object, nullable, required
      - `object` 'session.message.transport.mcp', required
      - `id` union, required: MCP message ID
        - string
        - number
      - `protocol_version` string, required: MCP protocol version
      - `transport` string, required: MCP transport type
    - `tool_call` object, nullable, required
      - `object` 'session.message.transport.tool_call', required
      - `id` string, required: Tool call ID
  - `input` object, nullable, required: Input message data. Bodies larger than 16 KB in list responses, or larger than 1 MB when retrieving by ID, are replaced with a session.message.omitted_body object.
  - `output` object, nullable, required: Output message data. Bodies larger than 16 KB in list responses, or larger than 1 MB when retrieving by ID, are replaced with a session.message.omitted_body object.
  - `tool_call` object, nullable, required
    - `object` 'session.tool_call', required: String representing the object's type
    - `id` string, required: Unique tool call identifier
    - `tool_key` string, required: The key identifying the tool that was called
    - `type` 'tool_call' | 'mcp_control' | 'mcp_message' | 'unknown', required: The type of the tool call
    - `status` 'waiting_for_response' | 'failed' | 'succeeded', required: Current status of the tool call
    - `source` 'client' | 'provider', required: Source of the tool call
    - `transport` 'tool_call' | 'mcp' | 'metorial_protocol' | 'system', required: Transport protocol used
    - `session_id` string, required: Parent session ID
    - `message_id` string, required: Associated session message ID
    - `session_provider_id` string, nullable, required: Session provider ID
    - `connection_id` string, nullable, required: Session connection ID
    - `provider_run_id` string, nullable, required: Provider run ID
    - `sender_participant` object, nullable, required
      - `object` 'session.participant', required: String representing the object's type
      - `id` string, required: Unique session participant identifier
      - `type` 'unknown' | 'provider' | 'agent' | 'system', required: Participant type
      - `identifier` string, required: Participant identifier
      - `name` string, required: Display name
      - `data` Data, required: Participant payload data
        - `identifier` string, required: Participant-specific identifier within the payload
        - `name` string, required: Participant-specific display name within the payload
      - `provider_id` string, nullable, required: Provider ID if associated
      - `connection_type` 'mcp' | 'metorial_protocol' | 'tool_call', nullable, required
      - `agent_id` string, nullable, required
      - `agent_instance_id` string, nullable, required
      - `identity_actor_id` string, nullable, required
      - `identity_id` string, nullable, required
      - `agent_actor_id` string, nullable, required
      - `agent_client_id` string, nullable, required
      - `consumer_id` string, nullable, required
      - `created_at` string, date-time, required: Timestamp when created
    - `responder_participant` object, nullable, required
      - `object` 'session.participant', required: String representing the object's type
      - `id` string, required: Unique session participant identifier
      - `type` 'unknown' | 'provider' | 'agent' | 'system', required: Participant type
      - `identifier` string, required: Participant identifier
      - `name` string, required: Display name
      - `data` Data, required: Participant payload data
        - `identifier` string, required: Participant-specific identifier within the payload
        - `name` string, required: Participant-specific display name within the payload
      - `provider_id` string, nullable, required: Provider ID if associated
      - `connection_type` 'mcp' | 'metorial_protocol' | 'tool_call', nullable, required
      - `agent_id` string, nullable, required
      - `agent_instance_id` string, nullable, required
      - `identity_actor_id` string, nullable, required
      - `identity_id` string, nullable, required
      - `agent_actor_id` string, nullable, required
      - `agent_client_id` string, nullable, required
      - `consumer_id` string, nullable, required
      - `created_at` string, date-time, required: Timestamp when created
    - `tool` Tool, required
      - `object` 'provider.tool', required: String representing the object's type
      - `id` string, required: Unique tool identifier
      - `key` string, required: Tool key
      - `name` string, required: Display name of the tool
      - `description` string, nullable, required: Tool description
      - `capabilities` object, required: Tool capabilities
      - `constraints` string[], required: Tool constraints
      - `instructions` string[], required: Tool usage instructions
      - `input_schema` object, nullable, required
        - `type` 'json_schema', required
        - `schema` object, required: JSON Schema defining the tool input parameters
      - `output_schema` object, nullable, required
        - `type` 'json_schema', required
        - `schema` object, required: JSON Schema defining the tool output format
      - `tags` object, nullable, required
        - `destructive` boolean, nullable, required: Whether the tool is destructive
        - `read_only` boolean, nullable, required: Whether the tool is read-only
      - `tool_category_keys` string[], required: Keys of the tool categories this tool belongs to
      - `specification_id` string, required: Specification ID
      - `provider_id` string, required: Provider ID
      - `created_at` string, date-time, required: Timestamp when created
      - `updated_at` string, date-time, required: Timestamp when last updated
    - `error` object, nullable, required
      - `object` 'session.error', required: String representing the object's type
      - `id` string, required: Unique session error identifier
      - `code` string, required: Error code
      - `message` string, required: Error message
      - `data` object, required: Error payload data
      - `status` 'processing' | 'processed', required: Indicates whether the error is still being processed or has been fully processed and grouped.
      - `session_id` string, required: Parent session ID
      - `provider_run_id` string, nullable, required: Provider run ID
      - `connection_id` string, nullable, required: Connection ID
      - `group_id` string, nullable, required: Error group ID
      - `similar_error_count` number, required: Count of similar errors in the group
      - `created_at` string, date-time, required: Timestamp when created
    - `input` object, nullable, required: Input data passed to the tool call. Bodies larger than 16 KB in list responses, or larger than 1 MB when retrieving by ID, are replaced with a session.message.omitted_body object.
    - `output` object, nullable, required: Output data returned from the tool call. Bodies larger than 16 KB in list responses, or larger than 1 MB when retrieving by ID, are replaced with a session.message.omitted_body object.
    - `created_at` string, date-time, required: Timestamp when created
  - `sender_participant` SenderParticipant, required
    - `object` 'session.participant', required: String representing the object's type
    - `id` string, required: Unique session participant identifier
    - `type` 'unknown' | 'provider' | 'agent' | 'system', required: Participant type
    - `identifier` string, required: Participant identifier
    - `name` string, required: Display name
    - `data` Data, required: Participant payload data
      - `identifier` string, required: Participant-specific identifier within the payload
      - `name` string, required: Participant-specific display name within the payload
    - `provider_id` string, nullable, required: Provider ID if associated
    - `connection_type` 'mcp' | 'metorial_protocol' | 'tool_call', nullable, required
    - `agent_id` string, nullable, required
    - `agent_instance_id` string, nullable, required
    - `identity_actor_id` string, nullable, required
    - `identity_id` string, nullable, required
    - `agent_actor_id` string, nullable, required
    - `agent_client_id` string, nullable, required
    - `consumer_id` string, nullable, required
    - `created_at` string, date-time, required: Timestamp when created
  - `responder_participant` object, nullable, required
    - `object` 'session.participant', required: String representing the object's type
    - `id` string, required: Unique session participant identifier
    - `type` 'unknown' | 'provider' | 'agent' | 'system', required: Participant type
    - `identifier` string, required: Participant identifier
    - `name` string, required: Display name
    - `data` Data, required: Participant payload data
      - `identifier` string, required: Participant-specific identifier within the payload
      - `name` string, required: Participant-specific display name within the payload
    - `provider_id` string, nullable, required: Provider ID if associated
    - `connection_type` 'mcp' | 'metorial_protocol' | 'tool_call', nullable, required
    - `agent_id` string, nullable, required
    - `agent_instance_id` string, nullable, required
    - `identity_actor_id` string, nullable, required
    - `identity_id` string, nullable, required
    - `agent_actor_id` string, nullable, required
    - `agent_client_id` string, nullable, required
    - `consumer_id` string, nullable, required
    - `created_at` string, date-time, required: Timestamp when created
  - `error` object, nullable, required
    - `object` 'session.error', required: String representing the object's type
    - `id` string, required: Unique session error identifier
    - `code` string, required: Error code
    - `message` string, required: Error message
    - `data` object, required: Error payload data
    - `status` 'processing' | 'processed', required: Indicates whether the error is still being processed or has been fully processed and grouped.
    - `session_id` string, required: Parent session ID
    - `provider_run_id` string, nullable, required: Provider run ID
    - `connection_id` string, nullable, required: Connection ID
    - `group_id` string, nullable, required: Error group ID
    - `similar_error_count` number, required: Count of similar errors in the group
    - `created_at` string, date-time, required: Timestamp when created
  - `created_at` string, date-time, required: Timestamp when created

## Other responses

- `400`: Invalid parameters or action
- `401`: Missing or invalid API key
- `403`: The key lacks permission for this resource
- `404`: No such resource
- `422`: Validation failed
- `429`: Rate limit exceeded
- `500`: Unexpected server error

---

[API](https://skmtc.dev/metorial/apis/metorial-api.md) - [All operations](https://skmtc.dev/metorial/apis/metorial-api/llms.txt) - [OpenAPI document](https://skmtc.dev/metorial/apis/metorial-api/revisions/10ccc89f3eac?raw)
