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.

Mark Thread as Read

Prev Next
Post
/api/v1/chat.readThread

Marks a single thread as read for the authenticated user and removes it from the unread thread list in the user's subscription.

Use this endpoint when you need to mark one thread as read. The subscriptions.read endpoint operates on an entire room and cannot identify a single thread.

This endpoint replaces the deprecated readThreads realtime method, which remains available until Rocket.Chat 9.0.0.

Changelog

Version Description
8.8.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
Example
{
  "tmid": "7aDSXtjMA3KPLxLjt"
}
object
tmid
string Required

The ID of the thread's main message.

Min length1
Responses
200

OK

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

The request is invalid, threads are disabled, the message or room does not exist, or the user cannot access the room.

Threads disabled
{
  "success": false,
  "error": "Threads Disabled [error-not-allowed]",
  "errorType": "error-not-allowed"
}
Invalid message
{
  "success": false,
  "error": "Invalid Message [error-invalid-message]",
  "errorType": "error-invalid-message"
}
Room not found
{
  "success": false,
  "error": "This room does not exist [error-room-does-not-exist]",
  "errorType": "error-room-does-not-exist"
}
Room access denied
{
  "success": false,
  "error": "Not Allowed [error-not-allowed]",
  "errorType": "error-not-allowed"
}
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