openapi: 3.0.1 info: title: SMSAPI REST 2FA API description: Representative OpenAPI description of the SMSAPI messaging platform, a European bulk-messaging provider (part of LINK Mobility). Covers SMS, MMS, voice (VMS), contacts, sender names, two-factor authentication, subusers, account profile, HLR lookup, blacklist, and short URLs. Requests are authenticated with an OAuth 2.0 bearer token issued from the SMSAPI customer panel. termsOfService: https://www.smsapi.com/en/terms contact: name: SMSAPI Support url: https://www.smsapi.com/docs/ email: bok@smsapi.pl version: '1.0' servers: - url: https://api.smsapi.com description: Global endpoint (com) - url: https://api.smsapi.eu description: European endpoint (eu) security: - bearerAuth: [] tags: - name: 2FA paths: /authenticator/send_code: post: operationId: sendAuthCode tags: - 2FA summary: Send a one-time 2FA code. description: Generate and deliver a one-time passcode over SMS or voice. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SendCodeRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SendCodeResponse' /authenticator/check_code: post: operationId: checkAuthCode tags: - 2FA summary: Validate a one-time 2FA code. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CheckCodeRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CheckCodeResponse' components: schemas: SendCodeRequest: type: object properties: recipient: type: string channel: type: string enum: - sms - call from: type: string message_template: type: string expiry: type: integer required: - recipient SendCodeResponse: type: object properties: id: type: string recipient: type: string channel: type: string expires_at: type: string CheckCodeResponse: type: object properties: id: type: string valid: type: boolean CheckCodeRequest: type: object properties: id: type: string code: type: string required: - id - code securitySchemes: bearerAuth: type: http scheme: bearer description: OAuth 2.0 bearer token generated in the SMSAPI customer panel (API Tokens).