SessionMessage
Read and write session message information
SessionMessage object
Attributes
object
Objectid
StringUnique identifier for the session message
type
EnumType of the session message
sender
ObjectInformation about the sender of the message
mcp_message
ObjectDetails of the MCP message
session_id
StringIdentifier for the related session
server_session_id
StringIdentifier for the related server session
created_at
DateTimestamp 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
StringThe 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
StringThe unique identifier for the session
sessionMessageId
StringThe 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_..."