---
title: "Chat"
method: POST
path: "/api/chat"
tags: ["chat"]
---

# Chat

`POST /api/chat`

Stream one chat Turn as an AI SDK UI 7 message stream.

## Headers

- `Idempotency-Key` string, nullable
- `Authorization` string, nullable
- `X-Fleet-User-Id` string, uuid, nullable
- `X-Fleet-Workspace-Id` string, uuid, nullable

## Request body

- ChatRequest — Body for POST /api/chat.
  - `message` string, required
  - `session_id` string, uuid, nullable
  - `attachment_ids` string[]

## Response `200`

AI SDK UI 7 v1 UIMessage SSE stream

## Other responses

- `400` — Invalid attachment reference
- `404` — Session not found
- `422` — Validation Error

## Changes

- **2026-07-13** `e2f60de986eb` — 1 info
  - added the new optional `header` request parameter `Idempotency-Key`
- **2026-07-13** `1afc045b25c0` — 5 breaking, 11 warning, 9 info
  - added the new required request property `message`
  - the `session_id/anyOf[subschema #1]/` request property type/format changed from `string`/`` to `string`/`uuid`
  - the `detail` response's property type/format changed from ``/`` to `array`/`` for status `422`
  - removed the required property `code` from the response with the `422` status
  - …21 more
- **2026-07-09** `2b8dc83eb784` — 1 info
  - added the new optional request property `attachment_refs`
- **2026-07-08** `4c3d9d7e7fac` — 1 breaking
  - removed the media type `application/json` for the response with the status `200`
- **2026-07-07** `435b905233fb` — 1 info
  - added the media type `text/event-stream` for the response with the status `200`

[Full history](https://skmtc.dev/qredence/apis/fleet-rlm/changes/api/chat/post.md)

---

[API](https://skmtc.dev/qredence/apis/fleet-rlm.md) · [All operations](https://skmtc.dev/qredence/apis/fleet-rlm/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qredence/fleet-rlm/revisions/e2f60de986eb/schema)
