Remove a member, or leave
const url = 'https://beta-api.plune.ai/v1/members/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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://beta-api.plune.ai/v1/members/example \ --header 'Authorization: Bearer <token>'The owner removes a manager, a member or a reader; a manager removes members and readers, not another manager (403 manager_cannot_touch_manager); anybody but the owner removes themself — that is “Leave” (api.ts → removeMember). Nobody removes the owner (409 owner_protected), and the owner does not leave (409 owner_must_hand_over): ownership moves by a handover first (ADR 0050 §4). Their records stay: a case somebody wrote is the project’s, not theirs. A reader leaves the same way: their own row is the one removal a reader makes (#2055). In a company’s project (ADR 0038) only a manager or the owner of the project who is also the owner or a manager of the company removes somebody else (403 company owner or manager only for the rest); leaving is as before. Recorded in the audit feed as removed <email> or <email> left.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The member’s userId — your own to leave
Header Parameters
Section titled “Header Parameters ”Which of your projects to act in — an id from GET /v1/projects. Absent, your default project. A project you are not a member of answers 404, the same as one that does not exist. Ignored under a bearer token, which is bound to the project it was minted in.
Responses
Section titled “ Responses ”Removed
No / invalid token or session
A member or a reader asked about somebody else; a manager asked about another manager (code: manager_cannot_touch_manager) — or, in a company’s project, somebody who is not the owner or a manager of the company asked about somebody else
object
Examples
{ "error": "project owner or manager only"}{ "error": "a manager is demoted or removed by the owner only", "code": "manager_cannot_touch_manager"}No such member in this project
object
Example generated
{ "error": "example"}The owner: nobody removes them, and they do not leave before a handover
object
Examples
{ "error": "the owner of the project is never demoted or removed — ownership moves by a handover", "code": "owner_protected"}{ "error": "the owner cannot leave the project — hand ownership over first", "code": "owner_must_hand_over"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over