---
title: "Updates the settings of an existing role in a Discord guild."
method: POST
path: "/updateRole"
---

# Updates the settings of an existing role in a Discord guild.

`POST /updateRole`

This function modifies the properties of an existing role within a specified Discord guild. It allows updating various attributes of the role such as name, color, permissions, etc. The function returns a Promise that resolves to the updated role object.

## Request body

- object
  - `body` object — Body of the updateRole 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`

Successful response

- object — The updated role object
  - `id` string — The ID of the updated role
  - `name` string — The name of the updated role
  - `color` integer — The color of the updated role

## Other responses

- `400` — Bad Request - Invalid parameters provided
- `403` — Forbidden - Insufficient permissions to update the role
- `404` — Not Found - Guild or role not found
- `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)
