---
title: "Update Multiple Roles"
method: PATCH
path: "/roles"
tags: ["Roles"]
---

# Update Multiple Roles

`PATCH /roles`

Update multiple roles at the same time.

## Query parameters

- `fields` string[]
- `limit` integer
- `meta` string
- `offset` integer
- `sort` string[]
- `search` string

## Request body

- object
  - `keys` string[]
  - `data` object
    - `description` string — Description of the role.
    - `enforce_tfa` boolean — Whether or not this role enforces the use of 2FA.
    - `external_id` string — ID used with external services in SCIM.
    - `ip_access` string[] — Array of IP addresses that are allowed to connect to the API as a user of this role.
    - `module_listing` string — Custom override for the admin app module bar navigation.
    - `name` string — Name of the role.

## Response `200`

Successful request

- object
  - `data` Roles[]
    - `id` string — Unique identifier for the role.
    - `name` string — Name of the role.
    - `icon` string — The role's icon.
    - `description` string, nullable — Description of the role.
    - `parent` union — $t:field_options.directus_roles.parent_note
      - string, uuid
      - Roles — recursive
    - `children` union[], nullable — $t:field_options.directus_roles.children_note
      - union
        - string, uuid
        - Roles — recursive
    - `policies` unknown
    - `users` union[], nullable
      - union
        - string, uuid
        - Users
          - `id` string — Unique identifier for the user.
          - `first_name` string — First name of the user.
          - `last_name` string — Last name of the user.
          - `email` string, email — Unique email address for the user.
          - `password` string — Password of the user.
          - `location` string, nullable — The user's location.
          - `title` string, nullable — The user's title.
          - `description` string, nullable — The user's description.
          - `tags` string[], nullable — The user's tags.
          - `avatar` union — The user's avatar.
            - string
            - Files
              - …
          - `language` string — The user's language used in Directus.
          - `tfa_secret` string, nullable — The 2FA secret string that's used to generate one time passwords.
          - `status` 'active' | 'invited' | 'draft' | 'suspended' | 'deleted' — Status of the user.
          - `role` union — Unique identifier of the role of this user.
            - string
            - Roles — recursive
          - `token` string, nullable — Static token for the user.
          - `last_access` string, date-time, nullable — When this user used the API last.
          - `last_page` string, nullable — Last page that the user was on.
          - `provider` string
          - `external_identifier` string, nullable
          - `auth_data` unknown
          - `email_notifications` boolean, nullable
          - `appearance` string, nullable
          - `theme_dark` string, nullable
          - `theme_light` string, nullable
          - `theme_light_overrides` unknown
          - `theme_dark_overrides` unknown
          - `text_direction` string
          - `policies` unknown
  - `meta` XMetadata
    - `total_count` integer — Returns the total item count of the collection you're querying.
    - `filter_count` integer — Returns the item count of the collection you're querying, taking the current filter/search parameters into account.

## Other responses

- `401` — Error: Unauthorized request

---

[API](https://skmtc.dev/utomic-media/apis/dynamic-api-specification.md) · [All operations](https://skmtc.dev/utomic-media/apis/dynamic-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/utomic-media/dynamic-api-specification/revisions/4a0ccd34700e/schema)
