Skip to content
Kapten
Esc
↑↓navigate↵open⌘Jpreview

Set a member's Roles

Replaces the Roles the member holds; requires member:update. Giving or taking a Role that grants organization:delete, such as owner, also requires organization:delete. The last owner keeps the owner Role (409). To take every Role away, remove the member.

PUT/organizations/{organizationId}/members/{userId}
Authorization
AuthorizationBearer token (JWT) · headerrequired

An access token issued by this service (RFC 9068), in the Authorization header as Bearer <token>.

Path parameters
organizationIdstring<uuid>required
userIdstring<uuid>required
Request body
requiredapplication/json
rolesstring[]required

Names of the organization Roles the member holds.

min items 1
Responses
200

The member and their Roles.

user_idstring<uuid>required
emailstringrequired
rolesstring[]required

Names of the organization Roles the user holds.

default

The request failed.

errorstringrequired

Stable machine-readable code.

Allowed:invalid_requestunauthorizedforbiddennot_foundconflictgoneunavailableinternal
messagestringrequired

Human-readable explanation.

Request
curl -X PUT 'https://auth.kapten.io/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "roles": [
    "string"
  ]
}'
Response
{
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "email": "string",
  "roles": [
    "string"
  ]
}

Was this page helpful?