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

# Confirm email

> Confirms a user's email address using a token or code
 - This process ensures that the person registering or using an email address actually has access to it. When a user registers a new account or adds a new email address to their profile, the system sends a confirmation email containing either a token (a long, randomly generated string) or a numerical code. This function processes the verification when the user clicks the confirmation link in the email or manually enters the provided code. It accepts either:
- a) A token parameter, which is included in the confirmation link
- b) A code parameter, which is a shorter numerical sequence that can be manually entered



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json post /accounts/confirm-email
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    API for managing accounts, users, authentication, and payments in the
    quiva.ai platform
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Account Management
    description: Operations related to account creation, updating, and deletion
  - name: User Management
    description: Operations related to user creation, updating, and deletion
  - name: Authentication
    description: Operations related to authentication and session management
  - name: API Keys
    description: Operations related to API key management
  - name: Multi-Factor Authentication
    description: Operations related to MFA setup and verification
  - name: Payment
    description: Operations related to subscription and payment management
  - name: Mesh Nodes
    description: Operations related to mesh node management
paths:
  /accounts/confirm-email:
    post:
      tags:
        - Account Management
      summary: Confirm email
      description: >-
        Confirms a user's email address using a token or code
         - This process ensures that the person registering or using an email address actually has access to it. When a user registers a new account or adds a new email address to their profile, the system sends a confirmation email containing either a token (a long, randomly generated string) or a numerical code. This function processes the verification when the user clicks the confirmation link in the email or manually enters the provided code. It accepts either:
        - a) A token parameter, which is included in the confirmation link

        - b) A code parameter, which is a shorter numerical sequence that can be
        manually entered
      operationId: confirmEmail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: Email confirmation token
                code:
                  type: string
                  description: Email confirmation code (alternative to token)
              oneOf:
                - required:
                    - token
                - required:
                    - code
            example:
              token: abcdef123456
      responses:
        '200':
          description: Email confirmed successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: string
                      user_id:
                        type: string
                      account:
                        type: string
                      email:
                        type: string
                        format: email
              example:
                data:
                  account: acme
                  email: user@example.com
                  account_id: acct_123456789
                  user_id: usr_123456789
        '400':
          description: Invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````