Skip to content

Change someone's role

PATCH
/members/{user_id}
curl --request PATCH \
--url https://api.global.stillbox.example/v1/members/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "role": "owner" }'
user_id
required
string
Media typeapplication/json
object
role
required

Owners invite and remove people and manage the organization; members use its sandboxes; auditors read the audit log and see everything else without changing anything, opening terminals or reading files.

string
Allowed values: owner member auditor

The member with their new role

Media typeapplication/json
object
teams

The teams the person is in.

Array<string>
limits
object
max_sandboxes

How many sandboxes the person may have at once; absent or 0 for no limit of their own.

integer
model_cap_usd

Their monthly model allowance in US dollars; absent for the organization’s, 0 for none.

number format: double
user_id
required
string
email
required
string
name
required
string
role
required

Owners invite and remove people and manage the organization; members use its sandboxes; auditors read the audit log and see everything else without changing anything, opening terminals or reading files.

string
Allowed values: owner member auditor
joined_at
required
string format: date-time
last_sign_in_at
string format: date-time

Example

{
"role": "owner"
}

The request is invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

Only an owner can do this (owner_only), or the invitation is for another address (not_invited)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No such sandbox in your organization (or no such file)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The change would leave the organization without an owner (last_owner), its seats are full (member_limit), or the person is already a member (already_member)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}