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

# Verify Challenge

> Verify an SMS or email-based challenge by submitting a verification code.



## OpenAPI

````yaml server-api POST /verify
openapi: 3.0.0
info:
  description: Authsignal's Server API.
  version: 1.0.0
  title: Server API
  termsOfService: https://www.authsignal.com/legal/terms-of-service
  contact:
    email: hello@authsignal.com
servers:
  - url: https://api.authsignal.com/v1
  - url: https://au.api.authsignal.com/v1
  - url: https://eu.api.authsignal.com/v1
  - url: https://ca.api.authsignal.com/v1
security:
  - basicAuth: []
tags:
  - name: users
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: challenge
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: authenticator configurations
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: actions
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: query
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: email
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: sms
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: verify
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: challenges
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: sessions
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
  - name: devices
    description: ''
    externalDocs:
      description: Find out more
      url: https://docs.authsignal.com
externalDocs:
  description: Find out more about Authsignal
  url: https://docs.authsignal.com
paths:
  /verify:
    post:
      tags:
        - verify
        - sms
        - email
      summary: Verify challenge
      description: >-
        Verify an SMS or email-based challenge by submitting a verification
        code.
      operationId: verifyChallenge
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                challengeId:
                  type: string
                  description: The ID of the challenge.
                verificationCode:
                  type: string
                  description: The verification code submitted by the user.
              required:
                - challengeId
                - verificationCode
            example:
              challengeId: df9ad600-ffb4-4fdf-b59a-1dff79d4f993
              verificationCode: '123456'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  isVerified:
                    type: boolean
                    description: True if the verification code is valid.
                  verificationMethod:
                    type: string
                    enum:
                      - SMS
                      - EMAIL_OTP
                      - WHATSAPP
                    description: >-
                      The verification method used for the challenge if
                      successful.
                  phoneNumber:
                    type: string
                    description: >-
                      The phone number for which the challenge was initiated.
                      Only present if verification is successful and the
                      verification method is 'SMS' or 'WHATSAPP'.
                  email:
                    type: string
                    description: >-
                      The email address for which the challenge was initiated.
                      Only present if verification is successful and the
                      verification method is 'EMAIL_OTP'.
                  failureReason:
                    enum:
                      - CODE_INVALID_OR_EXPIRED
                      - MAX_ATTEMPTS_EXCEEDED
                required:
                  - isVerified
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    InvalidRequest:
      description: Invalid Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        errorDescription:
          type: string
      required:
        - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use your Authsignal Server API secret key as the username and leave the
        password empty. The secret key can be found in the API Keys section of
        the Authsignal Portal settings page.

````