Remove a member, or leave

People only, with a fresh second factor.

DELETE/v1/organisations/{org_id}/members/{account}

People only, with a fresh second factor. Anyone may remove themselves; otherwise the rules of updateMember apply, and the last owner cannot go (conflict). The keys the member made are revoked, or with keys=hand_over handed to the owner hand_to. The member is refused everywhere within 60 seconds, as a revoked key is. Removing someone who is not a member is not_found.

For people only: a signed-in person with a fresh second factor makes this call, from the dashboard. Any API key is refused with person_required.

Request

curl -X DELETE "https://api.pod.mapier.ai/v1/organisations/org_3ahrz6dmv29gqy5ckt18fp/members/example" \
  -H "Authorization: Bearer $POD_PERSON_TOKEN"

Parameters

NameInTypeRequiredWhat it is
org_idpathstringYes
accountpathstringYesThe member's identity account id.
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.
keysquery"revoke" | "hand_over"NoWhat happens to the keys the member made.
hand_toquerystringNoWith keys=hand_over: the owner who takes the keys.

Answer

200. Who was removed and what became of their keys.

200
{
  "account": "example",
  "organisation": "org_3ahrz6dmv29gqy5ckt18fp",
  "keys_revoked": 0,
  "keys_handed_over": 0
}
FieldTypeAlwaysWhat it is
accountstringYesAn identity account id, the sub of the person's Mapier identity token.
organisationstringYes
keys_revokedintegerYesAt least 0.
keys_handed_overintegerYesAt least 0.

Errors

The refusals this call is known for: invalid, person_required, forbidden, not_found, conflict. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.organisations.members.remove(orgId, account)
Pythonpod.organisations.members.remove(org_id, account)