---
title: "Save the current user’s draft for a chat room"
method: PUT
path: "/v1/chat/rooms/{roomId}/draft"
tags: ["chat"]
---

# Save the current user’s draft for a chat room

`PUT /v1/chat/rooms/{roomId}/draft`

## Request

- Base URL: `https://app.legend.trade/api/rest`
- URL: `https://app.legend.trade/api/rest/v1/chat/rooms/{roomId}/draft`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/legend/apis/legend-api/docs/v1/chat/rooms/:roomId/draft/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `roomId` string, uuid, required

## Request body

- object
  - `content` string, required
  - `replyToMessageId` string, uuid, nullable
  - `afterMessageId` string, uuid

## Response `200`

Successful response

- ChatRoomDraftOutput
  - `draft` ChatRoomDraft, required
    - `content` string, required
    - `replyTo` object, nullable, required
      - `id` string, required
      - `content` string, nullable, required
      - `userId` string, required
      - `username` string, required
      - `displayName` string, required
    - `updatedAt` string, required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

## Changes

> 110 revisions in range; 1 not diffed.

- **2026-10-30** `891170afe9c5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/legend/apis/legend-api/changes/v1/chat/rooms/:roomId/draft/put.md)

---

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