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

# Whoami

> Reflect the authenticated machine principal. Requires a valid `omg_…` API key; this is the
end-to-end proof that [`ApiKeyPrincipal`] resolves, verifies, and scopes a key.



## OpenAPI

````yaml /schemas/operator.json get /v1/whoami
openapi: 3.1.0
info:
  title: Omegas Operator API
  version: 0.1.0
  description: >-
    The public /v1 machine surface: cloud browser devices, tasks, live-view
    sessions, escalations, usage, webhook endpoints, and the audit trail.
    Generated from the same OpenAPI document the Rust API is checked against.
servers:
  - url: https://api.omegas.dev
    description: Production
security: []
paths:
  /v1/whoami:
    get:
      tags:
        - Endpoints
      summary: Whoami
      description: >-
        Reflect the authenticated machine principal. Requires a valid `omg_…`
        API key; this is the

        end-to-end proof that [`ApiKeyPrincipal`] resolves, verifies, and scopes
        a key.
      operationId: whoami
      responses:
        '200':
          description: The authenticated service account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoamiResponse'
        '401':
          description: >-
            invalid_api_key — missing, malformed, unknown, revoked, or expired
            key
        '429':
          description: rate_limited
      security:
        - bearer_operator: []
components:
  schemas:
    WhoamiResponse:
      type: object
      description: >-
        The service-account identity behind an API key, as resolved from the DB
        (never the request).
      required:
        - service_account_id
        - org_id
        - product
        - scopes
      properties:
        org_id:
          type: string
        product:
          type: string
        scopes:
          type: array
          items:
            type: string
        service_account_id:
          type: string
        space_ids:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            `null` ⇒ the key is org-wide (every Space); otherwise the Spaces it
            is scoped to.
  securitySchemes:
    bearer_operator:
      type: http
      scheme: bearer
      bearerFormat: Opaque

````