---
title: "Update an Membership"
method: PATCH
path: "/groups/{group_id}/memberships"
tags: ["Memberships"]
---

# Update an Membership

`PATCH /groups/{group_id}/memberships`

Adds and/or removes individual Actors, leaving every other member of the
Group untouched.

Both operations are idempotent: adding an Actor already in the Group and
removing one that isn't are both no-ops. `remove` is applied before `add`,
so an Actor named in both ends up in the Group. Retrying a request that may
already have been applied is therefore safe.

Repeating an Actor within `add` or `remove` is not an error; both lists are
deduplicated. `actor_ids` in the response is sorted.

## Path parameters

- `group_id` string, required

## Request body

- MembershipPatchRequest — PATCH body for updating Memberships
  - `memberships` object, required
    - `add` string[] — Array of Actor IDs
    - `remove` string[] — Array of Actor IDs

## Response `200`

Membership Response

- MembershipResponse — Response schema for Membership Updates
  - `data` object — Memberships
    - `actor_ids` string[] — Actor IDs

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Content
- `429` — Too Many Requests

---

[API](https://skmtc.dev/firezone/apis/firezone-api.md) · [All operations](https://skmtc.dev/firezone/apis/firezone-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/firezone/firezone-api/revisions/110de2cb2283/schema)
