Qeet Docs
Platform

API keys & service principals

Scoped, expirable, hashed API keys for backend access, and service principals for OAuth client_credentials.

Machine identities come in two shapes. Use whichever fits your call pattern.

API keys

An API key (qk_…) authenticates your backend to the Qeet ID API. Keys are hashed at rest, can be scoped and expirable, and are sent as:

HTTP
Authorization: ApiKey qk_…
POST/v1/api-keysCreate an API key (secret shown once)
GET/v1/api-keysList API keys
DELETE/v1/api-keys/{id}Revoke an API key
GET/v1/tenants/{tenantID}/api-keysList a tenant's API keys
Bash
curl -X POST https://api.qeetid.com/v1/api-keys \
  -H "Authorization: Bearer $QEETID_ADMIN_TOKEN" \
  -d '{"name":"backend"}'
# → { "id": "…", "key": "qk_…" }   ← shown once

Server-only, shown once

The full qk_… value is returned only at creation — store it in a secret manager immediately. Never ship an API key to a browser; for client apps use the hosted-login flow (@qeetid/nextjs).

ApiKey, not Bearer

API keys use the ApiKey scheme. The Bearer scheme on the same routes is for user/service JWTs. Don't mix them.

Service principals

A service principal is an OAuth client for M2M access via client_credentials. Use it when a machine needs a standard OAuth access token (e.g. to call your own resource servers), rather than direct Qeet ID API access.

POST/v1/service-principalsCreate a service principal
POST/v1/oauth/tokenGet a client_credentials token

See OIDC → Machine-to-machine for the full flow.

Which should I use?

NeedUse
Backend calling the Qeet ID APIAPI key (ApiKey qk_…)
Machine client needing an OAuth access tokenService principal (client_credentials)
Per-user backend callthe user's access token (Bearer <jwt>)

On this page