openapi: 3.0.0 info: title: GarminSync CLI Authentication API version: 1.0.0 description: API for CLI-based authentication with MFA support paths: /api/auth/cli/login: post: summary: Authenticate user via CLI with optional MFA description: Authenticates a user with username/password and optional MFA code requestBody: required: true content: application/json: schema: type: object required: - username - password properties: username: type: string description: User's email or username password: type: string description: User's password mfa_code: type: string description: MFA code if required remember_me: type: boolean description: Whether to store tokens for future use responses: '200': description: Authentication successful content: application/json: schema: type: object properties: success: type: boolean example: true session_id: type: string description: Unique session identifier access_token: type: string description: Access token for API calls token_type: type: string description: Type of token (e.g., Bearer) expires_in: type: integer description: Time until token expiration in seconds mfa_required: type: boolean description: Whether MFA is required for this account user: type: object properties: id: type: string description: User identifier email: type: string description: User's email username: type: string description: User's username '400': description: Invalid credentials or missing required fields content: application/json: schema: type: object properties: success: type: boolean example: false error: type: string description: Error message mfa_required: type: boolean description: Whether MFA is required for this account '401': description: Authentication failed content: application/json: schema: type: object properties: success: type: boolean example: false error: type: string description: Error message '429': description: Too many failed attempts content: application/json: schema: type: object properties: success: type: boolean example: false error: type: string description: Error message