API keys
API keys authenticate server-to-server integrations. This page covers requesting access, generating a key, the one-time raw-key reveal, and revoking a key — all organization-admin actions.
What API keys are for
An API key lets your own systems — a booking engine, a PMS, a checkout — call TaxLens directly, authenticating with the X-API-Key header instead of a logged-in session. A key is bound to one organization and stays bound to it even if the person who created it later switches organizations.
Access is enabled during onboarding
API access is switched on per organization, manually, during onboarding — so we can confirm your integration pattern and expected volume first. Until it's enabled, the create-key form is replaced by a Request API access card with a contact link; the keys table is empty.
Generating a key
- 1Confirm the active organizationThe key belongs to whichever organization is active in the switcher. Make sure it's the right one before you create the key.
- 2Name the keyIn Create New Key, give it a descriptive name (for example “Production Integration”) so you can tell keys apart later.
- 3CreateClick Create Key. The raw key appears once — see the next section.
The raw key is shown once
On creation, the full secret key is revealed in a highlighted panel with a copy button and the warning: “Copy this key now. You won't be able to see it again.” TaxLens stores only a hash — after you dismiss the panel, the raw value is gone for good. The keys table afterward shows only a short prefix for identification.
# Authenticate with the X-API-Key header
curl https://api.taxlens.getdynamiq.ai/v1/tax/calculate \
-H "X-API-Key: $TAXLENS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "jurisdiction_code": "ES-CT-BCN", "stay_date": "2026-07-01",
"nights": 3, "nightly_rate": 200, "currency": "EUR" }'Revoking a key
Each active key in the table has a revoke action. Revoking is immediate and permanent: any integration using that key stops authenticating at once. There's no un-revoke — generate a fresh key if you need to rotate.
- 1Find the keyLocate the key in the table by name or prefix. The table also shows when each key was created and last used, which helps spot stale keys.
- 2Revoke and confirmClick the revoke (trash) icon and confirm. The key's status flips to revoked and it stops working immediately.
For the request shape, error model, and idempotency rules your integration will use, see Authentication and Errors & idempotency.