---
title: "Send Message"
method: POST
path: "/api/chats/{chat_id}/messages"
tags: ["chats"]
---

# Send Message

`POST /api/chats/{chat_id}/messages`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/chats/{chat_id}/messages`
- Auth: none declared

Send a message and get a non-streaming AI response.

## Path parameters

- `chat_id` string, uuid, required

## Headers

- `X-Request-ID` string, nullable
- `X-Thinqos-Client` string, nullable
- `X-Timezone` string, nullable
- `x-impersonate-identity-id` string, nullable

## Request body

- SendMessageRequest
  - `first_message_id` string, uuid, nullable
  - `embed_page_context` EmbedPageContext
    - `agent_id` string, uuid, required
    - `origin` string, required
    - `path` string
    - `title` string
    - `text` string
  - `app_page_context` AppPageContext
    - `path` string, required
    - `title` string
    - `text` string
    - `selection` string, nullable
  - `content` string, required
  - `ui_action` UiActionPress: TOS-2341 Phase 2: this message is a press of a UI panel button.
    - `message_id` string, uuid, required
    - `action_id` string, required
  - `attachments` AttachmentInput[]
    - `name` string, required
    - `mime_type` string, required
    - `data` string, required
    - `retention` 'turn' | 'chat' | 'relationship', nullable
    - `capture_source` 'glance_auto' | 'embed_page' | 'app_page' | 'shared_tab' | 'shared_window' | 'shared_screen' | 'camera', nullable
  - `idempotency_key` string, nullable
  - `tool_filter` string[], nullable
  - `suggestion_id` string, uuid, nullable
  - `suggestion_outcome` 'accepted_as_is' | 'edited', nullable
  - `submitted_by_mode` 'agent', nullable
  - `source_chat_id` string, uuid, nullable
  - `source_message_id` string, uuid, nullable
  - `reply_to_message_id` string, uuid, nullable
  - `client_capabilities` string[]
  - `capture_capabilities` string[]

## Response `200`

Successful Response

- SendMessageResponse
  - `content` string, required
  - `model` string, nullable, required
  - `provider` string, nullable, required
  - `input_tokens` integer, nullable, required
  - `output_tokens` integer, nullable, required
  - `duration_ms` integer, nullable, required
  - `message_id` string, uuid, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/5fdd1072e877?raw)
