Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp
1.7 KB
Raw Blame
---
# SPDX-License-Identifier: AGPL-3.0-or-later
title: Admin threads
description: List the threads of any guild and delete a thread.
---

import RouteHeader from '@/components/RouteHeader.astro';

You can list and delete [threads](/http-api/threads/) in any guild through the Admin API.

## List guild threads

<RouteHeader method="GET" path="/v1/admin/guilds/{guild_id}/threads" auditReason />

Returns every thread of a guild, active and archived, with the most recently created first. You need `guild:lookup`.

### Response body

| Field | Type | Description |
| --- | --- | --- |
| threads | array[[thread](/http-api/threads/#thread-object) object] | The threads of the guild |

### Response

| Status | Body | Condition |
| --- | --- | --- |
| 200 | response body | The threads were returned |

An unknown guild ID returns an empty `threads` array.

The rate limit is 200 requests per minute, on the `admin:lookup` bucket.

## Delete thread

<RouteHeader method="DELETE" path="/v1/admin/channels/{channel_id}" auditReason />

Deletes a thread with its messages and memberships. You need `message:delete_all`.

### Response

| Status | Body | Condition |
| --- | --- | --- |
| 204 | empty | The thread was deleted |
| 400 | [error response](/admin-api/#error-response) | `INVALID_CHANNEL_TYPE` when the channel is not a thread |
| 404 | [error response](/admin-api/#error-response) | `UNKNOWN_CHANNEL` when no channel has this ID |

Fluxer sends [Thread Delete](/gateway/threads/#thread-delete). If the thread started from a message, it also sends [Message Update](/gateway/events/#message-update) for that message. The deletion doesn't show up in the guild's audit log.

The rate limit is 100 requests per minute, on the `admin:message:operation` bucket.