# assign_member_role

Source: https://modulify.ai/docs/api/workspaces/assign-member-role

Puts an existing member on a different role, which changes what they can do across the whole workspace.

- Title: Change what someone can do
- Scope: `members:write`
- Access: Makes changes
- Endpoint: `POST /v1/assign_member_role`

It needs the **Manage roles** permission (`roles.manage`), and managing roles at all needs the workspace on Pro or Enterprise, otherwise it is refused with `You must upgrade to the Pro plan to manage roles!` The new role applies straight away.

The owner role cannot be given out and the owner's own role cannot be changed, so ownership never moves this way. A custom role's id comes back from `create_workspace_role`, and `list_workspace_members` shows it as the `Role` of everyone who holds it. See [Members and roles](https://modulify.ai/docs/reference/members-and-roles#change-someones-role).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/assign_member_role`, 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/assign_member_role \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"WORKSPACE_ID","memberId":"MEMBER_ID","role":"ROLE"}'
```

Over MCP, the same method is the [assign_member_role tool](https://modulify.ai/docs/mcp/workspaces/assign-member-role).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace id. |
| `memberId` | string | Yes | The member id, from `list_workspace_members`. |
| `role` | string | Yes | The role to put them on: a custom role's id, or `member` for the stock Member role. `owner` is refused. |

## 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.