Skip to content

Remove Member

DELETE
/v1/members/{user_id}
curl --request DELETE \
--url https://example.com/v1/members/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'X-API-Key: <X-API-Key>'

Take a person’s role on one workspace away (they keep what the organization gives them), or remove them from the organization. Needs members:write. A key never removes its own creator from the organization: leaving one takes a signed-in session.

user_id
required
string format: uuid
project_id

A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.

string | null format: uuid

A workspace of the organization; omit it for the organization itself. A workspace key names its own workspace.

keep

Removing from the organization: the workspaces they stay a guest of, at the role they hold there

Array<string>

Removing from the organization: the workspaces they stay a guest of, at the role they hold there

The change and what they keep

Media type application/json
RoleChange

What setting or removing a role did.

object
space_id
required

The space the role is on

string format: uuid
kind
required
string
Allowed values: organization workspace
name
required
string
slug
string | null
root_id

Its organization

string | null format: uuid
parent_id
string | null format: uuid
user
required
GrantSubject
object
user_id
required
string format: uuid
email
string | null
display_name
string | null
username
string | null
role

The role granted here now; null once removed

string
nullable
Allowed values: viewer contributor admin owner
from

The role granted here before

string
nullable
Allowed values: viewer contributor admin owner
changed
required

False when the role was already that

boolean
effective

The role they hold here now, inherited or not; null when they hold none

object
role
required
string
Allowed values: viewer contributor admin owner
inherited
required
boolean
granted_on
required
SpaceRef

Enough of a space to name it.

object
space_id
required
string format: uuid
kind
required
string
Allowed values: organization workspace
name
required
string
slug
string | null
icon

A workspace’s icon; null for none

string | null
kept

Removed from the organization: the workspaces they stay a guest of

Array<object>
nullable
KeptWorkspace
object
space_id
required
string format: uuid
name
string | null
role
string
nullable
Allowed values: viewer contributor admin owner
Example
{
"kind": "organization",
"role": "viewer",
"from": "viewer",
"effective": {
"role": "viewer",
"granted_on": {
"kind": "organization"
}
},
"kept": [
{
"role": "viewer"
}
]
}

Refused by the role rules

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Invalid or missing API key

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

The key lacks members:write, or its creator may not give or take this role here (nobody grants above their own role)

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Not found or not readable

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

The organization’s last owner stays

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationError
object
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}