---
title: "Handle Send Chat Message"
method: POST
path: "/chat/send-chat-message"
tags: ["public"]
---

# Handle Send Chat Message

`POST /chat/send-chat-message`

This endpoint is used to send a new chat message.

Args:
    chat_message_req (SendMessageRequest): Details about the new chat message.
        - When stream=True (default): Returns StreamingResponse with SSE
        - When stream=False: Returns ChatFullResponse with complete data
    request (Request): The current HTTP request context.
    user (User | None): The current user, obtained via dependency injection.
    _ (None): Rate limit check is run if user/group/global rate limits are enabled.

Returns:
    StreamingResponse | ChatFullResponse: Either streams or returns complete response.

## Request body

- SendMessageRequest
  - `message` string, required
  - `llm_override` LLMOverride
    - `model_provider` string, nullable
    - `model_version` string, nullable
    - `temperature` number, nullable
  - `allowed_tool_ids` integer[], nullable
  - `forced_tool_id` integer, nullable
  - `file_descriptors` FileDescriptor[]
    - `id` string, required
    - `type` 'image' | 'document' | 'plain_text' | 'csv', required
    - `name` string, nullable
    - `user_file_id` string, nullable
  - `internal_search_filters` BaseFilters
    - `source_type` DocumentSource[], nullable
    - `document_set` string[], nullable
    - `time_cutoff` string, date-time, nullable
    - `tags` Tag[], nullable
      - `tag_key` string, required
      - `tag_value` string, required
  - `deep_research` boolean
  - `parent_message_id` integer, nullable
  - `chat_session_id` string, uuid, nullable
  - `chat_session_info` ChatSessionCreationRequest
    - `persona_id` integer
    - `description` string, nullable
    - `project_id` integer, nullable
  - `stream` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-01-06** `2d941ea53eb3` — 1 info
  - endpoint added
- **2025-08-21** `9321c45d93b5` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/onyx-dot-app/apis/onyx-api/changes/chat/send-chat-message/post.md)

---

[API](https://skmtc.dev/onyx-dot-app/apis/onyx-api.md) · [All operations](https://skmtc.dev/onyx-dot-app/apis/onyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/onyx-dot-app/onyx-api/revisions/2d941ea53eb3/schema)
