Claude Platform Docs

List Workspace Members

MemberListPage beta().organization().workspaces().members().list(MemberListParamsparams = MemberListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/organizations/workspaces/{workspace_id}/members

List Workspace Members

Parameters
MemberListParams params
Optional<String> workspaceId

ID of the Workspace.

Optional<String> afterId

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.

Optional<String> beforeId

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.

Optional<Long> limit

Number of items to return per page.

Defaults to 20. Ranges from 1 to 1000.

maximum1000
minimum1
Returns
class BetaWorkspaceMember:
JsonValue type "workspace_member"constant

Object type.

For Workspace Members, this is always "workspace_member".

String userId

ID of the User.

String workspaceId

ID of the Workspace.

BetaWorkspaceRole workspaceRole

Role of the Workspace Member.

One of the following:
WORKSPACE_ADMIN("workspace_admin")
WORKSPACE_BILLING("workspace_billing")
WORKSPACE_DEVELOPER("workspace_developer")
WORKSPACE_RESTRICTED_DEVELOPER("workspace_restricted_developer")
WORKSPACE_USER("workspace_user")

List Workspace Members

package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.workspaces.members.MemberListPage;
import com.anthropic.models.beta.organization.workspaces.members.MemberListParams;

public final class Main {
    private Main() {}

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

        MemberListPage page = client.beta().organization().workspaces().members().list("workspace_id");
    }
}
{
  "data": [
    {
      "type": "workspace_member",
      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
      "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
      "workspace_role": "workspace_admin"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id"
}
Returns Examples
{
  "data": [
    {
      "type": "workspace_member",
      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
      "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
      "workspace_role": "workspace_admin"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id"
}