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

# Verify a personal API key

> Returns the account, credential identifier and granted scopes.
No query parameters are accepted. This verifies the key; it does not
establish that any particular campaign is accessible. Account key
creation, listing and revocation require a browser session and are
intentionally excluded from this bearer-authenticated reference.




## OpenAPI

````yaml /openapi.yaml get /api/account/api-keys/whoami
openapi: 3.1.0
info:
  title: Lorvia API authentication
  version: 0.1.0
  description: >
    Authentication reference for Lorvia's HTTP API. This initial specification

    covers credential verification only, not the complete campaign API.

    Create personal API keys in Account → API keys. Send the secret as

    Authorization: Bearer lv_live_…. Never send keys in URLs.

    Resource scopes and current campaign membership both apply. A viewing

    perspective does not grant authority. Invalid credentials do not grant
    access.

    Hosted /mcp currently requires OAuth; personal keys work through the local

    stdio MCP bridge and supported HTTP resource routes.
servers:
  - url: https://www.lorvia.online
    description: Production (deployment not verified by this specification)
security:
  - personalApiKey: []
tags:
  - name: Authentication
    description: Verify the identity and scopes of a personal API key.
paths:
  /api/account/api-keys/whoami:
    get:
      tags:
        - Authentication
      summary: Verify a personal API key
      description: |
        Returns the account, credential identifier and granted scopes.
        No query parameters are accepted. This verifies the key; it does not
        establish that any particular campaign is accessible. Account key
        creation, listing and revocation require a browser session and are
        intentionally excluded from this bearer-authenticated reference.
      operationId: verifyPersonalApiKey
      responses:
        '200':
          description: Credential resolved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialIdentity'
        '400':
          description: Query parameters are not accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, expired or revoked credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Authentication required.
        '408':
          description: Request aborted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Credential or IP rate limit exhausted.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            Credential verification unavailable or server configuration
            incomplete.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CredentialIdentity:
      type: object
      additionalProperties: false
      required:
        - accountId
        - keyId
        - scopes
      properties:
        accountId:
          type: string
          format: uuid
        keyId:
          type: string
          format: uuid
        scopes:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/ApiScope'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ApiScope:
      type: string
      enum:
        - campaigns:read
        - lore:read
        - lore:write
        - sessions:write
        - mcp:tools
      description: |
        lore:write includes lore:read. mcp:tools does not include resource
        scopes. Campaign-management writes currently use sessions:write;
        campaign authorization still independently checks the actor's role.
  securitySchemes:
    personalApiKey:
      type: http
      scheme: bearer
      bearerFormat: Lorvia personal API key
      description: Enter the lv_live_… secret created in Account → API keys.

````

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