Thread schema
A thread is a named conversation inside a forum channel. Thread commands and events carry this object in thread, and forum channels list some of them in threads.
{ "id": "5a7c9e1b-3d5f-4a8c-b2e4-6f8a0c2e4a6b", "name": "Feature ideas", "parent_channel": "suggestions", "created_by": "alice", "created_at": 1788091200.5, "locked": false, "archived": false, "participants": ["alice", "bob"], "message_count": 14, "pinned": true, "pinned_at": 1788094800.1, "last_message": 1788177600.412, "last_message_id": "c3e5a7b9-2d4f-4b6c-9e8a-1f0b2c3d4e5f"}interface Thread { id: string; name: string; parent_channel: string; created_by: string; created_at: number; locked: boolean; archived: boolean; participants: string[]; message_count: number; pinned?: boolean; pinned_at?: number; last_message: number | null; last_message_id: string | null;}| Field | Description |
|---|---|
id |
The thread’s ID. Send it as thread_id in message and thread commands. |
name |
The thread’s title. |
parent_channel |
Name of the forum channel that holds the thread. |
created_by |
Username of the thread’s creator. |
created_at |
When the thread was created, in Unix seconds. |
locked |
When true, nobody can join or post. Only thread managers can lock or unlock. |
archived |
Marks the thread as inactive. It isn’t deleted, and a new message in it clears archived. |
participants |
Usernames of people who joined. The creator joins automatically. |
message_count |
Number of messages in the thread. |
pinned |
true when the thread is pinned to the top of the forum. |
pinned_at |
When the thread was pinned, in Unix seconds. Removed when unpinned. |
last_message |
Timestamp of the newest message, or null if there are none. |
last_message_id |
ID of the newest message, or null. |
Joining and leaving a thread only changes participants. It doesn’t change who can read the messages, which follows the forum channel’s view permission.
See also
Section titled “See also”- Threads: how forums and threads work.
threads_get: list a forum’s threads.
