Authentication
All API requests must be authenticated using an API key. API keys provide stateless, scoped authentication for programmatic access.Key format
Keys use 256-bit entropy (64 hex characters after the prefix).
Passing your API key
You can authenticate using either method: Option 1: X-API-Key header (recommended)When both
X-API-Key and Authorization: Bearer nl_* are present, the X-API-Key header takes precedence.Key security
- The full key is shown only once at creation. Naturalead stores only a SHA-256 hash.
- Keys are scoped to a single account (organization).
- Each key has a
keyHint(last 4 characters) for identification in the dashboard. - Keys can be set to expire at a specific date.
Creating API keys
Create keys via the dashboard (Settings > API Keys) or programmatically:Key lifecycle
Scopes and Permissions
API keys are scoped to specific permissions. A key can only perform actions matching its scopes.Available scopes
When creating an API key, you can only grant scopes that your own role has permission for. This prevents privilege escalation.