POST v3/me/teams/{id}/leave

PARTICIPANT (member-self) LEAVE TEAM — the CURRENT member removes themselves from a team. Member-self: both curUserId and the target MemberId are FORCED to the authenticated identity (never taken from the body / route), so this route can only ever leave the caller's own roster row. Wraps the page-pure TeamApi.LeaveTeam (imLeagues.Internal.API/BO/TeamApi.cs:6218) which re-guards (curUserId==MemberId || IsTeamAdmin) and enforces the SPA leave rules: - a SOLE/team CAPTAIN cannot leave (throws RemoveTeamCaptainError) — they must reassign the captaincy first (CaptainLeaveTeam / GetDeleteCaptainVM), not done here; the FE hides the action for captains and surfaces this error otherwise; - the league leave-window / NumOfGamesBeforeLeave / captain-with-payments lock (TeamMembers.CanLeaveTeam) — surfaced as a MsgCode.WithError message. RemovePlayerInVO.Validate also confirms the (MemberId, teamId) roster row exists.

Request Information

Parameters

NameDescriptionAdditional information
id
team id to leave

Define this parameter in the request URI.