Encrata API keys
API keys are secret credentials used to authenticate your requests. They are unique to your account and must be kept confidential. Every key starts withenc_.
You need at least one key to call the Encrata API from code, the CLI, or an AI tool.
Create an API key
Choose the method that fits your workflow.- Dashboard
- Encrata API
- CLI
1
Sign in to the Encrata dashboard
Open the Encrata dashboard.
2
Open the API Keys page
3
Click Create API key
4
Name your key
Choose a name that identifies where the key is used, for example
production-backend.5
Copy and store the key
Copy the
enc_ key and store it in a secret manager before closing the
dialog.Revealable keys can be read again with
GET /api/account/keys/reveal. Access is
limited by workspace permissions.Use the API key in your code
Authenticate every request by sending your key as a Bearer credential in theAuthorization header.
1
Store the key as an environment variable
Keep the key out of your source code. In a Node.js project, store it in a
.env file at the project root:.env
2
Send the key in the Authorization header
Read the key from the environment and pass it on every call:
Key behavior
Set a credit limit
Every key can carry a credit limit: a cap on how many credits it is allowed to spend. A key with no limit can spend your full account balance, so a leaked or runaway key drains everything. A capped key stops at its ceiling instead, which contains the damage. Set a cap withPOST /api/account/keys/limit:
Send
credit_limit: null to remove the cap. Setting a limit requires a
non-readonly role in the active workspace. The maximum value is
2147483647.Manage your keys
Inspect, rename, pause, and retire keys from the dashboard or the API. A workspace admin can manage other members’ keys in the same workspace.List keys
See every key with its usage, limit, and last-used time.
Rename a key
Update a key’s display name.
Enable or disable
Temporarily turn a key off without deleting it.
Revoke or delete
Permanently delete a leaked key or soft-disable an unused key.
Handle common errors
Email API errors use this shape:Do not retry
400 or 401 responses unchanged. Correct the request or credential first. Retries are appropriate for 429 and 5xx responses.Next steps
Quickstart
Make your first lookup in under two minutes.
All endpoints
Browse every lookup with request and response schemas.