Menu
Replace Roles For User
Replace the role set for a user.
PUT
/v2025-07-11/access/{resourceType}/{resourceId}/users/{sanityUserId}/rolesUse it in a workflow
- Add a step and choose the Sanity connector.
- Pick the Replace Roles For User action (under Access).
- Fill in the fields below, then reference the result from later steps as
{{replaceRolesForUser.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"roleNames": [
"string"
]
}
Response
Returns 200 with a any. Read it in later steps with {{replaceRolesForUser.response.data.<field>}}.
Need more? See the Sanity guide for connection setup and behaviour shared by every action.
Was this page helpful?