SessionMessage

Read and write session message information

SessionMessage object

Attributes

object

Object

id

String

Unique identifier for the session message

type

Enum

Type of the session message

sender

Object

Information about the sender of the message

mcp_message

Object

Details of the MCP message

session_id

String

Identifier for the related session

server_session_id

String

Identifier for the related server session

created_at

Date

Timestamp when the message was created

{
"object": "session.message",
"id": "example_id",
"type": "request",
"sender": {
"object": "session.message.sender",
"type": "client",
"id": "example_id"
},
"mcp_message": {
"object": "session.message.mcp_message",
"id": "example_id",
"method": "example_method",
"payload": {}
},
"session_id": "example_session_id",
"server_session_id": "example_server_session_id",
"created_at": "2025-07-20T12:25:39.029Z"
}

List session messages

List all messages for a specific session

URL Parameters

sessionId

String

The unique identifier for the session

GEThttp://api.metorial.com/sessions/:sessionId/messages
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/messages" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..."

Get session message

Get details of a specific session message

URL Parameters

sessionId

String

The unique identifier for the session

sessionMessageId

String

The unique identifier for the sessionMessage

GEThttp://api.metorial.com/sessions/:sessionId/messages/:sessionMessageId
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/messages/ses_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..."