Skip to content

Remove a member from the team

DELETE
/api/team/{id}/
curl --request DELETE \
--url http://localhost:8000/api/team/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \
--header 'Authorization: Bearer <token>'

Owner-only — removes a member from the team and deletes every session they uploaded under this team’s tenancy. Sessions the same person authored on a different team they belong to stay untouched. The owner cannot remove themselves with this endpoint — to leave their own team, delete the account via DELETE /api/me/. Confirm session-count with the front-end before calling — there is no soft-delete or undo. Returns 204 on success, 404 if no such member, 403 if caller is not the owner (or tries to remove themselves).

id
required
string format: uuid

No response body

Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examples
Example403—Owner-onlyAction

403 — Owner-only action

{
"detail": "Only the team owner can do that"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examples

404 — Caller has no active team

{
"detail": "no_active_team"
}