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 URL and versions
All requests go tohttps://api.dualentry.com, whether they come from your production organization or a sandbox organization provisioned for testing. A key only ever authenticates against the organization it was issued from, so sandbox and production integrations share the same host: nothing about the request changes except which key you send.
Three mounts are served under this 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.
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_production_ for every customer-issued key, including keys for a sandbox organization. Sandbox and production organizations both run on the same infrastructure, so the prefix doesn’t distinguish them. Use the organization name shown in the API Keys table, not the key prefix, to tell which organization a key belongs to.
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 Developer access.
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 a separate key for a sandbox organization if you have one, so test traffic and production traffic are never authenticated by the same credential
- 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 a key after any suspected exposure, or when its roles no longer match what the integration needs
- 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