---
title: "Delete a role from a guild in Discord."
method: POST
path: "/deleteRole"
---

# Delete a role from a guild in Discord.

`POST /deleteRole`

This function removes a specified role from a Discord guild. It takes the guild ID and role ID as parameters and returns a Promise that resolves when the role is successfully deleted. This operation is irreversible and should be used with caution.

## Request body

- object
  - `body` object — Body of the deleteRole sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'apikey' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/discord

## Response `200`

Role successfully deleted

- object
  - `message` string

## Other responses

- `400` — Bad request - invalid guild ID or role ID
- `403` — Forbidden - insufficient permissions to delete the role
- `404` — Not found - guild or role does not exist
- `500` — Internal server error

---

[API](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api.md) · [All operations](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/microfox-discord-sdk-api/versions/7cb5b64ae924/schema)
