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

# Send a verification code

> Sends the company a 4-digit verification code by SMS, to send with Get prices from every provider as `otp`. The code is optional on pricing for now. Send the company's own `sponsor_number`: pricing checks the code against the latest one sent for that sponsor number. A code stays valid for the time in `X-OTP-Expires-In` (8 hours) and can price the company again within it; three wrong codes lock it until a new one is sent. One code per phone every three minutes.



## OpenAPI

````yaml /medical-api-reference/openapi.json post /quote-otp
openapi: 3.0.1
info:
  title: OpenAPI For SME Medical Insurance
  description: API's that you need to use to request insurance(s) for your clients
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://production.yasmina.ai/api/v1/medical
  - url: https://sandbox.yasmina.ai/api/v1/medical
security:
  - bearerAuth: []
paths:
  /quote-otp:
    post:
      tags:
        - Quotes
      summary: Send a verification code
      description: >-
        Sends the company a 4-digit verification code by SMS, to send with Get
        prices from every provider as `otp`. The code is optional on pricing for
        now. Send the company's own `sponsor_number`: pricing checks the code
        against the latest one sent for that sponsor number. A code stays valid
        for the time in `X-OTP-Expires-In` (8 hours) and can price the company
        again within it; three wrong codes lock it until a new one is sent. One
        code per phone every three minutes.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - phone
                - sponsor_number
              properties:
                email:
                  type: string
                  format: email
                  example: hr@example.com
                phone:
                  type: string
                  pattern: ^05[0-9]{8}$
                  description: Saudi mobile number in the form 05XXXXXXXX
                  example: '0512345678'
                sponsor_number:
                  type: string
                  pattern: ^[0-9]{10}$
                  description: The company's sponsor number, as on Create company
                  example: '1000000001'
      responses:
        '204':
          description: The code was sent
          headers:
            X-OTP-Expires-In:
              description: Seconds until the code expires
              schema:
                type: integer
                example: 28800
            X-OTP-Expires-At:
              description: When the code expires, ISO 8601
              schema:
                type: string
                example: '2026-11-25T21:39:47+00:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          description: A code was sent to this phone less than three minutes ago
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: '42902'
                  message:
                    type: string
                    example: >-
                      Verification code was requested recently, try again in
                      2:41.
                  retry_after_seconds:
                    type: integer
                    example: 161
        '503':
          description: >-
            The SMS could not be sent. Try again; the three-minute limit does
            not apply to a code that was not sent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: '50302'
                  message:
                    type: string
                    example: >-
                      The verification code could not be sent. Please try again
                      in a moment.
components:
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: '40101'
              message:
                type: string
                example: Unauthenticated
    UnprocessableEntity:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.