X-API-KEY header.
How it works
- An Admin generates an API key from the DualEntry dashboard and assigns it one or more roles
- Include the API key in the
X-API-KEYheader with every request - The API validates the key, binds the request to that key’s organization, and authorizes each endpoint against the key’s roles
Base URLs and versions
A key authenticates only against the environment it was created in. Production keys do not work against development, and the reverse is also true.
Three mounts are served under each host:
The same key works against every mount. Choosing a version is a URL decision, not a credential one, so moving an integration from V1 to V2 needs no new key and no change to the header.
The environment is also recorded in the key itself, in the prefix described below, which is the quickest way to confirm that a config file is pointing a production key at production.
Getting an API key
An Admin in your organization issues keys from Settings → Organization → Developer access → API Keys. Only the Admin role can reach that tab. See How to Give an Integration Access to DualEntry for the procedure, or send that page to whoever holds the role. A key carries its own roles, assigned when it is created. It is not tied to the user who created it and does not inherit that user’s permissions or entity scoping, and it reaches every company in the organization. An Admin can change a key’s roles later without invalidating the secret, so a key that turns out to be too narrow does not require a redeploy. Once you receive your key, store it securely in your application. The key is shown only once at creation time and cannot be retrieved later.Key format and statuses
After creation, a key is only ever shown masked: the prefix, four asterisks, and the last four characters of the secret.org_{environment}_{4 hex characters}, where environment is one of production, dev, test, or local. That segment is the reliable way to tell which environment a key belongs to when two are side by side in a config file.
A key holds one of two statuses:
Revocation is immediate and one-way. A revoked key cannot be reactivated, and its name stays reserved, so a replacement needs a different one. Keys do not expire on their own; an Active key stays valid until someone revokes it.
For the columns shown in the API Keys table, see Organization settings.
Authentication errors
Both failure modes return403. The status code does not distinguish them; the error message does.
Error response:
Access denied on every permission-guarded endpoint.
A revoked key is indistinguishable from an unknown one in the response; both read API key authentication failed. Requests refused for exceeding a quota return 429 instead, which is covered in Rate limiting.
Best practices
- Store API keys in environment variables or secret management services
- Use separate API keys for development and production environments. A key only authenticates against the environment it was created in
- Issue one key per integration, so revoking one never takes down another
- Assign the narrowest roles the integration needs. A key holding Admin bypasses permission checks entirely, and nothing in the key table records what it was meant to do
- Rotate keys regularly for enhanced security
- Never commit API keys to version control
Next steps
- How to Give an Integration Access to DualEntry for issuing and scoping a key
- How to Authenticate Your Requests to the DualEntry API for a working first call
- How to Replace an API Key for rotation and leaked keys
- Rate limiting

