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

# Update role

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

## Request

- Base URL: `https://api.griffin.com`
- URL: `https://api.griffin.com/v0/memberships/{membership-id}/roles`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/griffin/apis/the-griffin-api/docs/v0/memberships/:membership-id/roles/put.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Changes

- **2026-09-19** `3e69d9e24ef6`: 1 info
  - api operation id `put-memberships-membership-id-roles` was added

[Operation history](https://skmtc.dev/griffin/apis/the-griffin-api/changes/v0/memberships/:membership-id/roles/put.md)

---

[API](https://skmtc.dev/griffin/apis/the-griffin-api.md) - [All operations](https://skmtc.dev/griffin/apis/the-griffin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/griffin/apis/the-griffin-api/revisions/9e4c303c70a5?raw)
