Remove somebody from a company, or leave it
const url = 'https://beta-api.plune.ai/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/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/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/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”. Nobody removes the owner (409 owner_protected) and the owner does not leave (409 owner_must_hand_over) — ADR 0050 §4. They go out of every project of the company in the same transaction, and off the cases they held there; their own projects are not the company’s business. Refused whole (409) when they own one of its projects — the answer names that project, whose ownership is handed over first.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The member’s userId — your own to leave
Responses
Section titled “ Responses ”Removed — from the company and from its projects
No / invalid token or session
A member or a reader asked about somebody else — or a manager about another manager (code: manager_cannot_touch_manager)
object
Example
{ "error": "company owner or manager only"}No such company among yours, or no such member in it
object
Example generated
{ "error": "example"}The owner of the company, or of one of its projects — projectId names which project
object
Example
{ "error": "owner@example.com is the owner of «Mobile app» — its ownership is handed over first", "code": "owner_protected", "projectId": "9c4e7d10-0000-4000-8000-0000000000a4"}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