Skip to content

Update a workspace member ​

PATCH/api/v2/workspaces/{slug}/members/{pk}/

Change a member's workspace role. Members are the people on a workspace or project, and the role each one holds. Send the id of the new role in role_id. It can be a system role or a custom role from List roles.

Plane applies the same rules as the members settings page:

  • You can't change your own role.
  • Only an owner can change an owner's role or make someone an owner. Only owners and admins can change an admin's role or make someone an admin.
  • A custom role can't grant workspace permissions you don't hold yourself.
  • Moving a member to a role that takes a paid seat fails when the workspace has no free seat.

Changing a member to guest also changes their project memberships to the project guest role.

Path parameters ​

slug:requiredstring

The workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.

pk:requiredstring (uuid)

The workspace membership id: the id on a workspace roster row, not the member's member_id.

Body parameters ​

role_id:requiredstring (uuid)

The id of the workspace role to assign. It must be an active workspace role in this workspace. A project role's id, or a role from another workspace, returns 400.

Role slugs aren't accepted. A body with role returns 400, because a custom role's slug changes when the role is renamed and its id doesn't.

Response shaping ​

fields:optionalstring

Comma-separated list of fields to return. Fields you don't request are left out of the response instead of coming back as null. id is always included. Pass all to get every requestable field. An unknown field name returns 400. See Sparse fields.

Requestable here: id, member_id, role, role_id.

expand:optionalstring

Comma-separated relations to embed: member.

Expanded objects get their own key: ?expand=member keeps member_id and adds a member object next to it. ?fields= and ?expand= work independently. Naming a relation in ?fields= returns 400, and field filtering never removes an expanded object. See Expanding relations.

Scopes ​

workspaces.members:write

Errors ​

StatusCodeCause
400invalid_requestrole_id is missing, unknown, inactive, or not a workspace role in this workspace, the body sends role, or you tried to change your own role.
400seat_limit_reachedThe new role needs a paid seat and the workspace has none free.
401unauthorizedMissing or invalid credentials.
402payment_requiredThe admin role isn't available on the workspace's plan.
403forbiddenYou can't change roles in this workspace, the owner and admin rules above block the change, the custom role grants permissions you don't hold, or your token scope doesn't allow this.
404not_foundNo active membership with this id in the workspace, or it belongs to a bot.
406not_acceptableThe Accept header asks for a representation the API can't produce.
413payload_too_largeThe request body is over the size limit.
415unsupported_media_typeThe Content-Type isn't one this endpoint accepts.
429rate_limitedThrottled. Honor the Retry-After header before retrying.
Update a workspace member
bash
curl -X PATCH \
  "https://api.plane.so/api/v2/workspaces/my-team/members/3e8a5d17-9c40-4b2f-81d6-4a7f2b9e0c53/" \
  -H "X-Api-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "role_id": "5a9e3c71-2b8d-4f06-9d14-8c7b2e6f3a90"
}'
Response200
json
{
  "id": "3e8a5d17-9c40-4b2f-81d6-4a7f2b9e0c53",
  "member_id": "7f2b9e04-6c1d-4a58-9e3b-0d4c8a2f6b71",
  "role": "admin",
  "role_id": "5a9e3c71-2b8d-4f06-9d14-8c7b2e6f3a90"
}
Response400
json
{
  "type": "invalid_request",
  "code": "seat_limit_reached",
  "detail": "Cannot update the role as it exceeds the purchased seat limit"
}