> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Change a workspace member's role

> Change a workspace member's role with PATCH /v2/workspaces/members to view, manager, maintain or admin. It applies at once; only the owner can call it.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Requires an API key with the `workspaces:manage` [scope](/en/api-reference/authentication#scopes).

Changes the role of an existing workspace member, taking effect immediately on their access to the workspace's shared applications. The four roles are `view`, `manager`, `maintain` and `admin`: the [roles table](/en/api-reference/endpoint/workspace/members/invite#roles) shows what each one allows and its name in the dashboard.

Only the workspace owner can call this endpoint, and the owner cannot change their own role since they always hold full access. To add a new member instead of changing an existing one, see [Invite Member](/en/api-reference/endpoint/workspace/members/invite). Rate limited to 3 edits per 15 seconds per user.

## Parameters

<ParamField body="workspaceId" type="string" placeholder="Workspace Id" required>
  The ID of the workspace.
</ParamField>

<ParamField body="memberId" type="string" placeholder="Member ID" required>
  The member ID.
</ParamField>

<ParamField body="group" type="string" placeholder="Permission name" required>
  The new role: `view`, `manager`, `maintain` or `admin`. See [Roles](/en/api-reference/endpoint/workspace/members/invite#roles).
</ParamField>

## Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful: `success` if it was, `error` if not.
</ResponseField>

<ResponseExample>
  ```json theme={"system"}
  {
    "status": "success"
  }
  ```
</ResponseExample>

## Common errors

| Code | HTTP | Meaning |
| - | - | - |
| `INVALID_ID` | 400 | `workspaceId` is missing. |
| `MEMBER_NOT_FOUND` | 400 | `memberId` is missing or does not belong to the workspace. |
| `MEMBER_NOT_FOUND` | 404 | The member is no longer in the workspace (already removed). |
| `CANNOT_EDIT_OWNER` | 400 | The caller tried to change their own role. |
| `INVALID_GROUP` | 400 | `group` is not one of `view`, `manager`, `maintain`, `admin`. |
| `WORKSPACE_NOT_FOUND` | 404 | The workspace does not exist. |

## Related

* CLI: [`squarecloud workspace member update`](/en/cli-reference/workspace-members#squarecloud-workspace-member-update)
* SDKs: [`api.workspaces.members.update()`](/en/sdks/js/workspaces) (JavaScript), [`client.workspaces.members.update()`](/en/sdks/py/workspaces) (Python), [`c.Workspaces.Members.Update()`](/en/sdks/go/workspaces) (Go)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.