---
title: "Send Message"
method: POST
path: "/api/chat/sessions/{session_id}/messages"
tags: ["Chat"]
---

# Send Message

`POST /api/chat/sessions/{session_id}/messages`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/chat/sessions/{session_id}/messages`
- Auth: HTTP bearer

Send a message in a chat session and receive an AI response.
Loads the user's financial context, calls the AI, and stores both messages.

## Path parameters

- `session_id` string, required

## Request body

- SendMessageRequest
  - `content` string, required

## Response `200`

Successful Response

- MessageResponse
  - `id` string, required
  - `role` string, required
  - `content` string, required
  - `tokens_used` integer, required
  - `created_at` string, required
  - `tool_calls` object[], nullable
  - `model_used` string, nullable
  - `complexity_detected` string, nullable
  - `routing_reason` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/earmarkiq/apis/earmark-api.md) · [All operations](https://skmtc.dev/earmarkiq/apis/earmark-api/llms.txt) · [OpenAPI document](https://skmtc.dev/earmarkiq/apis/earmark-api/revisions/4a2c41907105?raw)
