Skip to content

Change a member's role

PATCH
/organizations/{org_id}/members/{user_id}
curl --request PATCH \
--url https://api.perstat.io/organizations/example/members/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "role": "example" }'

Updates an organization member’s role. The caller needs member management rights, may not modify members above their own level nor assign a role beyond it, and demoting the last owner is rejected with 409. Unknown role values return 400. The change is audit-logged. Accepts API keys with the org:write scope, subject to current role and resource grants.

org_id
required
string
user_id
required
string
Media typeapplication/json
object
role
required
string
Examplegenerated
{
"role": "example"
}

Request succeeded. The response has no body.

The request is invalid. Check the supplied fields and values.

Authentication is missing or invalid.

The authenticated caller does not have permission to perform this operation.

No accessible resource matches the supplied identifier.

The request conflicts with the current resource state.