API reference · Organizations
Remove a member, or leave
DELETE/api/orgs/{id}/membersSigned in session
Every organization key the member holds is revoked with the membership, because they have read its plaintext. To hand a key over, rotate it first: the replacement is minted under whoever rotates it. Leaving needs no management permission; removing somebody else does.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | integer | The organization id. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| userIdrequired | integer |
Example
{
"userId": 0
}Answer 200
Removed.
| Field | Type | What it is |
|---|---|---|
| ok | boolean | |
| keysRevoked | integer |
Errors
- 400OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 409OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.