Skip to main content
All API requests require a Bearer token in the Authorization header.
curl https://api.open.cx/contacts \
  -H "Authorization: Bearer YOUR_API_KEY"

Generate an API key

  1. Go to Settings → Access in the OpenCX dashboard.
  2. Click Create API Key.
  3. Give it a name (e.g. “Production”, “Staging”) and copy the key.
The full key is only shown once. Store it securely — if you lose it, generate a new one.

Using the key

Pass the key as a Bearer token in the Authorization header on every request:
Authorization: Bearer ocx_live_abc123...
curl -X GET https://api.open.cx/contacts \
  -H "Authorization: Bearer YOUR_API_KEY"

Error responses

StatusMeaning
401 UnauthorizedMissing or invalid API key
403 ForbiddenKey is valid but doesn’t have access to this resource
{
  "statusCode": 401,
  "message": "Unauthorized",
  "error": "Unauthorized"
}

Best practices

  • Never commit keys to source control. Use environment variables or a secrets manager.
  • Rotate keys periodically. You can create multiple keys and revoke old ones from the dashboard.
  • Use separate keys for each environment (production, staging, development) so revoking one doesn’t break the others.