---
title: Update Workspace Member
url: https://platform.claude.com/docs/en/api/java/organization/workspaces/members/update
---

# Update Workspace Member

`WorkspaceMember organization().workspaces().members().update(params, requestOptions = RequestOptions.none())`

**POST** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`

Update Workspace Member

## Parameters

- `MemberUpdateParams params`

  - `String workspaceId` (path parameter)

    ID of the Workspace.

  - `Optional<String> userId` (path parameter)

    ID of the User.

  - `WorkspaceRole workspaceRole`

    New workspace role for the User.

## Returns

- `class WorkspaceMember`

  - `JsonValue type = "workspace_member"`

    Object type.

    For Workspace Members, this is always `"workspace_member"`.

  - `String userId`

    ID of the User.

  - `String workspaceId`

    ID of the Workspace.

  - `WorkspaceRole workspaceRole`

    Role of the Workspace Member.

    - `WORKSPACE_ADMIN("workspace_admin")`

    - `WORKSPACE_BILLING("workspace_billing")`

    - `WORKSPACE_DEVELOPER("workspace_developer")`

    - `WORKSPACE_RESTRICTED_DEVELOPER("workspace_restricted_developer")`

    - `WORKSPACE_USER("workspace_user")`

## Example

```java
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.organization.workspaces.WorkspaceMember;
import com.anthropic.models.organization.workspaces.WorkspaceRole;
import com.anthropic.models.organization.workspaces.members.MemberUpdateParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        MemberUpdateParams params = MemberUpdateParams.builder()
            .workspaceId("workspace_id")
            .userId("user_id")
            .workspaceRole(WorkspaceRole.WORKSPACE_ADMIN)
            .build();
        WorkspaceMember workspaceMember = client.organization().workspaces().members().update(params);
    }
}
```

### Response (200)

```json
{
  "type": "workspace_member",
  "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
  "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
  "workspace_role": "workspace_admin"
}
```
