Create an API key
You need theapi_keys:write permission (workspace owner or admin). Members can view keys but cannot create them.
1
Open the web app
Sign in at program.questra.ai (or program.staging.questra.ai for staging).
2
Go to API keys
Open Settings → API keys.
3
Create a key
Click Create key. Give it a name you will recognize later (for example
Production backend).4
Choose scopes
Pick the permissions this key should have.
* grants full Program API access for the workspace. For a read-only integration, surveys:read and meta:read are enough to list surveys and call GET /v1/whoami.5
Copy the secret
The full key is shown once, prefixed
qpk_live_. Store it in a secret manager or environment variable. List and get responses only include a key_hint (last four characters).POST /v1/api_keys if you already have a key (or a session) that includes api_keys:write. The create response includes data.key once — same as the dashboard.
Use the key
Pass the secret in theAuthorization header on every request.
GET /v1/whoami returns the key’s workspace and auth_method: "api_key":
Base URLs
All documented endpoints live under
/v1. Health (GET /health) is unauthenticated and sits outside /v1.
Scopes
Each key stores an explicit list of scopes. The API checks them before the handler runs.resource:write also satisfies resource:read. * satisfies every permission.
Create requests require a non-empty
scopes array — there is no implicit full-access default unless you pass *.
Manage keys
From Settings → API keys, or the API keys resource:- Disable —
PATCH /v1/api_keys/{apiKeyId}with{ "enabled": false }. The key stops working without deleting the record. - Rotate —
POST /v1/api_keys/{apiKeyId}/rotateissues a newqpk_live_…secret and invalidates the old one. Scopes stay the same. Copy the new secret immediately. - Delete —
DELETE /v1/api_keys/{apiKeyId}revokes the key permanently.
expires_at on create or update sets an expiry. Omit or null for a key that does not expire.