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

# Verify Email OTP

> Verifies the one-time passcode sent to the user's email.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /app/{appId}/whitelabel/verifications/{verificationId}/email/verify
openapi: 3.1.0
info:
  title: Pion API Reference
  description: API for authentication and verification status retrieval.
  version: 1.0.0
servers:
  - url: https://api.wearepion.com
    description: Main production server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Authenticating with Pion API
  - name: Beans iD Whitelabel API
    description: Endpoints used for the Beans iD Whitelabel API product.
paths:
  /app/{appId}/whitelabel/verifications/{verificationId}/email/verify:
    post:
      tags:
        - Beans iD Whitelabel API
      summary: Verify Email OTP
      description: Verifies the one-time passcode sent to the user's email.
      operationId: verifyEmailOtp
      parameters:
        - name: appId
          in: path
          required: true
          schema:
            type: string
        - name: verificationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - code
              properties:
                code:
                  type: string
                  minLength: 6
                  maxLength: 6
      responses:
        '200':
          description: Email OTP verified successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationData'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        default:
          $ref: '#/components/responses/GenericError'
components:
  schemas:
    VerificationData:
      type: object
      required:
        - verificationId
        - appId
        - status
        - stage
        - consumerGroup
        - territory
      properties:
        verificationId:
          type: string
          format: uuid
        appId:
          type: string
        status:
          $ref: '#/components/schemas/VerificationStatusEnum'
        stage:
          $ref: '#/components/schemas/VerificationStageEnum'
        territory:
          type: string
          pattern: ^[A-Z]{2}$
        consumerGroup:
          $ref: '#/components/schemas/ConsumerGroupEnum'
        availableMethods:
          type: array
          uniqueItems: true
          minItems: 0
          items:
            $ref: '#/components/schemas/AvailableMethodsEnum'
        institutionId:
          type: string
        institutionName:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        expiresOn:
          type: string
          format: date
          description: YYYY-MM-DD
        beansId:
          type: string
          description: Internal Pion user ID.
    VerificationStatusEnum:
      type: string
      enum:
        - success
        - pending
        - failed
        - expired
    VerificationStageEnum:
      type: string
      description: Enum of granular verification stages
      enum:
        - success
        - failed:otp_failed
        - failed:too_many_attempts
        - phone_number
        - phone_number_otp
        - select_institution
        - select_verification_method
        - pending_verification:email
        - pending_verification:manual
        - pending_verification:portal
        - rejected_verification:email
        - rejected_verification:manual
        - rejected_verification:portal
    ConsumerGroupEnum:
      type: string
      description: Enum of available consumer groups
      enum:
        - student
        - graduate
        - healthcare
        - military
        - first-responder
        - charity-worker
        - teacher
        - parent
        - low-income
        - disability
    AvailableMethodsEnum:
      type: string
      description: Enum of available verification methods
      enum:
        - portal
        - manual
        - email
        - inbound_email
  responses:
    UnauthorizedError:
      description: 401 Unauthorised
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  title:
                    type: string
                    examples:
                      - unauthorised
    NotFoundError:
      description: 404 Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  title:
                    type: string
    GenericError:
      description: Generic error response format
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  title:
                    type: string
                  detail:
                    type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````