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

# Send OTP

> Send an OTP (One-Time Password) to a user's mobile number or email address.

**Features:**
- SMS delivery via your own sender name or Authentica's default sender
- Email delivery via your own email or Authentica's default email
- Multiple templates available

**Note:** Check Application settings on Authentica dashboard to set default values for OTP options.




## OpenAPI

````yaml post /send-otp
openapi: 3.1.0
info:
  title: Authentica API Documentation
  version: 2.0.0
  description: >
    Authentica provides secure and flexible customer authentication through
    **OTP verification** via **SMS**, **WhatsApp**, and **Email**.

    It also supports **Face** and **Voice** verification for enhanced identity
    assurance.


    You can easily integrate with our system using RESTful APIs and manage your
    authentication process through multiple secure and customizable channels.


    Our system provides many templates to send OTP messages via SMS channel
    using Authentica default sender name.


    Our APIs are designed for easy integration, offering clear endpoints to help
    you implement robust authentication solutions in your applications.


    ## Getting Started


    1. Sign up for an Authentica account at
    [https://portal.authentica.sa](https://portal.authentica.sa)

    2. [Get Your API Key](https://portal.authentica.sa/applications/)

    3. Use your API key in the `X-Authorization` header for all requests


    ## Workflows


    ### OTP Verification Workflow


    1. **Send OTP** - Use the `/send-otp` endpoint to send an OTP via SMS,
    WhatsApp, or Email

    2. **Verify OTP** - Use the `/verify-otp` endpoint to validate the OTP
    entered by your customer


    ### Face Verification Workflow


    Use the `/verify-by-face` endpoint to compare two images: a reference image
    and a real-time image captured by your application.


    ### Voice Verification Workflow


    Use the `/verify-by-voice` endpoint to compare two audio samples: a
    reference audio and a real-time audio recorded by your application.
  contact:
    name: Authentica Support
    url: https://wa.me/966536553944
servers:
  - url: https://api.authentica.sa/api/v2
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Balance Monitoring
    description: Monitor your account balance and credits
  - name: OTP Verification
    description: Send and verify one-time passwords via SMS, WhatsApp, or Email
  - name: Face Verification
    description: Verify users through facial recognition
  - name: Voice Verification
    description: Verify users through voice biometrics
paths:
  /send-otp:
    post:
      tags:
        - OTP Verification
      summary: Send OTP
      description: >
        Send an OTP (One-Time Password) to a user's mobile number or email
        address.


        **Features:**

        - SMS delivery via your own sender name or Authentica's default sender

        - Email delivery via your own email or Authentica's default email

        - Multiple templates available


        **Note:** Check Application settings on Authentica dashboard to set
        default values for OTP options.
      operationId: sendOtp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  enum:
                    - sms
                    - whatsapp
                    - email
                  description: >-
                    Delivery method for the OTP. Required if no default channel
                    is configured.
                  example: sms
                phone:
                  type: string
                  description: >-
                    Valid international phone number. Required if method is sms
                    or whatsapp.
                  example: '+966551234567'
                  pattern: ^\+[1-9]\d{1,14}$
                email:
                  type: string
                  format: email
                  description: Valid email address. Required if method is email.
                  example: user@example.com
                template_id:
                  type: integer
                  description: Template ID for the OTP message. Default is 1.
                  example: 31
                  default: 1
            examples:
              sms:
                summary: Send OTP via SMS
                value:
                  method: sms
                  phone: '+966551234567'
                  template_id: 31
              whatsapp:
                summary: Send OTP via WhatsApp
                value:
                  method: whatsapp
                  phone: '+966551234567'
                  template_id: 1
              email:
                summary: Send OTP via Email
                value:
                  method: email
                  email: user@example.com
                  template_id: 1
      responses:
        '200':
          description: OTP sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    nullable: true
                  message:
                    type: string
                    example: OTP send successfully
              examples:
                success:
                  summary: OTP sent successfully
                  value:
                    success: true
                    data: null
                    message: OTP send successfully
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Authorization
      description: >
        API key for authentication. [Get Your API
        Key](https://portal.authentica.sa/applications/)

````