Roles and members

Leave the organization

Removes the caller from the organization: the same removal, and the same cleanup, as an owner or admin removing them, with what they still own flagged or suspended for a decision (GET /access-suspensions). Any member may leave, whatever their role, and no permission is needed; the organization's only owner cannot, and is refused with 409 last_owner (make someone else an owner first). Person only: a dashboard session, or the person's own OAuth or CLI token with a session step-up of purpose members.remove for themselves (confirm at the link a 403 step_up_required answer carries in details.step_up_url, which names this client and you, then send the token in the Primitive-Step-Up header; the token works only with the client it was confirmed for). API keys are refused. You do not need to look up your user id: call this route once without the header, and the 403 step_up_required refusal names it (details.target_user_id) and gives the confirmation link (details.step_up_url). GET /whoami also returns it as user_id (that route needs account:read, which every built-in role holds).

post/organization/leave

Request

  • Base URL
    https://api.primitive.dev/v1
  • URL
    https://api.primitive.dev/v1/organization/leave
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

Optional client-supplied idempotency key. Retrying a request with the same key returns the original result instead of performing the action a second time; if omitted the server derives one from the canonical payload hash. Safe to retry network failures without duplicating side effects.

Response

Leave the organization

successtrue required

Changes

No operation changes recorded.