List Users
client.Beta.Organization.Users.List(ctx, query) (*Page[BetaOrganizationUser], error)GET/v1/organizations/users
List the organization's members.
Parameters
Returns
List Users
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.Users.List(context.TODO(), anthropic.BetaOrganizationUserListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}{
"data": [
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "user@emaildomain.com",
"name": "Jane Doe",
"role": "admin",
"type": "user"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}Returns Examples
{
"data": [
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "user@emaildomain.com",
"name": "Jane Doe",
"role": "admin",
"type": "user"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id"
}