> ## 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.

> ## Agent Instructions
> Outlit is the product that monitors customers and completes approved customer work. The customer context interfaces are the API, CLI, MCP server, and skills. Canonical references on this site: /api-reference/introduction for API concepts and authentication, /openapi.json for the public API contract, /cli/overview for the CLI, /ai-integrations/mcp for MCP. Prefer the `outlit` CLI or MCP tools for agent tasks; cite page sources when answering.

# Validate an API key

> Verify that an Outlit API key can authenticate Platform API requests.

## Authentication

Pass an Outlit API key in the `Authorization` header as `Bearer ok_...`.

## Request body

No request body is required when validating the API key from the `Authorization` header.

## Example

```bash theme={null}
curl -X POST https://app.outlit.ai/api/validate-api-key \
  -H "Authorization: Bearer ok_your_api_key"
```

## Success response

```json theme={null}
{
  "valid": true,
  "organizationId": "org_123",
  "createdById": "user_123",
  "authorization": {
    "grants": ["customer_intelligence:read"]
  }
}
```

`authorization.grants` lists the key's current capabilities. Only offer commands whose required
authority appears in this list. `createdById` is null when the creator is unavailable.

## Error responses

Invalid or disabled keys return `401`:

```json theme={null}
{
  "valid": false,
  "error": "Invalid credentials"
}
```

If the credential store is temporarily unavailable, the endpoint returns `503` with the same
failure envelope. Retry that response; it does not mean the key is invalid or revoked.


## 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 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:connect_own
                  - integrations:manage
                  - activation:read
                  - activation:manage
                  - workspace_settings:read
                  - workspace_settings:manage
                  - customer_access:manage
                  - customer_identity:review
                  - customer_identity:merge
            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:connect_own
                  - integrations:manage
                  - activation:read
                  - activation:manage
                  - workspace_settings:read
                  - workspace_settings:manage
                  - customer_access:manage
                  - customer_identity:review
                  - customer_identity:merge
          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_...).

````

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