---
title: "Leave Membership"
method: DELETE
path: "/v1/memberships/{membership_id}"
tags: ["memberships"]
---

# Leave Membership

`DELETE /v1/memberships/{membership_id}`

## Request

- Base URL: `https://api.claims.zicron.ai`
- URL: `https://api.claims.zicron.ai/v1/memberships/{membership_id}`
- Auth: none declared

Leave an organization (delete your own membership).

Business rules:
- User can only leave their own membership
- Can only leave accepted memberships (use decline for pending)
- Cannot leave if you're the only owner AND there are other members
- Cannot leave if it's your only organization
- If leaving active org, auto-switches to another available org

Returns success status and org switch info if applicable.

## Path parameters

- `membership_id` string, required

## Response `200`

Successful Response

- LeaveMembershipResponse: Response after leaving an organization.
  - `ok` boolean, required
  - `switched_to_org_id` string, nullable
  - `switched_to_org_name` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zicron/apis/zicron-api.md) · [All operations](https://skmtc.dev/zicron/apis/zicron-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zicron/apis/zicron-api/revisions/abe62e22aa46?raw)
