openapi: 3.0.3
info:
  title: 'Happy Auth :)'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'http://whatsappauth.sr'
paths:
  /api/v1/send-otp:
    post:
      summary: 'Send OTP api'
      operationId: sendOTPApi
      description: ''
      parameters:
        -
          in: header
          name: Happy-Auth-Api-Key
          description: ''
          example: 'Your Happy-Auth-Api-Key'
          schema:
            type: string
        -
          in: header
          name: Happy-Auth-Api-Secret
          description: ''
          example: 'Your Happy-Auth-Api-Secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n     \"status\": OTP sent successfully.\n}"
        422:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n\"success\": false,\n\"message\": \"Validation errors\",\n \"data\": {\n     \"phone_number\": [\n         \"The phone number field is required.\"\n     ],\n     \"otp\": [\n         \"The otp field is required.\"\n     ],\n   }\n}"
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Something went wrong.'
                properties:
                  message:
                    type: string
                    example: 'Something went wrong.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_number:
                  type: numeric
                  description: 'Please provide phone number. <br>'
                  example: '9876543210'
                otp:
                  type: numeric
                  description: 'Please provide otp. <br>'
                  example: '123456'
              required:
                - phone_number
                - otp
      security: []
tags:
  -
    name: Endpoints
    description: ''
