Claude Platform Docs

Perbarui Anggota Workspace

organization.workspaces.members.update(user_id, **kwargs) -> WorkspaceMember
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}

Perbarui Anggota Workspace

Parameters
workspace_id: String⁠Path parameter

ID of the Workspace.

user_id: String⁠Path parameter

ID of the User.

workspace_role: WorkspaceRole

New workspace role for the User.

One of the following:
:workspace_admin
:workspace_billing
:workspace_developer
:workspace_restricted_developer
:workspace_user
Returns
class WorkspaceMember { type: :workspace_member, user_id, workspace_id, workspace_role }
type: :workspace_member

Object type.

For Workspace Members, this is always "workspace_member".

user_id: String

ID of the User.

workspace_id: String

ID of the Workspace.

workspace_role: WorkspaceRole

Role of the Workspace Member.

One of the following:
:workspace_admin
:workspace_billing
:workspace_developer
:workspace_restricted_developer
:workspace_user
Errors

Any method can also return the general HTTP errors.

WorkspaceMemberLimitExceededErrorHTTP status 400error code workspace_member_limit_exceeded

The workspace has reached the member limit that Anthropic set for it.

SandboxEgressRestrictedErrorHTTP status 403error code sandbox_egress_restricted

The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.

Perbarui Anggota Workspace
require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

workspace_member = anthropic.organization.workspaces.members.update(
  "user_id",
  workspace_id: "workspace_id",
  workspace_role: :workspace_admin
)

puts(workspace_member)
Returns Examples
Response 200
{
  "type": "workspace_member",
  "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu",
  "workspace_id": "wrkspc_01AbCdEfGhJkLmNpQrStUvWx",
  "workspace_role": "workspace_admin"
}