users

Set Active Team Endpoint

Switch the caller's active team.

Args: request: Target team payload. auth: Authenticated caller. service: User service.

Returns: Activated team.

Raises: HTTPException: If membership is revoked.

post/users/me/active-team

Request body

team_idstring uuid required

Response

Successful Response

idstring required
namestring required
owner_idstring required
zero_data_retentionboolean
created_atstring required
updated_atstring required
member_countinteger nullable
current_user_role'owner' | 'billing' | 'admin' | 'editor' | 'viewer'

Team member roles with hierarchical permissions.

Wire DTO mirror of the ORM TeamRoleType enum. Used only for API request/response serialization; authorization decisions route through the ORM matrix (database_tables.permissions), never this enum.

capabilitiesobject nullable
max_seatsinteger nullable

Cap on members plus pending invitations. Null means unlimited; a new team opens at the column's fail-closed default of 150 seats.

max_api_keysinteger nullable

Cap on active user-facing API keys, excluding internal run keys. Null means no team-specific cap, so the platform default applies; 0 forbids API keys.

Changes