younifyd
Menu

Add Organization Role Assignment

Give an organization member a role

PUT/organizations/{organizationId}/acl/{sanityUserId}

Use it in a workflow

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

Request

Path parameters

organizationIdstringrequired

The ID of the organization

sanityUserIdstringrequired

The Sanity user ID, which starts with `g`

Request body

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

roleNamestringrequired

The name of the role to assign

deleteExistingRolesboolean

Remove the member's other roles in the organization

Default false

json
{
  "roleName": "administrator",
  "deleteExistingRoles": false
}

Response

Returns 200 with a any. Read it in later steps with {{addOrganizationRoleAssignment.response.data.<field>}}.

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