List Workspace Members
client.Beta.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[BetaWorkspaceMember], error)GET/v1/organizations/workspaces/{workspace_id}/members
List Workspace Members
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
page, err := client.Beta.Organization.Workspaces.Members.List(
context.TODO(),
"workspace_id",
anthropic.BetaOrganizationWorkspaceMemberListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}{
"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"
}