Authentication & API Keys
Create, authenticate, and revoke oc_... developer API keys in Omni Chat Stack using X-API-Key or Authorization Bearer headers.
Generate & store a Developer API key
1. Open Settings → Developer API (/settings/developer)
Company Admins can toggle the Developer API enabled and manage keys from the Developer API panel.
2. Generate a named key
Click Generate API Key (POST /api/v1/developer/api-keys with { "name": "Production CRM" }). The raw key starts with oc_ and is shown exactly once—only its keyPrefix and SHA-256 keyHash are saved.
3. Send the key in request headers
Pass the secret on public Developer API calls using either X-API-Key: oc_... or Authorization: Bearer oc_.... Never expose oc_... keys in frontend bundles or client-side code.
Admin key & settings management endpoints
/api/v1/developer/api-keysList all API keys (prefixes, names, active status—never hashes) for the current company.
/api/v1/developer/api-keysCreate a new API key with { "name": "..." }. Returns rawKey once.
/api/v1/developer/api-keys/:keyIdImmediately revoke an API key by setting isActive: false.
Key rotation best practice
Create a replacement key under a new label, deploy it to your server secret manager, verify a test request, and then revoke the old key ID via DELETE /api/v1/developer/api-keys/:keyId.