Create API Key
API Keys
Create API Key
Mint a new API key. The plaintext secret is returned only on this response.
POST
Create API Key
Request
Headers
Strongly recommended. Same key returns the original result (including the plaintext secret) within 24 hours.
Body Parameters
Human-readable key name. 1 - 120 characters.
Array of scope strings. At least one is required. Examples:
read:contacts, write:contacts, read:deals, write:deals, write:email, write:ai, admin:api_keys, admin:webhooks.Optional description explaining the intended use of the key.
Optional override:
standard (default), high, or unmetered. unmetered is only available on enterprise plans.Optional ISO 8601 expiry timestamp. After this time, requests with the key return
401 invalid_key.Response
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
Example Response
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing required fields or unknown permission scope |
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing admin:api_keys permission |
| 409 | duplicate_name | Key name already in use (active keys only) |
| 429 | rate_limited | Rate limit exceeded |