Skip to content

List team members

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

Returns every member of the signed-in coach’s active team — owner first, then members alphabetically by display name. Each entry carries role (owner / member) and the embedded admin profile. Returns an empty array when the user has no active team (e.g. a stale session after their last team was deleted).

Media typeapplication/json
Array<object>

A team member — an (Admin, Team, role) triple, since the same Admin can sit in several teams with different roles.

Consumers pass a dict {"admin": Admin, "team": Team, "role": str} (or an object with those attributes) — much simpler than trying to thread a TeamMembership through joins in every view.

object
id
required

Admin UUID — same person can have memberships on several teams; this is the identity, not the membership row.

string format: uuid
email
required

Admin’s email (Firebase identity).

string format: email
display_name
required

Admin’s display name.

string
firebase_uid
required

Internal Firebase identity id. Useful for client-side identity mapping; not for auth.

string
team_id
required

UUID of the team this membership row points at. The invite-accept response carries this so the SPA can pass it as redirect_team_id to POST /api/me/onboarding/ once the invitee finishes their per-Admin onboarding funnel on their personal workspace, switching them into the team they just joined.

string format: uuid
role
required

Role on this team — owner or member.

string
is_owner
required

Convenience boolean — role == 'owner'. Saves the client a string compare.

boolean
session_count
required

How many sessions this admin uploaded under THIS team’s tenancy. Sessions on other teams the admin belongs to don’t count.

integer
created_at
required

When the admin joined the platform (not when they joined this team).

string format: date-time
updated_at
required

Last admin profile mutation.

string format: date-time
Examples
ExampleOwner+OneMember

Owner + one member

[
[
{
"admin": {
"id": "f6d52e64-3aa3-4a26-bac2-0fc9d718448d",
"email": "coach@club.example",
"display_name": "Head Coach"
},
"role": "owner"
},
{
"admin": {
"id": "0a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
"email": "assistant@club.example",
"display_name": "Assistant"
},
"role": "member"
}
]
]
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
Examplegenerated
{
"detail": "example"
}