For programmatic access, always use a workspace API key.
API keys are regional. Use
https://api.ontora.com for a key created on
app.ontora.com, or https://api.eu.ontora.com for a key created on
eu.ontora.com. The examples below show the US host.Keys carry capability scopes:
read for inspecting and exporting interview data,
write for creating and launching campaigns. Protected individual responses are a separate exception and
require an exact campaign-bound scope. Vault retrieval keys are separate advanced keys that only
work with POST /v1/retrieval and POST /v1/retrieval/answer for one selected context vault.Creating a key
API keys are scoped to a single workspace. Create and revoke them under Developer → API Keys in the dashboard, or via the API:Scopes
Scopes describe what a key may do, not which endpoints it may call. Pick the minimum required.
Reads (GET endpoints plus purely computational POSTs like graph queries and aggregates) require
read;
anything that mutates state or triggers sends requires write. A key without the needed capability
receives 403 Forbidden with a message naming the missing scope.
Legacy scopes. Keys created before the capability model carry
interviews, exports, webhooks,
or mcp scopes. They keep exactly the access they always had — nothing to migrate. They never grant
protected individual-response access.Confidential analysis keys
Only a current workspaceadmin can create this exceptional key. In Developer → API Keys, choose
Confidential analysis, select one owned campaign, and choose an expiry. The dashboard defaults to 7 days;
the maximum is 30 days. The resulting scope bundle is exactly:
read + write), wildcard, or legacy key cannot substitute for
that exact campaign grant. A Confidential analysis key contains read plus one protected-corpus scope;
it cannot include write, *, another campaign, a legacy scope, or any other extra scope.
Confidential keys issued before this combined bundle may carry only the campaign scope. They remain
corpus-only for compatibility. Reissue the key from the dashboard when one API, CLI, or MCP
connection should also use ordinary read tools.
Revoking a key
Revocation propagates within about a minute (successful verifications are cached briefly).Rotating keys
Best practice: keep two keys live during a rotation, swap consumers over to the new key, then revoke the old.- Create a new key with the same scopes.
- Update consumers (CI secrets, CLI config, MCP clients).
- Revoke the old key once traffic has shifted.