Remove a Member, or leave
const url = 'https://app.caprid.com/v1/organizations/4/members/12';const options = { method: 'DELETE', headers: {cookie: '__Host-switchboard_session=<__Host-switchboard_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The Organization’s id, from GET /v1/organizations.
Example
4The Member’s account_id, from the list.
Example
12Responses
Section titled “Responses”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.
object
Example
{ "error": "the requested grants exceed the key's scope"}Headers
Section titled “Headers”Example
Bearer realm="switchboard"You aren’t an Owner and this isn’t you, or you sent an API key.
object
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.
object
Example
{ "error": "the requested grants exceed the key's scope"}You are removing the last Owner.
object
Example
{ "error": "an Organization must always have an Owner; make someone else an Owner first"}