younifyd
Menu

Update Permission

Update a permission

PUT/v2025-07-11/access/{resourceType}/{resourceId}/permissions/{permissionName}

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Update Permission action (under Access).
  3. Fill in the fields below, then reference the result from later steps as {{updatePermission.response.data}}.

Request

Path parameters

resourceTypestringrequired

The resource type to scope the access requests to.

One oforganizationprojectmedia-librarycanvasdashboardviewknowledge-base

resourceIdstringrequired

The resource ID to scope the access request to. Must be a valid ID for the resource type.

permissionNamestringrequired

The name of the permission. This is a unique identifier for the permission.

Response

Returns 200 with an object. Read it in later steps with {{updatePermission.response.data.<field>}}.

typestring

The resource for the permission.

One ofsanity.blueprintssanity.canvassanity.canvas.commentsanity.canvas.documentsanity.canvas.supportsanity.context.mcpsanity.dashboard.configuration.mesanity.dashboard.configuration.organizationsanity.dashboard.favoritessanity.dashboard.historysanity.dashboard.intentssanity.dashboard.statesanity.document.filtersanity.document.filter.modesanity.knowledge-basesanity.knowledge-base.entriessanity.knowledge-base.issuessanity.knowledge-base.instructionssanity.media-librarysanity.media-library.aspectssanity.media-library.asset-instancessanity.media-library.asset-managementsanity.media-library.assetssanity.media-library.memberssanity.media-library.signed-urlsanity.media-library.hierarchysanity.media-library.rolessanity.media-library.document.filtersanity.organizationsanity.organization.legalsanity.organization.memberssanity.organization.notification-settingssanity.organization.sessionssanity.organization.projectssanity.organization.rolessanity.organization.ssosanity.organization.tokenssanity.organization.user-attributessanity.organization.viewssanity.project

actionsoneOf

The actions allowed by the permission for this role.

namestring

The name of the permission. This is the unique identifier for the resource.

titlestring

The human-readable title of the permission.

descriptionstring

The description of the permission.

resourceTypestring

The resource the permission applies to.

resourceIdstring

The resource ID the permission applies to.

ownerOrganizationIdstring

The organization ID the permission applies to. Used for wildcard permissions where the resourceId is `*`.

isCustomboolean

Whether the permission is a custom (user-created) permission or a system-provided one.

paramsobject

The parameters for the permission. This is a key-value map of the permission's configuration.

json
{
  "type": "sanity.document.filter.mode",
  "name": "legal-documents",
  "title": "Permission for \"Legal\" Folder",
  "resourceType": "project",
  "resourceId": "c7ja4siy",
  "actions": [
    "mode"
  ],
  "description": "Permission for \"Legal\" Folder",
  "ownerOrganizationId": "or0Bc1hcJ",
  "isCustom": false,
  "params": {
    "filter": "*[_type == \"legal\"]"
  }
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.