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>'An owner or an admin removes anybody but an owner (an owner removes owners too); anybody removes themself — that is “Leave”. 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 it would leave the company without an owner, or one of its projects — the answer names that project.
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 an admin about an owner
object
Example
{ "error": "company owner or admin only"}No such company among yours, or no such member in it
object
Example generated
{ "error": "example"}The last owner of the company, or of one of its projects — projectId names which project
object
Example
{ "error": "[email protected] is the last owner of «Mobile app» — make somebody else its owner first", "projectId": "9c4e7d10-0000-4000-8000-0000000000a4"}Rate-limited: either the per-route throttle or a tenant quota. 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