Skip to main content
Every request carries an API key as a bearer token:
A request runs as the person who created the key. It sees and changes only what that person can in the app, whatever scopes the key carries. Scopes narrow what a key may do. They never widen what its person may do.

Create a scoped key

  1. Open API Keys. In the app, click the VectorShift logo in the top-left corner, click Profile, then the API Keys tab.
  2. Click + and name the key.
  3. Under Object model access, pick a preset or tick the scopes the integration needs. Choosing a preset ticks its scopes, and you can still change them afterward.
  4. Under Expires, choose Never, 30 days, 90 days or 1 year.
Copy the key when it is shown. The API Keys table shows each key’s access, its expiry and when it was last used (to within ten minutes). Every ontology scope name begins with object_model:, as in object_model:records:read. The tables on this page leave the prefix out. users:read belongs to the platform rather than the ontology, so it has no prefix.

Scopes

Each endpoint page lists the scopes it needs. When it lists more than one entry, any one of them will do. A few routes combine scopes:
  • Discovery. GET / and GET /schema take any read scope (records:read, facts:read or model:read) or actions:run. They answer only the parts of the schema the key’s scopes cover.
  • Actions and scenarios. GET /actions takes actions:run or model:read. GET /worlds takes facts:read or model:read.
  • Decisions. GET /decisions/{decision_id} takes actions:run or model:configure, and answers only the person who raised the decision and the people who may decide it.
  • Imports. Running an import needs both records:write and facts:write. Its template takes either one.
  • The change feed needs changes:read plus a read scope for each stream it reports. With records:read it reports record changes, and with facts:read it reports fact changes.
  • Figures over a record selection. A figure query whose subjects are chosen by a record filter (context.records) also needs records:read. Choosing records by a filter, and learning how many match, is record access. With facts:read alone, name the subjects by id.
A key without a route’s scope gets 403 scope_required, and the message names the scope it needs.

Keys without scopes

Keys created without scopes, including every key made before scopes existed, keep their access to the rest of the VectorShift API. They cannot use the ontology routes, which answer them with 403 scope_required. They can still use the older generic endpoint, which marks every answer to them with a Deprecation header. A scoped key works only under /v1/object-model, and at GET /v1/users when it has users:read. The rest of the VectorShift API refuses it, so a key you give an integration reaches nothing beyond the ontology and the people lookup.

Expiry and revocation

An expired key gets 401 unauthenticated. Deleting a key on the API Keys page revokes it at once.