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

# Login and create a new session



## OpenAPI

````yaml api-reference/openapi.json post /api/user/login
openapi: 3.0.1
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://localhost:8080
    description: Generated server url
security: []
paths:
  /api/user/login:
    post:
      tags:
        - User
      summary: Login and create a new session
      operationId: login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserLoginDTO'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/UserLoginResponseDTO'
components:
  schemas:
    UserLoginDTO:
      required:
        - password
        - username
      type: object
      properties:
        username:
          type: string
        password:
          type: string
    UserLoginResponseDTO:
      type: object
      properties:
        token:
          type: string

````