API Keys
Data API keys (dk_ keys) let you connect external tools to your Querri data — BI tools, automation platforms, custom scripts, partner integrations — through a governed, auditable channel.
Why API keys matter
Section titled “Why API keys matter”Without API keys, people share data through shadow channels: emailed CSVs, shared credentials, screenshots on Slack. All of these are unauditable, unrevocable, and frozen at export time.
dk_ keys are strictly better than every real-world alternative:
- Auditable — you can see who created a key, when it was last used, and what it accessed
- Revocable — instant deactivation, no chasing down copies of a CSV
- Scoped — a key can only access what you specify
- Live — queries always return current data, not a stale export
Creating a key
Section titled “Creating a key”- Go to Settings > Security > API Keys
- Click Create API Key
- Configure:
- Name: A descriptive label (e.g., “Production BI Tool”, “Analytics Pipeline”)
- Table scope: All sources or specific sources only
- Rate limit: Requests per minute (default: 60, max: 10,000)
- Click Create
- Copy the key immediately — it’s only shown once
How security works
Section titled “How security works”dk_ keys use a restricted delegation model. A key can never access more than its creator can access.
- If you have access policies that restrict you to Southeast data, any key you create is also restricted to Southeast data
- If your policies change, the key’s effective access changes too — automatically
- No privilege escalation is possible
You can also assign access policies directly to a key, adding further restrictions on top of the creator’s access.
Using a key
Section titled “Using a key”Authenticate API requests with the key as a Bearer token:
# List accessible sourcescurl -H "Authorization: Bearer dk_your_key_here" \ -H "X-Tenant-ID: your_org_id" \ https://app.querri.com/api/data-api/sources
# Get paginated data (access policies applied automatically)curl -H "Authorization: Bearer dk_your_key_here" \ -H "X-Tenant-ID: your_org_id" \ "https://app.querri.com/api/data-api/sources/{source_uuid}/data?page=1&page_size=100"Keys currently support read-only access. Write capabilities are planned for a future release.
Revoking a key
Section titled “Revoking a key”- Go to Settings > Security > API Keys
- Find the key by name or prefix
- Click Revoke
The key is immediately invalidated. Any requests using it will receive an error. Revoked keys remain visible in the list for audit purposes.
Admin controls
Section titled “Admin controls”Key creation is currently restricted to organization admins. Admins can also disable key creation entirely for the organization — see Admin Controls.
Best practices
Section titled “Best practices”- One key per integration — don’t share keys across tools
- Use explicit table scope — limit keys to only the sources they need
- Rotate regularly — create a new key, update your integration, revoke the old one
- Monitor usage — check “Last Used” timestamps and the audit log for unusual activity
- Never commit keys to source control — use environment variables or secrets managers
Next steps
Section titled “Next steps”- Access Policies — The policies that govern what keys can access
- Audit Log — Track key creation, usage, and revocation
- Admin Controls — Disable key creation at the org level