Zernio
Zernio
API Reference

Discord

Settings

Get Discord account settingsGETUpdate Discord settingsPATCHList Discord guild channelsGET

Messaging

Send a Discord Direct MessagePOSTList pinned messagesGETPin a Discord messagePUTUnpin a Discord messageDELETECreate a Discord public threadPOSTCrosspost Discord messagePOSTDelete a Discord channel messageDELETE

Roles & Members

List Discord guild rolesGETCreate a Discord guild rolePOSTEdit a Discord guild rolePATCHDelete a Discord guild roleDELETEList Discord guild membersGETSearch Discord guild membersGETGet a Discord guild memberGETAssign a role to a guild memberPUTRemove a role from a guild memberDELETE

Scheduled Events

List Discord scheduled eventsGETCreate a Discord scheduled eventPOSTGet a Discord scheduled eventGETUpdate a Discord scheduled eventPATCHDelete a Discord scheduled eventDELETE
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Discord

Delete a Discord guild role

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.


DELETE
/v1/discord/guilds/{guildId}/roles/{roleId}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Path Parameters

guildId*string

Discord guild snowflake ID

roleId*string

Discord role snowflake ID

Query Parameters

accountId*string

SocialAccount _id of the Discord account bound to this guild

Response Body

application/json

application/json

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}
Was this page helpful?

Edit a Discord guild role

Updates a role's name, color, hoist, mentionable flag, or permission bitfield. At least one field must be supplied. Omitted fields are left unchanged. Requires the bot to hold Manage Roles, and the target role must sit below the bot's highest role. See the create-role operation for the re-invite requirement.

List Discord guild members

Cursor-paginated list of guild members. Returns Discord's raw member objects so callers can build community-ops automation (e.g. "add role to all members joined in the last 7 days") on the actual platform shape. Pagination: pass `after` = the last `user.id` from the previous page. Omit on the first call. Response includes a `nextCursor` and `hasMore` flag so callers don't need to know Discord's pagination shape.