PUT
/
v1
/
organizations
/
{id}
/
members
/
{userId}
Update Organization Member Role
curl --request PUT \
  --url https://api.vertracloud.app/v1/organizations/{id}/members/{userId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "<string>"
}'
{
  "status": "success"
}
id
string
required
The ID of the organization.
userId
string
required
The ID of the user whose role is to be updated.
role
string
required
The new role for the member. Must be one of: owner, admin, developer, operator, viewer.

Response

status
string
Indicates whether the call was successful. success if successful, error if not.
{
  "status": "success"
}

Error Responses

status
string
Indicates whether the call was successful. error if not successful.
code
string
The error code indicating the reason for failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated.
  • ONLY_OWNER_CAN_UPDATE_ROLE: Only the organization owner can update member roles.
  • CANNOT_CHANGE_OWNER_ROLE: The owner’s role cannot be changed.
  • INVALID_ROLE: The provided role is invalid.
  • MEMBER_NOT_FOUND: The specified user is not a member of the organization.
  • ORG_ID_MUST_BE_STRING: The provided organization ID is not a string.
  • USER_ID_MUST_BE_STRING: The provided user ID is not a string.
  • ROLE_MUST_BE_STRING: The provided role is not a string.
{
  "status": "error",
  "code": "UNAUTHORIZED"
}