> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chowder.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Message (Session)

> Send a message routed to a named session on an instance.

Same as [Send Message](/api-reference/instances/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.

<Note>
  Accepts an **organization key** (`chd_org_*`) or a **scoped key** (`chd_sk_*`) with `interact` permission on this instance.
</Note>

## Path Parameters

<ParamField path="instance_id" type="string" required>
  The ID of the instance to send a message to.
</ParamField>

<ParamField path="session_id" type="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.
</ParamField>

## Request Body

Identical to [Send Message](/api-reference/instances/send-message). At minimum, provide `model` and `input`.

<ParamField body="model" type="string" required>
  The model to use (e.g. `"claude-sonnet-4-20250514"`, `"gpt-4o"`).
</ParamField>

<ParamField body="input" type="string" required>
  The user message to send.
</ParamField>

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](/api-reference/instances/send-message).

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  curl -X POST https://api.chowder.dev/v1/instances/f47ac10b-58cc-4372-a567-0e02b2c3d479/session/user-42/responses \
    -H "Authorization: Bearer chd_org_abc123..." \
    -H "Content-Type: application/json" \
    -d '{
      "model": "claude-sonnet-4-20250514",
      "input": "Summarize the README for me."
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  {
    "id": "resp_a1b2c3d4e5f6",
    "object": "response",
    "status": "completed",
    "output": [
      {
        "type": "message",
        "role": "assistant",
        "content": [
          {
            "type": "output_text",
            "text": "The README describes a Node.js project that..."
          }
        ]
      }
    ],
    "model": "claude-sonnet-4-20250514",
    "usage": {
      "input_tokens": 35,
      "output_tokens": 52,
      "total_tokens": 87
    }
  }
  ```
</ResponseExample>

## 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.
