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

# Get key management session

> Validate a key-management session and read its effective expiry. Requires a vlm_ Bearer token.



## OpenAPI

````yaml /openapi.json get /auth/key-management/session
openapi: 3.1.1
info:
  title: Vitalog
  version: 1.0.1
  description: >-
    Single-user structured observations with equivalent REST and MCP domain
    services. Environment AUTH_KEY or revocable personal Bearer keys with
    required name, permissions and explicit expiry (including Never); Primary
    key management requires AUTH_KEY; the UI uses separate, root-verified
    30-minute management sessions. MCP clients use OAuth authorization code with
    S256 PKCE, issued after root sign-in. Clients are resolved through HTTPS
    metadata, pre-registration or dynamic registration. OAuth tokens grant MCP
    access only.
servers:
  - url: https://vitalog-api.example.com
    description: Production REST and MCP API
  - url: http://localhost:3000
    description: Loopback development; production requires TLS ingress
security: []
paths:
  /auth/key-management/session:
    get:
      tags:
        - Key management
      summary: Get key management session
      description: >-
        Validate a key-management session and read its effective expiry.
        Requires a vlm_ Bearer token.
      operationId: get_key_management_session
      parameters: []
      responses:
        '200':
          description: >-
            Validate a key-management session and read its effective expiry.
            Requires a vlm_ Bearer token.
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  expires_at:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                required:
                  - expires_at
                additionalProperties: false
        '401':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Authentication or request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - keyManagementSession: []
components:
  schemas:
    Error:
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - catalog_version
        - issues
      properties:
        code:
          type: string
          enum:
            - VALIDATION_ERROR
            - NOT_FOUND
            - VERSION_CONFLICT
            - IDEMPOTENCY_CONFLICT
            - DAILY_TOTAL_EXISTS
            - CATALOG_VERSION_MISMATCH
            - LIMIT_EXCEEDED
            - UNAUTHORIZED
            - FORBIDDEN
            - RATE_LIMITED
            - UNAVAILABLE
            - TIMEOUT
            - INTERNAL_ERROR
        message:
          type: string
        catalog_version:
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              reason:
                type: string
              message:
                type: string
              suggested_keys:
                type: array
                items:
                  type: string
              discovery:
                type: object
        existing_id:
          type: string
        current_version:
          type: integer
        current_catalog_version:
          type: string
  securitySchemes:
    keyManagementSession:
      type: http
      scheme: bearer
      description: >-
        Opaque vlm_ token valid for 30 minutes. API-key management only; ledger
        and MCP routes reject it. The UI stores it in a separate host-only
        HttpOnly cookie.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.