Authentication
How QueryDeck API keys work, what they can read, and how MCP connections sign in with OAuth instead.
API keys (REST API and SDK)
Send your key as a bearer token on every request:
Authorization: Bearer qd_live_…- Owned by an organisation. A key reads that organisation's data, not a person's. Owners and admins create, edit and revoke keys under Developers → API keys.
- Shown once. QueryDeck stores only a hash. If you lose a key, revoke it and create a new one.
- Read-only. The only scope today is
read. - Optional expiry. Keys can expire after 30 or 90 days, or never.
- Scoped access. Each key picks the data sets and properties it may read. Turning on All properties includes properties connected later.
What a key can actually read
A request can read what both the organisation's data access settings and the key allow. The organisation's settings are checked on every request, so tightening them takes effect on existing keys immediately, without rotating them.
| Situation | Response |
|---|---|
No Authorization header | 401 API key required |
| Unknown, revoked or expired key | 401 Invalid or revoked API key |
| Key not enabled for the REST API | 403 |
| Data set not shared with the key | 403 Data set … is not shared with this key |
| Property not shared with the key | 404 Property not found |
Keep keys server-side
Never ship a key in browser code or a mobile app. Anyone who has it can read what it allows until you revoke it.
OAuth (MCP)
MCP clients don't use API keys. When you add QueryDeck to an AI app, it opens a
QueryDeck sign-in and consent screen. You choose which organisations the app
may read, and QueryDeck issues the app its own read-only token (scope
mcp:read). See Connect a client.