List team members
const url = 'http://localhost:8000/api/team/';const options = {method: 'GET', 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 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).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”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
Admin UUID — same person can have memberships on several teams; this is the identity, not the membership row.
Admin’s email (Firebase identity).
Admin’s display name.
Internal Firebase identity id. Useful for client-side identity mapping; not for auth.
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.
Role on this team — owner or member.
Convenience boolean — role == 'owner'. Saves the client a string compare.
How many sessions this admin uploaded under THIS team’s tenancy. Sessions on other teams the admin belongs to don’t count.
When the admin joined the platform (not when they joined this team).
Last admin profile mutation.
Examples
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" } ]]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).
Examplegenerated
{ "detail": "example"}