younifyd
Menu

Delete Organization Grant

Remove an organization grant

DELETE/organizations/{organizationId}/grants

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Delete Organization Grant action (under Roles).
  3. Fill in the fields below, then reference the result from later steps as {{deleteOrganizationGrant.response.data}}.

Request

Path parameters

organizationIdstringrequired

The ID of the organization

Request body

Enter the body as JSON in the step's Body field.

roleNamestringrequired

The name of a custom role

permissionNamestringrequired

The name of a permission defined by the permission resource's schema

permissionResourceIdstring

The ID of the permission resource. Send this or `permissionResourceName`, not both.

permissionResourceNamestring

The name of the permission resource. Send this or `permissionResourceId`, not both.

paramsobject

Parameters for the permission, as defined by the permission resource schema. For example, `mode`, `dataset`, or `tagName`. On project grants, you can't set both `dataset` and `tagName`; organization grants ignore `dataset` and `tagName`.

Default {}

json
{
  "roleName": "translator",
  "permissionName": "read",
  "permissionResourceId": "res-k2d8fj3a",
  "permissionResourceName": "articles",
  "params": {}
}

Response

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

deletedGrantsinteger

The number of grants removed

json
{
  "deletedGrants": 0
}

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