Skip to main content
Version: 2.0.0

Auto-populate Actions

Often, when creating a new resource, you want to set default actions that can be performed on that resource. The actions names can be custom, and not with the default CRUD naming that come configured within Permit.

Configuring custom default actions

Here is the endpoint you need to call:

For this endpoint, you can refer to this guide to fetch your project and environment id's, and this guide to get your API key.

As part of this request, you will need to pass in an object, defining your custom actions that you want populated for any new resource.

"settings": {
"default_resource_actions": ["read", "write", "allow-review"]

Please remember that any changes you are making are per environment, not the whole project, or workspace.

The cURL request

curl --location --request PATCH '' \
--header 'authority:' \
--header 'authorization: Bearer permit_env_api_key' \
--header 'origin:' \
--header 'Content-Type: application/json' \
--data-raw '{"settings":{"default_resource_actions":["read","write"]}}'