Skip to main content
POST
Same as Send Message, but routes the request to a specific named session on the OpenClaw instance. Sessions let you run multiple independent conversations on the same instance without them sharing context. The session_id is a string you choose — if the session doesn’t exist yet, it’s created automatically. Use the same session_id across requests to maintain continuity within that session.
Accepts an organization key (chd_org_*) or a scoped key (chd_sk_*) with interact permission on this instance.

Path Parameters

string
required
The ID of the instance to send a message to.
string
required
A session identifier you choose. Can be any string — e.g. a user ID, a ticket number, or a UUID. Sessions are created on first use.

Request Body

Identical to Send Message. At minimum, provide model and input.
string
required
The model to use (e.g. "claude-sonnet-4-20250514", "gpt-4o").
string
required
The user message to send.
Any additional OpenResponses API fields (e.g. instructions, tools, previous_response_id) are passed through as-is.

Response

Returns 200 OK with the same OpenResponses API response format as Send Message.

When to Use Sessions

Sessions are useful when your instance serves multiple users or conversations:
  • Per-user isolation: Use the user’s ID as the session_id so each user gets their own conversation history.
  • Per-ticket support: Use a ticket or thread ID so the agent maintains context for each support case.
  • A/B testing: Run different prompts against the same instance in separate sessions.
Without sessions, all messages to an instance share the same default conversation context.