> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Save Room Draft > Save or clear the authenticated user's message draft for a room or an existing thread. The user must have a subscription to the room. To save a room draft, omit `tmid`. To save a thread draft, provide the ID of the thread's main message in `tmid`. Send an empty `draft` to clear the corresponding room or thread draft. The draft cannot exceed the workspace's `Message_MaxAllowedSize` setting. ### Changelog | Version | Description | | ------- | ----------- | | 8.8.0 | Added the optional `tmid` parameter to save thread drafts | | 8.5.0 | Added | ## OpenAPI ````json POST /api/v1/rooms.saveDraft { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/rooms.saveDraft": { "post": { "tags": [ "Rooms" ], "summary": "Save Room Draft", "description": "Save or clear the authenticated user's message draft for a room or an existing thread. The user must have a subscription to the room.\n\nTo save a room draft, omit `tmid`. To save a thread draft, provide the ID of the thread's main message in `tmid`. Send an empty `draft` to clear the corresponding room or thread draft. The draft cannot exceed the workspace's `Message_MaxAllowedSize` setting.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.8.0 | Added the optional `tmid` parameter to save thread drafts |\n| 8.5.0 | Added |", "operationId": "post-api-v1-rooms.saveDraft", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "rid": { "type": "string", "minLength": 1, "description": "The room ID." }, "draft": { "type": "string", "description": "The draft text. Send an empty string to clear the draft." }, "tmid": { "type": "string", "minLength": 1, "pattern": "^[^.$]+$", "description": "The ID of the thread's main message. Omit this parameter to save or clear the main room draft." } }, "required": [ "rid", "draft" ], "additionalProperties": false }, "examples": { "Save room draft": { "value": { "rid": "GENERAL", "draft": "Remember to share the report" } }, "Save thread draft": { "value": { "rid": "GENERAL", "draft": "I will check this and reply", "tmid": "7aDSXtjMA3KPLxLjt" } }, "Clear thread draft": { "value": { "rid": "GENERAL", "draft": "", "tmid": "7aDSXtjMA3KPLxLjt" } } } } } }, "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Invalid subscription": { "value": { "success": false, "error": "Invalid subscription [error-invalid-subscription]", "errorType": "error-invalid-subscription" } }, "Draft exceeds maximum size": { "value": { "success": false, "error": "error-message-size-exceeded" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "trueSuccess": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````