---
title: "Update an organization membership"
method: PATCH
path: "/v3/organization_memberships/{identifier}"
tags: ["Add x-hidden to endpoints"]
---

# Update an organization membership

`PATCH /v3/organization_memberships/{identifier}`

The admin users can use this endpoint to update the role of the members within their organization.

## Path parameters

- `identifier` string, required — A random string that uniquely identify the resource.

## Request body

- OrganizationMembershipUpdate
  - `role` 'admin' | 'member'

## Response `200`

Successfully updated organization membership.

- OrganizationMembership
  - `identifier` string, required — A random string that uniquely identify the resource.
  - `organization` string, required — Uniquely identify an organization.
  - `user` User, required
    - `id` integer — Uniquely identify a user.
    - `name` string
    - `username` string
    - `email` string
    - `avatar` string, nullable — URL of the user's avatar.
  - `role` 'admin' | 'member', required

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api-2.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api-2/versions/6772e50cb58e/schema)
