Skip to Content
API ReferenceOperation Permissions

Operation Permissions

Every permission an operation may declare. An operation’s grants are what its endpoint may do when it calls back into Foir: the token the operation is called with carries them.

A permission is written <resource>:<verb>. A reach after the verb says whose rows it is for. With none, a permission about records or files is for the operation’s own: the project’s, or those of the user a run acts for. .named is the ones the operation names, and .all is every owner’s in the project. A model after a second colon is the model a record permission is for. Reading and writing records may name one field of a model, as <model>.<field> (records:write:order.status): that is how a field the model guards is given, and a grant on the model alone does not reach it. See Guarded fields.

Each permission stands for itself. Changing a record and creating one are two permissions, so an operation that does both declares both.

The platform refuses any permission that is not on this list, and says why. An operation holds no wildcard: it names each permission it declares.

What an operation may declare

An app’s manifest declares from part of this list, marked in the last column. Whoever installs the app is shown that list and approves it.

PermissionWhat it doesIn an app’s manifest
appconfig:readRead the configuration of the app an operation belongs to.Yes
appsecrets:deleteDelete an app’s secrets.Yes
appsecrets:listList the names of an app’s secrets.Yes
appsecrets:putSet and rotate an app’s secrets.Yes
appsecrets:readRead an app’s secrets.Yes
embeddings:readSearch records by meaning, and read a record’s embeddings.No
embeddings:writeWrite and delete a record’s embeddings.No
files:deleteDelete and restore files.Yes
files:delete.allDelete and restore files. For every one in the project.Yes
files:readRead and list files.Yes
files:read.allRead and list files. For every one in the project.Yes
files:writeUpload files and edit their details.Yes
files:write.allUpload files and edit their details. For every one in the project.Yes
identities:deleteRemove an identity an app names at its own system, and the account when nothing else is theirs.Yes
identities:readFind which user holds an identity at an app’s own system.Yes
notifications:consentSet the notification preference of a user the caller names, in a category the project makes opt-in.Yes
notifications:readRead notifications and notification preferences.Yes
notifications:write.namedSend notifications, register devices, and set preferences. For the ones the operation names.Yes
operations:completeReport an execution’s progress and its result.Yes
organizations:createCreate an organisation, with its first member and what it is provisioned with.Yes
organizations:deleteSchedule an organisation’s deletion, with everything beneath it. It is removed when the retention window closes, unless it is resumed first.Yes
project:standAct as the project: reach the project’s own records, files and notes, the ones no person owns.Yes
records:attributeName the user a record belongs to when it is created, and hand it to another owner later.No
records:attribute:<model>Name the user a record belongs to when it is created, and hand it to another owner later. For the one model it names.Yes
records:create:<model>Create records. For the one model it names.Yes
records:delete.all:<model>Delete records. For every one in the project. For the one model it names.Yes
records:delete:<model>Delete records. For the one model it names.Yes
records:publish.all:<model>Publish and unpublish record versions. For every one in the project. For the one model it names.Yes
records:publish:<model>Publish and unpublish record versions. For the one model it names.Yes
records:read.all:<model>Read records. For every one in the project. For the one model it names.Yes
records:read:<model>Read records. For the one model it names.Yes
records:write.all:<model>Change records: update, duplicate, revert, and share them. For every one in the project. For the one model it names.Yes
records:write:<model>Change records: update, duplicate, revert, and share them. For the one model it names.Yes
secrets:readRead the project’s secrets.No
status:writeReport an app’s status from an execution.Yes
targeting:debugExplain why a variant was chosen for a request.No
users:createCreate a user.Yes
users:read.allRead users’ accounts. For every one in the project.Yes
users:read.namedRead users’ accounts. For the ones the operation names.Yes
usersecrets:deleteDelete a user’s secret.No
usersecrets:listList a user’s secrets.No
usersecrets:putStore a user’s secret.No
usersecrets:readRead a user’s secrets.No

What a token carries that no operation declared

The token an operation is called with carries what the operation declares and nothing else. An operation that reads a secret declares the read: appsecrets:read for an operation an app or a config owns, which reads that owner’s secrets and no other’s, and secrets:read for one the project owns.

Two tokens carry one thing more:

  • A token for a run’s callback carries operations:complete, for that run alone.
  • The token an app’s inbound webhook is forwarded with carries what the app’s operations declare between them, and appsecrets:read. The app verifies a delivery with a secret of its own, so an app that receives webhooks reads its own secrets.

Who may give an operation a grant

Nobody gives an operation what they do not hold themselves. Whoever writes a grant onto an operation holds it: by the operation’s own verbs, by a push, and where an app is installed, updated or mapped to a model. An edit is asked for what it adds. operations:complete and status:write are not asked for, because only a run holds them.

Last updated on