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

Prev Next
Post
/api/v1/rooms.saveDraft

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
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Save room draft
{
  "rid": "GENERAL",
  "draft": "Remember to share the report"
}
Save thread draft
{
  "rid": "GENERAL",
  "draft": "I will check this and reply",
  "tmid": "7aDSXtjMA3KPLxLjt"
}
Clear thread draft
{
  "rid": "GENERAL",
  "draft": "",
  "tmid": "7aDSXtjMA3KPLxLjt"
}
object
rid
string Required

The room ID.

Min length1
draft
string Required

The draft text. Send an empty string to clear the draft.

tmid
string

The ID of the thread's main message. Omit this parameter to save or clear the main room draft.

Min length1
Pattern^[^.$]+$
Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

Invalid subscription
{
  "success": false,
  "error": "Invalid subscription [error-invalid-subscription]",
  "errorType": "error-invalid-subscription"
}
Draft exceeds maximum size
{
  "success": false,
  "error": "error-message-size-exceeded"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string