Skip to content

Authentication

Every request to the API carries an API key as a Bearer token.

Keys

A store admin creates keys in the Octane AI dashboard under Developer > API keys (see the Keys tab). A key starts with oct_live_; it is shown once, when it is created, and never again. The dashboard keeps only the readable head and the last four characters, so copy it right away. If you lose it, revoke it and create a new one.

Send it in the Authorization header:

Authorization: Bearer oct_live_...

The samples on this site read the key from the OCTANE_API_KEY environment variable; the Python ones use httpx (pip install httpx), the TypeScript ones fetch, the Go ones net/http:

Terminal window
curl https://api.octaneai.com/v1/store \
-H "Authorization: Bearer $OCTANE_API_KEY"

A key is always minted under the admin who is signed in; quiz versions and publishes made with it are recorded under that admin’s account.

Scopes

A key carries the permissions ticked when it was created (a key minted without an explicit choice is read-only: quizzes:read and analytics:read). The dashboard names them in plain words; the API calls them scopes:

Dashboard permissionScopeWhat it allows
Read quizzesquizzes:readList quizzes and their saved versions
Edit quizzesquizzes:writeArchive, unarchive and soft-delete a quiz; save the draft as a version
Publish quizzesquizzes:publishPublish a saved version
Read analyticsanalytics:readEvery analytics route; the quiz_analytics export
Read peopleprofiles:readThe permission that exposes personal data. Emails, phone numbers and names on people (GET /v1/profiles, POST /v1/profiles/search, GET /v1/profiles/{profile_id}), on the profiles and responses exports, and on webhook endpoints created with include_pii: true. Give it only to integrations that need to know who a person is.
Manage webhookswebhooks:manageCreate, edit, delete and redeliver webhook endpoints; the event feed

A route that needs a scope the key lacks answers 403 insufficient_scope and names the missing scope in the required field of the error body:

{
"type": "https://api.octaneai.com/errors/insufficient_scope",
"title": "insufficient_scope",
"detail": "The API key does not carry the scope this route needs",
"status": 403,
"request_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"required": ["profiles:read"]
}

Each operation in the API Reference states the scope it needs. GET /v1/store and GET /v1/exports work with any key.

Expiry

A key may carry an expiry chosen when it is created. An expired key answers 401 invalid_api_key with WWW-Authenticate: Bearer, the same as a missing, malformed or revoked key.

Revoking and rotating

Revoking a key in the dashboard takes effect within two minutes. To rotate, create the new key first, switch your integration to it, then revoke the old one. Disconnecting the store from Octane AI revokes every key and deletes every webhook endpoint.