Skip to content

Remove a Member, or leave

DELETE
/v1/organizations/{id}/members/{account}
curl --request DELETE \
--url https://app.caprid.com/v1/organizations/4/members/12 \
--cookie __Host-switchboard_session=<__Host-switchboard_session>

Owners can remove anyone, and any Member can remove themselves, which is how you leave an Organization. Either way, it takes a session. An API key can never manage Members.

The last Owner can’t leave or be removed. Make someone else an Owner first.

API keys the Member created keep working. They belong to the Organization, so CI doesn’t break when someone leaves. Revoke them separately if you need to.

id
required
integer

The Organization’s id, from GET /v1/organizations.

Example

4
account
required
integer

The Member’s account_id, from the list.

Example

12

Removed. The Account no longer sees the Organization.

No valid credential. Missing, expired and revoked credentials all get the same response, and so does an API key whose trial has lapsed. An Agent token from before a claim gets a 401 too, once the claim has made the trial a person’s, with a message saying to get a new token.

Media typeapplication/json
object
error
required
string

Example

{
"error": "the requested grants exceed the key's scope"
}
WWW-Authenticate
string
Example
Bearer realm="switchboard"

You aren’t an Owner and this isn’t you, or you sent an API key.

Media typeapplication/json
object
error
required
string

Example

{
"error": "only a session can manage Members, never an API key"
}

No such thing, or not yours. Another customer’s Organization or Namespace is a 404 too, so nobody can tell which ones exist.

Media typeapplication/json
object
error
required
string

Example

{
"error": "the requested grants exceed the key's scope"
}

You are removing the last Owner.

Media typeapplication/json
object
error
required
string

Example

{
"error": "an Organization must always have an Owner; make someone else an Owner first"
}