Skip to content

List pending invites

GET
/api/team/invites/
curl --request GET \
--url http://localhost:8000/api/team/invites/ \
--header 'Authorization: Bearer <token>'

Returns the active team’s invites that are still out — neither accepted nor cancelled — newest first. An invite past its expires_at stays in the list with status: "expired": its link no longer works, and the owner renews it by POSTing the same email again, which cancels it and sends a fresh invite. Every other row reads pending. Accepted and cancelled invites are excluded — history isn’t exposed because the UI surfaces only what’s actionable. Empty array when no team or nothing is out.

Media typeapplication/json
Array<object>

Full invite row — owner-facing (pending invites list).

object
id
required

Invite UUID — use to cancel via DELETE /api/team/invites//.

string format: uuid
email
required

Recipient email.

string format: email
display_name
required

Friendly name as supplied at invite creation (optional).

string
status
required

pending / accepted / cancelled / expired. Effective status: a pending invite past expires_at reads expired — its link no longer works — even though the stored row still says pending.

  • pending - Pending
  • accepted - Accepted
  • expired - Expired
  • cancelled - Cancelled
string
Allowed values: pending accepted expired cancelled
expires_at
required

ISO-8601 UTC. When the accept link stops working: 14 days after the invite was sent. Inviting the same email again starts a fresh 14 days.

string format: date-time
accepted_at
required

Stamped when the recipient accepts. Null otherwise.

string format: date-time
nullable
created_at
required

When the invite was sent.

string format: date-time

Examples

One pending invite

[
{
"id": "9b1c7e2a-4d3f-4a8b-9c0d-1e2f3a4b5c6d",
"email": "newcoach@club.example",
"display_name": "New Coach",
"status": "pending",
"expires_at": "2026-06-10T00:00:00Z",
"accepted_at": null,
"created_at": "2026-05-27T09:00:00Z"
}
]
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

Example generated

{
"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

Example generated

{
"detail": "example"
}