API reference · Members
Remove a member
DELETE
/v1/orgs/{org_id}/members/{member_id}Console sessionmember:removeOrganization
Takes the user out of the organization; their access ends at once. You can remove only a member who ranks no higher than you, and the last owner cannot be removed (409 last_owner).
Console session only: no API key can be granted the member:remove permission it needs. Requires the member:remove permission (a key's scope, or a role that includes it).
Request
Path parameters
org_idstringYour organization. The SDKs and the CLI fill it in from the API key.
ID with prefix org_
member_idstringrequiredID of the member
ID with prefix mem_
Response
200 JSON — The member was removed
idstringrequiredID of the deleted resource
objectstringrequiredAlways `member`
One of
memberdeletedbooleanrequiredAlways true: the member was removed
One of
true
Example response
Example response
{
"id": "string",
"object": "member",
"deleted": true
}Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
400 | invalid_request_error | A parameter or body field is missing or not allowed; param names it. |
401 | authentication_error | The key or session is missing, revoked or expired. |
403 | permission_error | The credential lacks the permission this needs, or the organization is suspended. |
404 | not_found_error | No such resource in this project (an ID from another project is answered the same way). |
409 | conflict_error | The resource's current state does not allow this. |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |