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

# Validate an Outlit API key



## OpenAPI

````yaml /openapi.json post /api/validate-api-key
openapi: 3.1.0
info:
  title: Outlit Public API
  version: 1.0.0
  description: >-
    Generated from Outlit Core's capability catalog and public protocol
    transport contracts.
servers:
  - url: https://app.outlit.ai
security:
  - bearerAuth: []
paths:
  /api/validate-api-key:
    post:
      summary: Validate an Outlit API key
      operationId: validateApiKey
      responses:
        '200':
          description: Validated API-key context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyValidationSuccess'
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyValidationFailure'
        '503':
          description: API-key validation unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyValidationFailure'
components:
  schemas:
    ApiKeyValidationSuccess:
      type: object
      properties:
        valid:
          type: boolean
          const: true
        organizationId:
          type: string
        createdById:
          anyOf:
            - type: string
            - type: 'null'
        organization:
          type: object
          properties:
            id:
              type: string
            name:
              anyOf:
                - type: string
                - type: 'null'
            slug:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - id
            - name
            - slug
          additionalProperties: false
        createdBy:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                email:
                  type: string
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - id
                - email
                - name
              additionalProperties: false
            - type: 'null'
        apiKey:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            prefix:
              type: string
            keyType:
              type: string
              enum:
                - api
                - cli
                - mcp
                - ci
            grants:
              type: array
              items:
                type: string
                enum:
                  - customer_intelligence:read
                  - workspace_members:read
                  - analytics:read
                  - destinations:manage
                  - behavior_metrics:manage
                  - integrations:manage
                  - activation:read
                  - activation:manage
                  - workspace_settings:read
                  - workspace_settings:manage
                  - customer_access:manage
            createdAt:
              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))$
            lastUsedAt:
              anyOf:
                - 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))$
                - type: 'null'
            totalRequests:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - id
            - name
            - prefix
            - keyType
            - grants
            - createdAt
            - lastUsedAt
            - totalRequests
          additionalProperties: false
        authorization:
          type: object
          properties:
            grants:
              type: array
              items:
                type: string
                enum:
                  - customer_intelligence:read
                  - workspace_members:read
                  - analytics:read
                  - destinations:manage
                  - behavior_metrics:manage
                  - integrations:manage
                  - activation:read
                  - activation:manage
                  - workspace_settings:read
                  - workspace_settings:manage
                  - customer_access:manage
          required:
            - grants
          additionalProperties: false
      required:
        - valid
        - organizationId
        - createdById
        - authorization
      additionalProperties: false
    ApiKeyValidationFailure:
      type: object
      properties:
        valid:
          type: boolean
          const: false
        error:
          type: string
      required:
        - valid
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Outlit API key (ok_...).

````