Skip to main content
POST
/
api
/
validate-api-key
Validate API Key
curl --request POST \
  --url https://api.example.com/api/validate-api-key \
  --header 'Authorization: <authorization>'
{
  "valid": true,
  "organizationId": "<string>",
  "createdById": {}
}

Endpoint

POST https://app.outlit.ai/api/validate-api-key

Authentication

Authorization
string
required
Outlit API key using the Bearer ok_... format.

Request Body

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

Example

curl -X POST https://app.outlit.ai/api/validate-api-key \
  -H "Authorization: Bearer ok_your_api_key"

Success Response

{
  "valid": true,
  "organizationId": "org_123",
  "createdById": "user_123"
}
valid
boolean
Whether the supplied API key is active and accepted.
organizationId
string
Organization associated with the API key.
createdById
string | null
User that created the API key, when available.

Error Responses

Invalid or disabled keys return 401:
{
  "valid": false,
  "error": "Invalid credentials"
}
Malformed validation requests return 400. Server-side validation failures return 500.