Admin threads
The Admin API reads and deletes threads in any guild.
List guild threads
Section titled “List guild threads”GET/v1/admin/guilds/{guild_id}/threadsReturns every thread of a guild, active and archived, newest first. Requires guild:lookup.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The ID of the guild |
Response body
Section titled “Response body”| Field | Type | Description |
|---|---|---|
| threads | array[thread object] | The threads of the guild |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 200 | response body | Threads were listed |
The operation does not verify that the guild exists. An unknown guild ID returns an empty threads array.
Side effects
Section titled “Side effects”One Admin audit entry is recorded with the action list_guild_threads, the target type guild, and the guild ID as the target. Its metadata key result_count is the number of threads returned.
Rate limit
Section titled “Rate limit”200 requests per minute for each authenticated user, on the admin:lookup bucket.
Delete thread
Section titled “Delete thread”DELETE/v1/admin/channels/{channel_id}Deletes a thread with its messages, attachments, and memberships. Requires message:delete_all. Returns 204 with no body.
Path parameters
Section titled “Path parameters”| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the thread |
Response
Section titled “Response”| Status | Body | Condition |
|---|---|---|
| 204 | empty | Thread was deleted |
| 400 | error response | INVALID_CHANNEL_TYPE when the channel is not a public, private, or announcement thread |
| 404 | error response | UNKNOWN_CHANNEL when no channel has this ID |
Side effects
Section titled “Side effects”Emits a Thread Delete Gateway event. The source message of a thread started from a message loses HAS_THREAD, and Fluxer emits Message Update for it. Fluxer removes the thread and its messages from search.
One Admin audit entry is recorded with the action delete_thread, the target type channel, and the thread ID as the target. Its metadata keys are guild_id, parent_id, and type. type is the channel type as a decimal string. The guild’s own audit log records nothing.
Rate limit
Section titled “Rate limit”100 requests per minute for each authenticated user, on the admin:message:operation bucket.