> ## Documentation Index
> Fetch the complete documentation index at: https://doc.raliopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send OTP via SMS

> Creates and sends an OTP to the specified phone number for an order. In sandbox the SMS is not delivered and the OTP code is always `123456`.



## OpenAPI

````yaml post /api/v1/account/otp/send
openapi: 3.0.1
info:
  title: RALIO API
  description: Banking as a service API.
  contact:
    name: Tropipay Support
    url: https://help.tropipay.com/contacto/
    email: support@tropipay.com
  version: '1.0'
servers:
  - url: https://sandbox-revo-api.raliopay.com/
security: []
paths:
  /api/v1/account/otp/send:
    post:
      tags:
        - otp
      summary: Send OTP via SMS
      description: >-
        Creates and sends an OTP to the specified phone number for an order. In
        sandbox the SMS is not delivered and the OTP code is always `123456`.
      requestBody:
        description: Send OTP request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dto.SendOTPRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.SendOTPResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httperror.ErrResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dto.SendOTPRequest:
      required:
        - orderId
        - phoneNumber
        - phoneNumberCountry
      type: object
      properties:
        orderId:
          type: string
        phoneNumber:
          type: string
        phoneNumberCountry:
          type: string
    dto.SendOTPResponse:
      type: object
      properties:
        expiresAt:
          type: string
        message:
          type: string
    httperror.ErrResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/httperror.ErrorData'
    httperror.ErrorData:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/httperror.ErrorCode'
        details:
          type: array
          items:
            $ref: '#/components/schemas/httperror.ErrorDetails'
        message:
          type: string
        type:
          $ref: '#/components/schemas/httperror.ErrorType'
    httperror.ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - UNAUTHORIZED
        - FORBIDDEN
        - NOT_FOUND
        - INTERNAL_SERVER_ERROR
        - UNKNOWN_ERROR
        - NOT_IMPLEMENTED
        - TOO_MANY_REQUESTS
        - QUOTE_EXPIRED
      x-enum-varnames:
        - InvalidRequestCode
        - UnauthorizedCode
        - ForbiddenCode
        - NotFoundCode
        - InternalServerCode
        - UnknownErrorCode
        - NotImplementedCode
        - TooManyRequestsCode
        - QuoteExpiredCode
    httperror.ErrorDetails:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
    httperror.ErrorType:
      type: string
      enum:
        - VALIDATION_ERROR
        - CONFLICT_ERROR
        - UNPROCESSABLE_ERROR
        - AUTHENTICATION_ERROR
        - AUTHORIZATION_ERROR
        - NOT_FOUND_ERROR
        - INTERNAL_ERROR
        - NOT_IMPLEMENTED_ERROR
        - UNKNOWN_ERROR
        - RATE_LIMIT_ERROR
      x-enum-varnames:
        - ValidationError
        - ConflictError
        - UnprocessableError
        - AuthenticationError
        - AuthorizationError
        - NotFoundError
        - InternalError
        - NotImplementedError
        - UnknownError
        - RateLimitError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Key for accessing management endpoints
      x-mint-auth-type: bearer

````