Skip to main content
Version: v1.0.0(int)

E019: Leave organization

DELETE /api/organizations/current/members/me

Removes the caller's own membership from the current organization. A member can leave on their own, without an admin removing them (E018 is the admin path). If the caller is the last owner, leaving closes the organization: it is deleted along with all of its data. Co-owners and non-owners simply lose their membership.

Authentication

Org-scoped route. Requires Authorization: Bearer <firebase-id-token> plus X-Org-Id. Access: Member.

Request

No body. The me path segment resolves to the caller's own membership, so no :userId is supplied.

Response — 200 OK

{ "deletedOrg": false }

deletedOrg is true when the caller was the last owner and the organization was purged.

Errors

HTTPcodeCondition
403forbiddenCaller is not a member of this org.

Workflow

Calls W019 Leave organization.