Skip to content

organizations.leaveOrganization

DELETE
/v1/organizations/{organizationId}/membership
curl --request DELETE \
--url https://example.com/v1/organizations/example/membership \
--header 'Authorization: Bearer <token>'

Leaves an organization. Your tokens in it stop working. The last active Super Administrator cannot leave. A user token can only leave its own organization.

organizationId
required
string

AuthenticationRequired

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

Example

{
"_tag": "AuthenticationRequired"
}

MembershipRequired | ForbiddenOrigin

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

Example

{
"_tag": "MembershipRequired"
}

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 | AuthenticationUnavailable

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

Example

{
"_tag": "OrganizationStorageUnavailable"
}