Menu
Update Role
Update a role
PUT
/projects/{projectId}/roles/{roleName}Use it in a workflow
- Add a step and choose the Sanity connector.
- Pick the Update Role action (under Roles).
- Fill in the fields below, then reference the result from later steps as
{{updateRole.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"title": "Translator",
"description": "Edit translated documents",
"appliesToUsers": true,
"appliesToRobots": false
}
Response
Returns 200 with an object. Read it in later steps with {{updateRole.response.data.<field>}}.
{
"name": "administrator",
"title": "Administrator",
"description": "Read and write access to all datasets, with full access to all project settings.",
"isCustom": false,
"projectId": "3do82whm",
"appliesToUsers": true,
"appliesToRobots": false,
"grants": {}
}
Need more? See the Sanity guide for connection setup and behaviour shared by every action.
Was this page helpful?