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

> ## Agent Instructions
> Treat Stackdome as an application-delivery platform for coding agents and developers, not as a Kubernetes dashboard.
> Prefer the Stackdome agent plugin as the user entry point and the stackdome CLI as the execution interface.
> Route agents who need the maintained deploy skill to npx skills add stackdome/skills and the complete operational workflow to /guides/ai-agents.
> Verify commands and flags with stackdome --help. Run stackdome init before authoring stackfile.yaml and stackdome validate before deploying.
> Use -o json for automation and verify documented terminal states before claiming success.
> Never request a user's account password. Use API-token authentication.
> During alpha, Stackdome Cloud is ephemeral and capacity-limited, and each organization can connect one cluster.
> Do not expose Kubernetes as a user concern unless the task is self-hosting or infrastructure architecture.

# User login

> Authenticate user and generate an access token



## OpenAPI

````yaml /openapi.yaml post /api/v1/auth/login
openapi: 3.0.0
info:
  description: >-
    Deploy, debug, and operate applications through the Stackdome REST API on
    Stackdome Cloud or a self-hosted installation. This API is in alpha and may
    change before general availability.
  title: Stackdome API
  version: 0.0.1-alpha
servers:
  - url: /
security: []
paths:
  /api/v1/auth/login:
    post:
      summary: User login
      description: Authenticate user and generate an access token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
          description: Successful login
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid credentials
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
components:
  schemas:
    LoginRequest:
      example:
        password: password
        email: email
      properties:
        email:
          description: User's email
          type: string
        password:
          description: User's password
          format: password
          type: string
      required:
        - email
        - password
      type: object
    LoginResponse:
      example:
        refresh_token: refresh_token
        user:
          organisation_id: organisation_id
          role: null
          projects:
            - role: Developer
              project_id: project_id
              default_project: true
              project_name: project_name
            - role: Developer
              project_id: project_id
              default_project: true
              project_name: project_name
          name: name
          organisation: organisation
          id: id
          email: email
          username: username
        expires_in: 0
        token: token
      properties:
        token:
          description: Access token for authenticated requests
          type: string
        refresh_token:
          description: Refresh token for obtaining new access tokens
          type: string
        user:
          $ref: '#/components/schemas/User'
        expires_in:
          description: Token expiration time in seconds
          type: integer
      type: object
    Error:
      allOf:
        - $ref: '#/components/schemas/ObjectReference'
        - $ref: '#/components/schemas/Error_allOf'
    User:
      example:
        organisation_id: organisation_id
        role: null
        projects:
          - role: Developer
            project_id: project_id
            default_project: true
            project_name: project_name
          - role: Developer
            project_id: project_id
            default_project: true
            project_name: project_name
        name: name
        organisation: organisation
        id: id
        email: email
        username: username
      properties:
        id:
          description: User's ID
          type: string
        name:
          description: User's name
          type: string
        username:
          description: User's username
          type: string
        email:
          description: User's email address
          format: email
          type: string
        organisation:
          description: User's organisation
          type: string
        role:
          $ref: '#/components/schemas/UserRole'
        organisation_id:
          description: OrganisationID
          type: string
        projects:
          description: >-
            Projects the user belongs to (included in login/signup/current-user
            responses)
          items:
            $ref: '#/components/schemas/UserProjectMembership'
          type: array
      type: object
    ObjectReference:
      properties:
        id:
          type: string
        kind:
          type: string
        href:
          type: string
      type: object
    Error_allOf:
      properties:
        code:
          type: string
        reason:
          type: string
        operation_id:
          type: string
        details:
          additionalProperties: true
          description: Optional structured, machine-readable error context
          type: object
      type: object
    UserRole:
      enum:
        - OrgAdmin
        - OrgMember
      type: string
    UserProjectMembership:
      example:
        role: Developer
        project_id: project_id
        default_project: true
        project_name: project_name
      properties:
        project_id:
          type: string
        project_name:
          type: string
        role:
          enum:
            - Developer
            - Viewer
          type: string
        default_project:
          type: boolean
      type: object

````