> ## 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.

# Verify OTP

> Verify the OTP entered by your customer for authentication.

This endpoint validates the OTP against the one sent via `/send-otp` endpoint.




## OpenAPI

````yaml post /verify-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:
  /verify-otp:
    post:
      tags:
        - OTP Verification
      summary: Verify OTP
      description: >
        Verify the OTP entered by your customer for authentication.


        This endpoint validates the OTP against the one sent via `/send-otp`
        endpoint.
      operationId: verifyOtp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - otp
              properties:
                phone:
                  type: string
                  description: >-
                    Phone number used to send the OTP. Required if sms or
                    whatsapp was used.
                  example: '+966551234567'
                email:
                  type: string
                  format: email
                  description: Email used to send the OTP. Required if email was used.
                  example: user@example.com
                otp:
                  type: string
                  description: The OTP entered by the customer
                  example: '123456'
            examples:
              phone:
                summary: Verify OTP with phone number
                value:
                  phone: '+966551234567'
                  otp: '123456'
              email:
                summary: Verify OTP with email
                value:
                  email: user@example.com
                  otp: '123456'
      responses:
        '200':
          description: OTP verified successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: OTP verified successfully
              examples:
                success:
                  summary: OTP verified successfully
                  value:
                    status: true
                    message: OTP verified 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/)

````