openapi: 3.0.0 info: title: Authentication API version: 1.0.0 servers: - url: https://id.logidex.ru/api/auth paths: /auth/otp/request: post: tags: - auth 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' /auth/otp/verify: post: tags: - auth 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' /auth/consent/accept: post: tags: - auth summary: Accept consent requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AcceptConsentRequest' responses: '200': description: Consent accepted successfully content: application/json: schema: $ref: '#/components/schemas/AcceptConsentResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/AcceptConsentResponse' 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 AcceptConsentRequest: type: object properties: consent_challenge: type: string description: The consent challenge to accept example: "challenge123" required: - consent_challenge AcceptConsentResponse: type: object properties: redirect_url: type: string description: URL to redirect to after accepting consent example: "https://example.com/consent-accepted" ok: type: boolean description: Status of the consent acceptance example: true message: type: string example: "Consent accepted" required: - message - ok - redirect_url