Makes a member an admin or a plain member.
HTTP
PATCH /org/members/{userId}Access: Session token only. API keys get 403 with insufficient_scope.
Role: Organisation owner or admin.
Path parameters #
| Parameter | Description |
|---|---|
userId | The id of the member. |
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
role | string | yes | admin or member. |
JSON
{ "role": "admin" }Response 200 #
The members of the organisation, as in List members.
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 403 | forbidden | You are not an owner or admin. |
| 404 | not_found | The user is not a member. |
| 409 | owner_cannot_change | The member is the owner. Use Transfer ownership. |
| 422 | invalid_request | role is not admin or member. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.