---
title: "Send a message inside a webchat side thread"
method: POST
path: "/api/v1/chat/threads/{thread_id}/messages"
tags: ["Chat"]
---

# Send a message inside a webchat side thread

`POST /api/v1/chat/threads/{thread_id}/messages`

**Required scope:** `chat`

## Path parameters

- `thread_id` string, required

## Request body

- ChatThreadMessageRequest
  - `message` union, required
    - string
    - MessagePart[]
      - `type` 'text' | 'plain' | 'image' | 'file' | 'audio' | 'record' | 'video' | 'reply', required
      - `text` string
      - `attachment_id` string
      - `url` string
      - `filename` string
      - `stored_filename` string
      - `mime_type` string
  - `selected_provider` string
  - `selected_model` string
  - `enable_streaming` boolean — Deprecated compatibility field. It is used only when flags.enable_streaming is absent; otherwise flags.enable_streaming takes priority.
  - `flags` ChatFlags — Per-request ChatUI feature flags. A value here takes priority over its legacy top-level field, followed by the documented default.
    - `enable_inline_genui` boolean — Inject the inline HTML GenUI system prompt for this request.
    - `enable_default_system_prompt` boolean — Allow the ChatUI default system prompt when no persona overrides it.
    - `enable_streaming` boolean — Enable streaming model output for this request. This value takes priority over the legacy top-level enable_streaming field.

## Response `200`

Server-sent chat stream or an error envelope

## Changes

- **2026-07-18** `dcaea15b7823` — 3 info
  - added the new optional request property `flags`
  - added the new optional request property `message/oneOf[subschema #2]/items/stored_filename`
  - request property `enable_streaming` deprecated
- **2026-06-14** `6b73b947caab` — 1 info
  - endpoint added
- **2026-03-09** `3d43cee2622a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1/changes/api/v1/chat/threads/:thread_id/messages/post.md)

---

[API](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1.md) · [All operations](https://skmtc.dev/astrbotdevs/apis/astrbot-openapi-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/astrbotdevs/astrbot-openapi-v1/revisions/9f8da1b16ca0/schema)
