thread_create
Create a named thread inside a forum channel. Forum channels hold no messages of their own; every conversation in them is a thread. See threads and forums.
Request
Section titled “Request”{ "cmd": "thread_create", "channel": "projects", "name": "My first project"}| Field | Type | Required | Description |
|---|---|---|---|
channel |
string | Yes | Name of the forum channel to create the thread in. |
name |
string | Yes | Thread title. Surrounding spaces are trimmed, and it can’t be blank. |
Response
Section titled “Response”{ "cmd": "thread_create", "channel": "projects", "thread": { "id": "0b7d1c2e-4f3a-4e8b-9a61-5c2d7e9f1a34", "name": "My first project", "parent_channel": "projects", "created_by": "alice", "created_at": 1788624000, "locked": false, "archived": false, "participants": ["alice"], "message_count": 0, "last_message": null, "last_message_id": null }}thread is the new thread object. The creator is its first participant. Use thread.id as thread_id when you post with message_new.
The same frame is broadcast to every other connection whose user can view the forum, without listener.
Permissions
Section titled “Permissions”You need the forum’s create_thread channel permission. By default every member with the user role has it. See roles and permissions.
The command is blocked while you are timed out.
Errors
Section titled “Errors”val |
When |
|---|---|
Channel not found |
No channel has this name. |
Threads can only be created in forum channels |
The channel is not a forum. |
You do not have permission to create threads in this channel |
You lack create_thread in this forum. |
Unable to save thread |
The server could not write the thread to storage. |
| Validation message | A field is missing or blank, for example name: Expected length at least 1. |
