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

# Login

> Authenticate with email and password



## OpenAPI

````yaml /api-reference/openapi.json post /auth/login
openapi: 3.0.0
info:
  title: EngageFabric API
  description: >-
    EngageFabric is a multi-tenant SaaS gamification framework. This API
    provides endpoints for managing players, tracking events, quests,
    adventures, leaderboards, lobbies, and real-time features.
  version: 1.0.0
  contact:
    name: EngageFabric Support
    url: https://engagefabric.com
    email: support@engagefabric.com
  license:
    name: Proprietary
    url: https://engagefabric.com/terms
servers:
  - url: https://api.engagefabric.com
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: tenants
    description: Tenant management
  - name: projects
    description: Project management
  - name: players
    description: Player management and game state
  - name: events
    description: Event ingestion and tracking
  - name: quests
    description: Quest management and progress
  - name: adventures
    description: Adventure/season management
  - name: leaderboards
    description: Leaderboard rankings
  - name: lobbies
    description: Multiplayer lobby management
  - name: chat
    description: Real-time chat
  - name: rules
    description: Rules engine configuration
paths:
  /auth/login:
    post:
      tags:
        - auth
      summary: Login
      description: Authenticate with email and password
      operationId: AuthController_login
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginDto'
      responses:
        '200':
          description: Login successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthResponseEntity'
        '401':
          description: Invalid credentials
components:
  schemas:
    LoginDto:
      type: object
      properties:
        email:
          type: string
          description: User email address
          example: admin@example.com
        password:
          type: string
          description: User password
          example: SecurePassword123!
          minLength: 8
      required:
        - email
        - password
    AuthResponseEntity:
      type: object
      properties:
        accessToken:
          type: string
          description: Access token (JWT)
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        refreshToken:
          type: string
          description: Refresh token
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        tokenType:
          type: string
          description: Token type
          example: Bearer
        expiresIn:
          type: number
          description: Token expiration time in seconds
          example: 86400
        user:
          type: object
          description: User information
          example:
            id: 123e4567-e89b-12d3-a456-426614174000
            email: user@example.com
            name: John Doe
            tenantId: 123e4567-e89b-12d3-a456-426614174000
            role: ADMIN
            emailVerified: true
      required:
        - accessToken
        - refreshToken
        - tokenType
        - expiresIn
        - user

````