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 readThreads realtime method, which was removed in 9.0.0.
Changelog
| Version | Description |
|---|---|
| 9.0.0 | Returns 403 with errorType: error-forbidden instead of 400 when the request is refused. |
| 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, or the message or room does not exist.
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"
}object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"success": false,
"error": "You must be logged in to do this."
}object
success
boolean
error
string
403
Forbidden
Threads disabled
{
"success": false,
"error": "Threads Disabled [error-not-allowed]",
"errorType": "error-forbidden"
}Room access denied
{
"success": false,
"error": "Not Allowed [error-not-allowed]",
"errorType": "error-forbidden"
}object
success
boolean
error
string
errorType
string