Skip to content

Remove somebody from a company, or leave it

DELETE
/v1/companies/{id}/members/{userId}
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.

id
required
string format: uuid
userId
required
string

The member’s userId — your own to leave

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

Media type application/json
object
error
required
string
Example
{
"error": "company owner or admin only"
}

No such company among yours, or no such member in it

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

The last owner of the company, or of one of its projects — projectId names which project

Media type application/json
object
error
required
string
projectId
string
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.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over