Update a workspace member
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:requiredstringThe 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:optionalstringComma-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:optionalstringComma-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
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | role_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. |
400 | seat_limit_reached | The new role needs a paid seat and the workspace has none free. |
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | The admin role isn't available on the workspace's plan. |
403 | forbidden | You 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. |
404 | not_found | No active membership with this id in the workspace, or it belongs to a bot. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
413 | payload_too_large | The request body is over the size limit. |
415 | unsupported_media_type | The Content-Type isn't one this endpoint accepts. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
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"
}'import requests
response = requests.patch(
"https://api.plane.so/api/v2/workspaces/my-team/members/3e8a5d17-9c40-4b2f-81d6-4a7f2b9e0c53/",
headers={"X-Api-Key": "your-api-key"},
json={
"role_id": "5a9e3c71-2b8d-4f06-9d14-8c7b2e6f3a90"
},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/members/3e8a5d17-9c40-4b2f-81d6-4a7f2b9e0c53/",
{
method: "PATCH",
headers: {
"X-Api-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
role_id: "5a9e3c71-2b8d-4f06-9d14-8c7b2e6f3a90",
}),
},
);
const data = await response.json();{
"id": "3e8a5d17-9c40-4b2f-81d6-4a7f2b9e0c53",
"member_id": "7f2b9e04-6c1d-4a58-9e3b-0d4c8a2f6b71",
"role": "admin",
"role_id": "5a9e3c71-2b8d-4f06-9d14-8c7b2e6f3a90"
}{
"type": "invalid_request",
"code": "seat_limit_reached",
"detail": "Cannot update the role as it exceeds the purchased seat limit"
}
