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

# Verify Email

> Verify a user's email address using the token sent in the registration email.

The user clicks a link in their inbox that includes this token as a query
parameter. On success, ``email_verified`` is set to True and the token is
cleared so the link cannot be reused.

Args:
    token: The URL-safe verification token from the email link.
    db:    Database session.

Returns:
    A JSON message confirming successful verification.

Raises:
    HTTPException 400: If the token is not found or has expired.



## OpenAPI

````yaml /openapi.json get /api/auth/verify-email
openapi: 3.1.0
info:
  title: HAI-Co² API
  description: Human-AI Co-Construction reference implementation.
  version: 0.1.0
servers:
  - url: https://haico.gr
    description: Production
  - url: https://dev.haico.gr
    description: Development
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /api/auth/verify-email:
    get:
      tags:
        - Auth
      summary: Verify Email
      description: >-
        Verify a user's email address using the token sent in the registration
        email.


        The user clicks a link in their inbox that includes this token as a
        query

        parameter. On success, ``email_verified`` is set to True and the token
        is

        cleared so the link cannot be reused.


        Args:
            token: The URL-safe verification token from the email link.
            db:    Database session.

        Returns:
            A JSON message confirming successful verification.

        Raises:
            HTTPException 400: If the token is not found or has expired.
      operationId: verify_email_api_auth_verify_email_get
      parameters:
        - name: token
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            title: Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````