Change what a member can do on a site

set_site_member_access

Gives one workspace member a different role on one site.

POST /v1/set_site_member_accessScopemembers:writeMakes changes

This is the dropdown on a member's row of Member access in the site's Settings tab. It needs the Manage members permission (members.manage). The change takes effect right away, and anyone affected who has the site open in the editor is reconnected with their new role.

A site role only narrows what the member's workspace role allows and never adds to it. Your own access and the workspace owner's cannot be changed, and the member must already have joined the workspace. See Roles on a single site.

Request

Call it with a POST to https://api.modulify.ai/v1/set_site_member_access, sending the inputs below as a JSON object. The token needs the members:write scope.

It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

curl -X POST https://api.modulify.ai/v1/set_site_member_access \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","memberUserId":"MEMBER_USER_ID","role":"ROLE"}'

Over MCP, the same method is the set_site_member_access tool.

Inputs

Input Type Required Description
projectId string Yes The site id.
memberUserId string Yes The UserId of the member, from list_site_member_access.
role string Yes The site role to give them: editor, content-editor, viewer or no-access.

Response

Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.