Skip to content

Access status of every client in the team

GET
/api/clients/access-summary/
curl --request GET \
--url http://localhost:8000/api/clients/access-summary/ \
--header 'Authorization: Bearer <token>'

One row per card of the active team that has anyone on it — the roster’s chips: the furthest status among its people (active, then invited, then expired, then revoked) and how many hold an active grant. A card with nobody on it has no row.

A coach of the team, on a card of the active team. Every route answers 404 while client access is switched off on the environment. A partner API key and a client’s own account get 403. Open on every plan: a coach on a team whose plan no longer includes client access still sees who has it and can revoke it.

Media typeapplication/json
object
results
required
Array<object>

One row of GET /api/clients/access-summary/ — a roster chip (ClientAccessSummary).

object
client_id
required
string format: uuid
status
required

The furthest status among the card’s people: active, then invited, then expired, then revoked.

  • invited - Invited
  • active - Active
  • expired - Expired
  • revoked - Revoked
string
Allowed values: invited active expired revoked
active_count
required

How many people hold an active grant.

integer

Examples

ExampleTwoCardsWithPeopleOnThem

Two cards with people on them

{
"results": [
{
"client_id": "a1f1c0a2-0000-4000-8000-0000000000aa",
"status": "active",
"active_count": 1
},
{
"client_id": "a1f1c0a2-0000-4000-8000-0000000000bb",
"status": "expired",
"active_count": 0
}
]
}
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

Examples

Example403—AClient'sOwnAccount

403 — a client's own account

The coach side is for a coach of the team; a client uses the portal.

{
"detail": "client_account"
}
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"
}