v2
latestOpenAPI 3.1.02026-08-05267431678.1 KBusers
Set Active Team Endpoint
Switch the authenticated user's active team.
Delegates the locked membership write and billing-cache invalidation to :func:set_active_team, then reads the activated team back through :func:get_team_response_for_user. Both a revoked membership and a concurrent teardown surface as a single 409 so the frontend has one retry path. Emits a team.activated audit event after the switch commits.
Args: request: {team_id: uuid} — target team to activate. auth: Authenticated user context.
Returns: TeamResponse for the newly active team.
Raises: HTTPException: 409 if the user is not a current member of the target team (or the membership is revoked between the activation and the readback).
post/users/me/active-team
Request body
Response
Successful Response