# set_site_member_access

Source: https://modulify.ai/docs/api/sites/set-site-member-access

Gives one workspace member a different role on one site.

- Title: Change what a member can do on a site
- Scope: `members:write`
- Access: Makes changes
- Endpoint: `POST /v1/set_site_member_access`

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](https://modulify.ai/docs/reference/members-and-roles#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](https://modulify.ai/docs/api/idempotency) header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

```bash
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](https://modulify.ai/docs/mcp/sites/set-site-member-access).

## 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](https://modulify.ai/docs/api/requests-and-responses#the-response) 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](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) 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](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.