Skip to content

organization.removeMember

DELETE
/v1/organization/members/{userId}
curl --request DELETE \
--url https://example.com/v1/organization/members/example \
--header 'Authorization: Bearer <token>'

Removes a member and revokes their tokens. If their email domain is still allowed, they join again the next time they sign in. Suspend them to keep them out.

userId
required
string

PolicyInvalid | OrganizationRequired

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: PolicyInvalid
message
required
string

Example

{
"_tag": "PolicyInvalid"
}

AuthenticationRequired

Media typeapplication/json
object
_tag
required
string
Allowed values: AuthenticationRequired

Example

{
"_tag": "AuthenticationRequired"
}

PermissionDenied | MembershipRequired | ForbiddenOrigin

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: PermissionDenied
permission
required
string
Allowed values: responses.run sessions.read sessions.write requests.resolve agents.read agents.write agents.delegate connections.read connections.write apps.use apps.publish models.use tokens.read tokens.write organization.read organization.write roles.write model_providers.read model_providers.write sso.read sso.write platform.read platform.write members.read members.write audit_logs.read
resource
required
string

Example

{
"_tag": "PermissionDenied",
"permission": "responses.run"
}

MemberNotFound

Media typeapplication/json
object
_tag
required
string
Allowed values: MemberNotFound
userId
required
string

Example

{
"_tag": "MemberNotFound"
}

LastSuperAdministrator

Media typeapplication/json
object
_tag
required
string
Allowed values: LastSuperAdministrator

Example

{
"_tag": "LastSuperAdministrator"
}

OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: OrganizationStorageUnavailable

Example

{
"_tag": "OrganizationStorageUnavailable"
}