Create a scoped key
- Open API Keys. In the app, click the VectorShift logo in the top-left corner, click Profile, then the API Keys tab.
- Click + and name the key.
- 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.
- Under Expires, choose Never, 30 days, 90 days or 1 year.
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 /andGET /schematake any read scope (records:read,facts:readormodel:read) oractions:run. They answer only the parts of the schema the key’s scopes cover. - Actions and scenarios.
GET /actionstakesactions:runormodel:read.GET /worldstakesfacts:readormodel:read. - Decisions.
GET /decisions/{decision_id}takesactions:runormodel:configure, and answers only the person who raised the decision and the people who may decide it. - Imports. Running an import needs both
records:writeandfacts:write. Its template takes either one. - The change feed needs
changes:readplus a read scope for each stream it reports. Withrecords:readit reports record changes, and withfacts:readit reports fact changes. - Figures over a record selection. A figure query whose subjects are chosen by a record filter (
context.records) also needsrecords:read. Choosing records by a filter, and learning how many match, is record access. Withfacts:readalone, name the subjects by id.
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 with403 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 gets401 unauthenticated. Deleting a key on the API Keys page revokes it at once.