Cancel a pending invite
const url = 'http://localhost:8000/api/team/invites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/';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 http://localhost:8000/api/team/invites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \ --header 'Authorization: Bearer <token>'Owner-only. Marks a pending invite as cancelled — the accept link in the recipient’s email stops working immediately. Idempotent: invites already in any non-pending status (cancelled, accepted, expired) return 204 too. Returns 404 if the invite doesn’t belong to the active team.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”No response body
object
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).
Examplegenerated
{ "detail": "example"}object
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).
Examples
403 — Owner-only action
{ "detail": "Only the team owner can do that"}object
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).
Examples
404 — Caller has no active team
{ "detail": "no_active_team"}404 — Unknown invite token
{ "detail": "invite_not_found"}