Skip to content

thread_update

Change a thread’s name, archived state, or locked state. Send only the fields you want to change.

  • Archived threads stay readable and keep their history. Posting a new message in an archived thread un-archives it.
  • Locked threads can’t be joined or posted in.
{
"cmd": "thread_update",
"thread_id": "0b7d1c2e-4f3a-4e8b-9a61-5c2d7e9f1a34",
"name": "Project updates",
"archived": true
}
Field Type Required Description
thread_id string Yes ID of the thread to change.
name string No New title. Surrounding spaces are trimmed, and it can’t be blank.
archived boolean No true to archive the thread, false to reopen it.
locked boolean No true to lock the thread, false to unlock it. Only thread managers can change this; see Permissions.

Send at least one of name, archived, or locked.

{
"cmd": "thread_update",
"channel": "projects",
"thread": {
"id": "0b7d1c2e-4f3a-4e8b-9a61-5c2d7e9f1a34",
"name": "Project updates",
"parent_channel": "projects",
"created_by": "alice",
"created_at": 1788624000,
"locked": false,
"archived": true,
"participants": ["alice", "bob"],
"message_count": 14,
"last_message": 1788631200,
"last_message_id": "8f14e45f-ceea-467a-9575-3d3b4c1b2a10"
}
}

thread is the updated thread object and channel is the parent forum. The same frame is broadcast to every other connection whose user can view the forum, without listener.

The server doesn’t send thread_update when a new message un-archives a thread.

Who can change what:

Change Who
name, archived The thread’s creator, or a thread manager.
locked A thread manager only.

A thread manager is an administrator (the owner, a user with the admin role, or a role with administrator) or a user whose role has manage_threads.

If a creator who isn’t a manager sends locked, the server ignores that field and applies the rest. If locked was the only field, the request fails with No updates provided.

The command is blocked while you are timed out.

val When
Thread not found No thread has this ID.
You do not have permission to modify this thread You didn’t create the thread and can’t manage threads.
No updates provided There was nothing you are allowed to change.
Unable to save thread The server could not write the change to storage.
Validation message A field has the wrong type or name is blank, for example archived: Expected boolean, received string.