Skip to main content
POST
/
guilds
/
{guild_id}
/
prune
cURL
curl --request POST \
  --url https://discord.com/api/v10/guilds/{guild_id}/prune \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "days": 15,
  "compute_prune_count": true,
  "include_roles": "<string>"
}
'
{
  "pruned": 123
}

Authorizations

Authorization
string
header
required

Discord bot token

Path Parameters

guild_id
string<snowflake>
required

Body

application/json
days
integer | null
Required range: 1 <= x <= 30
compute_prune_count
boolean | null
include_roles

Response

200 response for prune_guild

pruned
integer<int32> | null
required