openapi: 3.0.0 info: title: Authentication API version: 1.0.0 servers: - url: https://id.logidex.ru/api/auth paths: /otp/request: post: summary: Request OTP requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RequestOTPRequest' responses: '200': description: OTP requested successfully content: application/json: schema: $ref: '#/components/schemas/RequestOTPResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/RequestOTPResponse' /otp/verify: post: summary: Verify OTP requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VerifyOTPRequest' responses: '200': description: OTP verified successfully content: application/json: schema: $ref: '#/components/schemas/VerifyOTPResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/VerifyOTPResponse' components: schemas: RequestOTPRequest: type: object properties: phone_number: type: string description: Phone number to send OTP to example: "+79999999999" maxLength: 15 required: - phone_number RequestOTPResponse: type: object properties: message: type: string description: Confirmation message example: "OTP sent successfully" ok: type: boolean description: Status of the request example: true required: - message - ok VerifyOTPRequest: type: object properties: phone_number: type: string description: Phone number to verify OTP for example: "+79999999999" maxLength: 15 otp: type: string description: One-time password to verify example: "123456" maxLength: 6 login_challenge: type: string description: Login challenge for verification example: "challenge123" required: - phone_number - otp - login_challenge VerifyOTPResponse: type: object properties: redirect_url: type: string description: URL to redirect to after successful verification example: "https://example.com/redirect" ok: type: boolean description: Status of the verification example: true required: - redirect_url - ok