OverviewPlatformsAPI ReferenceResources

Delete a Discord guild role

DELETEhttps://zernio.com/api/v1/discord/guilds/{guildId}/roles/{roleId}

Permanently deletes a role from the guild and removes it from every member. This cannot be undone.

Requires the bot to hold Manage Roles, and the target role must sit below the bot's highest role.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

guildIdstringRequired

Discord guild snowflake ID

roleIdstringRequired

Discord role snowflake ID

Query parameters

accountIdstringRequired

SocialAccount _id of the Discord account bound to this guild

Responses

Success· the request worked

Errors· the request failed

DELETE/v1/discord/guilds/{guildId}/roles/{roleId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.discord.deleteDiscordGuildRole({  path: {    guildId: 'guild_abc123',    roleId: 'role_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "success": true}
OpenAPI specification
Was this page helpful?