---
title: "Update role"
method: PUT
path: "/v0/memberships/{membership-id}/roles"
tags: ["Roles"]
---

# Update role

`PUT /v0/memberships/{membership-id}/roles`

Assigns [roles](#tag/Roles) to the [membership](#tag/Memberships).

A 422 Unprocessable Entity is served if either:
* one role url provided in the body is not in the [Organisations](#tag/Organizations) `"available-roles"`
* the request attempts to remove the last admin role of the organization, thus making the organisation unusable.

## Path parameters

- `membership-id` string, required

## Request body

- object
  - `role-urls` union[], required
    - union — Link to the [role](#tag/Roles).
      - string
      - string

## Response `200`

OK

- object
  - `roles` object[], required — Shows a collection of [roles](#tag/Roles).
    - `display-name` string, required — A human readable label for an entity
    - `description` string, required
    - `role-url` union, required — Link to the [role](#tag/Roles).
      - string
      - string
    - `role-category` string

## Other responses

- `400` — Bad Request
- `401` — Requires an API key to continue
- `404` — Not Found
- `422` — Unprocessable Entity is served if either: * one role url provided in the body is not in the [Organisations](#tag/Organizations) `"available-roles"` * the request attempts to remove the last admin role of the organization, thus making the organisation unusable.

---

[API](https://skmtc.net/griffin/apis/the-griffin-api.md) · [All operations](https://skmtc.net/griffin/apis/the-griffin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/griffin/the-griffin-api/revisions/7da510b95492/schema)
