Claude Platform Docs

Beta

Models
type AnthropicBeta string
One of the following:
type BetaAPIError struct { Type: "api_error"; Message }
Type APIError
defaultapi_error
Message string
defaultInternal server error
type BetaAuthenticationError struct { Type: "authentication_error"; Message }
Type AuthenticationError
defaultauthentication_error
Message string
defaultAuthentication error
type BetaBillingError struct { Type: "billing_error"; Message }
Type BillingError
defaultbilling_error
Message string
defaultBilling error
type BetaCurrency string
type BetaErrorUnion interface{…}
One of the following:
type BetaErrorResponse struct { Type: "error"; Error; RequestID }
Type Error
defaulterror
One of the following:
RequestID string
type BetaGatewayTimeoutError struct { Type: "timeout_error"; Message }
Type TimeoutError
defaulttimeout_error
Message string
defaultRequest timeout
type BetaInvalidRequestError struct { Type: "invalid_request_error"; Message }
Type InvalidRequestError
defaultinvalid_request_error
Message string
defaultInvalid request
type BetaMonetaryAmount struct { Amount; Currency }

A monetary amount in a specific currency.

Amount string

Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.

Currency BetaCurrency

Uppercase ISO-4217 currency code. USD is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.

type BetaNotFoundError struct { Type: "not_found_error"; Message }
Type NotFoundError
defaultnot_found_error
Message string
defaultNot found
type BetaOverloadedError struct { Type: "overloaded_error"; Message }
Type OverloadedError
defaultoverloaded_error
Message string
defaultOverloaded
type BetaPermissionError struct { Type: "permission_error"; Message }
Type PermissionError
defaultpermission_error
Message string
defaultPermission denied
type BetaRateLimitError struct { Type: "rate_limit_error"; Message }
Type RateLimitError
defaultrate_limit_error
Message string
defaultRate limited

BetaModels

List Models
client.Beta.Models.List(ctx, params) (*Page[BetaModelInfo], error)
GET/v1/models

List available models.

Get a Model
client.Beta.Models.Get(ctx, modelID, query) (*BetaModelInfo, error)
GET/v1/models/{model_id}

Get a specific model.

BetaMessages

Create a Message
client.Beta.Messages.New(ctx, params) (*BetaMessage, error)
POST/v1/messages

Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.

Count tokens in a Message
client.Beta.Messages.CountTokens(ctx, params) (*BetaMessageTokensCount, error)
POST/v1/messages/count_tokens

Count the number of tokens in a Message.

BetaMessagesBatches

Create a Message Batch
client.Beta.Messages.Batches.New(ctx, params) (*BetaMessageBatch, error)
POST/v1/messages/batches

Send a batch of Message creation requests.

Retrieve a Message Batch
client.Beta.Messages.Batches.Get(ctx, messageBatchID, query) (*BetaMessageBatch, error)
GET/v1/messages/batches/{message_batch_id}

This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the results_url field in the response.

List Message Batches
client.Beta.Messages.Batches.List(ctx, params) (*Page[BetaMessageBatch], error)
GET/v1/messages/batches

List all Message Batches within a Workspace. Most recently created batches are returned first.

Cancel a Message Batch
client.Beta.Messages.Batches.Cancel(ctx, messageBatchID, body) (*BetaMessageBatch, error)
POST/v1/messages/batches/{message_batch_id}/cancel

Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a canceling state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.

Delete a Message Batch
client.Beta.Messages.Batches.Delete(ctx, messageBatchID, body) (*BetaDeletedMessageBatch, error)
DELETE/v1/messages/batches/{message_batch_id}
Retrieve Message Batch results
client.Beta.Messages.Batches.ResultsStreaming(ctx, messageBatchID, query) *jsonl.Stream[BetaMessageBatchIndividualResponse]
GET/v1/messages/batches/{message_batch_id}/results

Streams the results of a Message Batch as a .jsonl file.

BetaAgents

Create Agent
client.Beta.Agents.New(ctx, params) (*BetaManagedAgentsAgent, error)
POST/v1/agents
List Agents
client.Beta.Agents.List(ctx, params) (*PageCursor[BetaManagedAgentsAgent], error)
GET/v1/agents
Get Agent
client.Beta.Agents.Get(ctx, agentID, params) (*BetaManagedAgentsAgent, error)
GET/v1/agents/{agent_id}
Update Agent
client.Beta.Agents.Update(ctx, agentID, params) (*BetaManagedAgentsAgent, error)
POST/v1/agents/{agent_id}
Archive Agent
client.Beta.Agents.Archive(ctx, agentID, body) (*BetaManagedAgentsAgent, error)
POST/v1/agents/{agent_id}/archive

BetaAgentsVersions

List Agent Versions
client.Beta.Agents.Versions.List(ctx, agentID, params) (*PageCursor[BetaManagedAgentsAgent], error)
GET/v1/agents/{agent_id}/versions
Create Environment
client.Beta.Environments.New(ctx, params) (*BetaEnvironment, error)
POST/v1/environments

Create a new environment with the specified configuration.

List Environments
client.Beta.Environments.List(ctx, params) (*PageCursor[BetaEnvironment], error)
GET/v1/environments

List environments with pagination support.

Get Environment
client.Beta.Environments.Get(ctx, environmentID, query) (*BetaEnvironment, error)
GET/v1/environments/{environment_id}

Retrieve a specific environment by ID.

Update Environment
client.Beta.Environments.Update(ctx, environmentID, params) (*BetaEnvironment, error)
POST/v1/environments/{environment_id}

Update an existing environment's configuration.

Delete Environment
client.Beta.Environments.Delete(ctx, environmentID, body) (*BetaEnvironmentDeleteResponse, error)
DELETE/v1/environments/{environment_id}

Delete an environment by ID. Returns a confirmation of the deletion.

Archive Environment
client.Beta.Environments.Archive(ctx, environmentID, body) (*BetaEnvironment, error)
POST/v1/environments/{environment_id}/archive

Archive an environment by ID. Archived environments cannot be used to create new sessions.

BetaEnvironmentsWork

Get Work Item
client.Beta.Environments.Work.Get(ctx, workID, params) (*BetaSelfHostedWork, error)
GET/v1/environments/{environment_id}/work/{work_id}

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Poll for Work
client.Beta.Environments.Work.Poll(ctx, environmentID, params) (*BetaSelfHostedWork, error)
GET/v1/environments/{environment_id}/work/poll

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Acknowledge Work
client.Beta.Environments.Work.Ack(ctx, workID, params) (*BetaSelfHostedWork, error)
POST/v1/environments/{environment_id}/work/{work_id}/ack

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Record Heartbeat
client.Beta.Environments.Work.Heartbeat(ctx, workID, params) (*BetaSelfHostedWorkHeartbeatResponse, error)
POST/v1/environments/{environment_id}/work/{work_id}/heartbeat

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Stop Work
client.Beta.Environments.Work.Stop(ctx, workID, params) (*BetaSelfHostedWork, error)
POST/v1/environments/{environment_id}/work/{work_id}/stop

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

List Work Items
client.Beta.Environments.Work.List(ctx, environmentID, params) (*PageCursor[BetaSelfHostedWork], error)
GET/v1/environments/{environment_id}/work

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Update Work Item
client.Beta.Environments.Work.Update(ctx, workID, params) (*BetaSelfHostedWork, error)
POST/v1/environments/{environment_id}/work/{work_id}

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Get Queue Statistics
client.Beta.Environments.Work.Stats(ctx, environmentID, query) (*BetaSelfHostedWorkQueueStats, error)
GET/v1/environments/{environment_id}/work/stats

Get statistics about the work queue for an environment.

BetaSessions

Create Session
client.Beta.Sessions.New(ctx, params) (*BetaManagedAgentsSession, error)
POST/v1/sessions
List Sessions
client.Beta.Sessions.List(ctx, params) (*BidirectionalPageCursor[BetaManagedAgentsSession], error)
GET/v1/sessions
Get Session
client.Beta.Sessions.Get(ctx, sessionID, query) (*BetaManagedAgentsSession, error)
GET/v1/sessions/{session_id}
Update Session
client.Beta.Sessions.Update(ctx, sessionID, params) (*BetaManagedAgentsSession, error)
POST/v1/sessions/{session_id}
Delete Session
client.Beta.Sessions.Delete(ctx, sessionID, body) (*BetaManagedAgentsDeletedSession, error)
DELETE/v1/sessions/{session_id}
Archive Session
client.Beta.Sessions.Archive(ctx, sessionID, body) (*BetaManagedAgentsSession, error)
POST/v1/sessions/{session_id}/archive

BetaSessionsEvents

List Events
client.Beta.Sessions.Events.List(ctx, sessionID, params) (*PageCursor[BetaManagedAgentsSessionEventUnion], error)
GET/v1/sessions/{session_id}/events
Send Events
client.Beta.Sessions.Events.Send(ctx, sessionID, params) (*BetaManagedAgentsSendSessionEvents, error)
POST/v1/sessions/{session_id}/events
Stream Events
client.Beta.Sessions.Events.StreamEvents(ctx, sessionID, params) *ssestream.Stream[BetaManagedAgentsStreamSessionEventsUnion]
GET/v1/sessions/{session_id}/events/stream

BetaSessionsResources

Add Session Resource
client.Beta.Sessions.Resources.Add(ctx, sessionID, params) (*BetaManagedAgentsFileResource, error)
POST/v1/sessions/{session_id}/resources
List Session Resources
client.Beta.Sessions.Resources.List(ctx, sessionID, params) (*PageCursor[BetaManagedAgentsSessionResourceUnion], error)
GET/v1/sessions/{session_id}/resources
Get Session Resource
client.Beta.Sessions.Resources.Get(ctx, resourceID, params) (*BetaSessionResourceGetResponseUnion, error)
GET/v1/sessions/{session_id}/resources/{resource_id}
Update Session Resource
client.Beta.Sessions.Resources.Update(ctx, resourceID, params) (*BetaSessionResourceUpdateResponseUnion, error)
POST/v1/sessions/{session_id}/resources/{resource_id}
Delete Session Resource
client.Beta.Sessions.Resources.Delete(ctx, resourceID, params) (*BetaManagedAgentsDeleteSessionResource, error)
DELETE/v1/sessions/{session_id}/resources/{resource_id}

BetaSessionsThreads

List Session Threads
client.Beta.Sessions.Threads.List(ctx, sessionID, params) (*PageCursor[BetaManagedAgentsSessionThread], error)
GET/v1/sessions/{session_id}/threads
Get Session Thread
client.Beta.Sessions.Threads.Get(ctx, threadID, params) (*BetaManagedAgentsSessionThread, error)
GET/v1/sessions/{session_id}/threads/{thread_id}
Archive Session Thread
client.Beta.Sessions.Threads.Archive(ctx, threadID, params) (*BetaManagedAgentsSessionThread, error)
POST/v1/sessions/{session_id}/threads/{thread_id}/archive

BetaSessionsThreadsEvents

List Session Thread Events
client.Beta.Sessions.Threads.Events.List(ctx, threadID, params) (*PageCursor[BetaManagedAgentsSessionEventUnion], error)
GET/v1/sessions/{session_id}/threads/{thread_id}/events
Stream Session Thread Events
client.Beta.Sessions.Threads.Events.StreamEvents(ctx, threadID, params) *ssestream.Stream[BetaManagedAgentsStreamSessionThreadEventsUnion]
GET/v1/sessions/{session_id}/threads/{thread_id}/stream
Create Deployment
client.Beta.Deployments.New(ctx, params) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments
List Deployments
client.Beta.Deployments.List(ctx, params) (*PageCursor[BetaManagedAgentsDeployment], error)
GET/v1/deployments
Get Deployment
client.Beta.Deployments.Get(ctx, deploymentID, query) (*BetaManagedAgentsDeployment, error)
GET/v1/deployments/{deployment_id}
Update Deployment
client.Beta.Deployments.Update(ctx, deploymentID, params) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}
Archive Deployment
client.Beta.Deployments.Archive(ctx, deploymentID, body) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}/archive
Run Deployment Now
client.Beta.Deployments.Run(ctx, deploymentID, body) (*BetaManagedAgentsDeploymentRun, error)
POST/v1/deployments/{deployment_id}/run
Pause Deployment
client.Beta.Deployments.Pause(ctx, deploymentID, body) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}/pause
Unpause Deployment
client.Beta.Deployments.Unpause(ctx, deploymentID, body) (*BetaManagedAgentsDeployment, error)
POST/v1/deployments/{deployment_id}/unpause
List Deployment Runs
client.Beta.DeploymentRuns.List(ctx, params) (*PageCursor[BetaManagedAgentsDeploymentRun], error)
GET/v1/deployment_runs
Get Deployment Run
client.Beta.DeploymentRuns.Get(ctx, deploymentRunID, query) (*BetaManagedAgentsDeploymentRun, error)
GET/v1/deployment_runs/{deployment_run_id}

BetaVaults

Create Vault
client.Beta.Vaults.New(ctx, params) (*BetaManagedAgentsVault, error)
POST/v1/vaults
List Vaults
client.Beta.Vaults.List(ctx, params) (*PageCursor[BetaManagedAgentsVault], error)
GET/v1/vaults
Get Vault
client.Beta.Vaults.Get(ctx, vaultID, query) (*BetaManagedAgentsVault, error)
GET/v1/vaults/{vault_id}
Update Vault
client.Beta.Vaults.Update(ctx, vaultID, params) (*BetaManagedAgentsVault, error)
POST/v1/vaults/{vault_id}
Delete Vault
client.Beta.Vaults.Delete(ctx, vaultID, body) (*BetaManagedAgentsDeletedVault, error)
DELETE/v1/vaults/{vault_id}
Archive Vault
client.Beta.Vaults.Archive(ctx, vaultID, body) (*BetaManagedAgentsVault, error)
POST/v1/vaults/{vault_id}/archive

BetaVaultsCredentials

Create Credential
client.Beta.Vaults.Credentials.New(ctx, vaultID, params) (*BetaManagedAgentsCredential, error)
POST/v1/vaults/{vault_id}/credentials
List Credentials
client.Beta.Vaults.Credentials.List(ctx, vaultID, params) (*PageCursor[BetaManagedAgentsCredential], error)
GET/v1/vaults/{vault_id}/credentials
Get Credential
client.Beta.Vaults.Credentials.Get(ctx, credentialID, params) (*BetaManagedAgentsCredential, error)
GET/v1/vaults/{vault_id}/credentials/{credential_id}
Update Credential
client.Beta.Vaults.Credentials.Update(ctx, credentialID, params) (*BetaManagedAgentsCredential, error)
POST/v1/vaults/{vault_id}/credentials/{credential_id}
Delete Credential
client.Beta.Vaults.Credentials.Delete(ctx, credentialID, params) (*BetaManagedAgentsDeletedCredential, error)
DELETE/v1/vaults/{vault_id}/credentials/{credential_id}
Archive Credential
client.Beta.Vaults.Credentials.Archive(ctx, credentialID, params) (*BetaManagedAgentsCredential, error)
POST/v1/vaults/{vault_id}/credentials/{credential_id}/archive
Validate Credential
client.Beta.Vaults.Credentials.MCPOAuthValidate(ctx, credentialID, params) (*BetaManagedAgentsCredentialValidation, error)
POST/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate
Create a memory store
client.Beta.MemoryStores.New(ctx, params) (*BetaManagedAgentsMemoryStore, error)
POST/v1/memory_stores
List memory stores
client.Beta.MemoryStores.List(ctx, params) (*PageCursor[BetaManagedAgentsMemoryStore], error)
GET/v1/memory_stores
Retrieve a memory store
client.Beta.MemoryStores.Get(ctx, memoryStoreID, query) (*BetaManagedAgentsMemoryStore, error)
GET/v1/memory_stores/{memory_store_id}
Update a memory store
client.Beta.MemoryStores.Update(ctx, memoryStoreID, params) (*BetaManagedAgentsMemoryStore, error)
POST/v1/memory_stores/{memory_store_id}
Delete a memory store
client.Beta.MemoryStores.Delete(ctx, memoryStoreID, body) (*BetaManagedAgentsDeletedMemoryStore, error)
DELETE/v1/memory_stores/{memory_store_id}
Archive a memory store
client.Beta.MemoryStores.Archive(ctx, memoryStoreID, body) (*BetaManagedAgentsMemoryStore, error)
POST/v1/memory_stores/{memory_store_id}/archive

BetaMemory StoresMemories

Create a memory
client.Beta.MemoryStores.Memories.New(ctx, memoryStoreID, params) (*BetaManagedAgentsMemory, error)
POST/v1/memory_stores/{memory_store_id}/memories
List memories
client.Beta.MemoryStores.Memories.List(ctx, memoryStoreID, params) (*PageCursor[BetaManagedAgentsMemoryListItemUnion], error)
GET/v1/memory_stores/{memory_store_id}/memories
Retrieve a memory
client.Beta.MemoryStores.Memories.Get(ctx, memoryID, params) (*BetaManagedAgentsMemory, error)
GET/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Update a memory
client.Beta.MemoryStores.Memories.Update(ctx, memoryID, params) (*BetaManagedAgentsMemory, error)
POST/v1/memory_stores/{memory_store_id}/memories/{memory_id}
Delete a memory
client.Beta.MemoryStores.Memories.Delete(ctx, memoryID, params) (*BetaManagedAgentsDeletedMemory, error)
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}

BetaMemory StoresMemory Versions

List memory versions
client.Beta.MemoryStores.MemoryVersions.List(ctx, memoryStoreID, params) (*PageCursor[BetaManagedAgentsMemoryVersion], error)
GET/v1/memory_stores/{memory_store_id}/memory_versions
Retrieve a memory version
client.Beta.MemoryStores.MemoryVersions.Get(ctx, memoryVersionID, params) (*BetaManagedAgentsMemoryVersion, error)
GET/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}
Redact a memory version
client.Beta.MemoryStores.MemoryVersions.Redact(ctx, memoryVersionID, params) (*BetaManagedAgentsMemoryVersion, error)
POST/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact

BetaFiles

Upload File
client.Beta.Files.Upload(ctx, params) (*BetaFileMetadata, error)
POST/v1/files
List Files
client.Beta.Files.List(ctx, params) (*PageCursor[BetaFileMetadata], error)
GET/v1/files
Download File
client.Beta.Files.Download(ctx, fileID, query) (*Response, error)
GET/v1/files/{file_id}/content
Get File Metadata
client.Beta.Files.GetMetadata(ctx, fileID, query) (*BetaFileMetadata, error)
GET/v1/files/{file_id}
Delete File
client.Beta.Files.Delete(ctx, fileID, body) (*BetaDeletedFile, error)
DELETE/v1/files/{file_id}

BetaSkills

Create Skill
client.Beta.Skills.New(ctx, params) (*BetaSkill, error)
POST/v1/skills
List Skills
client.Beta.Skills.List(ctx, params) (*PageCursor[BetaSkill], error)
GET/v1/skills
Get Skill
client.Beta.Skills.Get(ctx, skillID, query) (*BetaSkill, error)
GET/v1/skills/{skill_id}
Delete Skill
client.Beta.Skills.Delete(ctx, skillID, body) (*BetaDeletedSkill, error)
DELETE/v1/skills/{skill_id}

BetaSkillsVersions

Create Skill Version
client.Beta.Skills.Versions.New(ctx, skillID, params) (*BetaSkillVersion, error)
POST/v1/skills/{skill_id}/versions
List Skill Versions
client.Beta.Skills.Versions.List(ctx, skillID, params) (*PageCursor[BetaSkillVersion], error)
GET/v1/skills/{skill_id}/versions
Download Skill Version Content
client.Beta.Skills.Versions.Download(ctx, version, params) (*Response, error)
GET/v1/skills/{skill_id}/versions/{version}/content

Download a skill version's content as a zip archive.

Get Skill Version
client.Beta.Skills.Versions.Get(ctx, version, params) (*BetaSkillVersion, error)
GET/v1/skills/{skill_id}/versions/{version}
Delete Skill Version
client.Beta.Skills.Versions.Delete(ctx, version, params) (*BetaDeletedSkillVersion, error)
DELETE/v1/skills/{skill_id}/versions/{version}
Create User Profile
client.Beta.UserProfiles.New(ctx, params) (*BetaUserProfile, error)
POST/v1/user_profiles
List User Profiles
client.Beta.UserProfiles.List(ctx, params) (*PageCursor[BetaUserProfile], error)
GET/v1/user_profiles
Get User Profile
client.Beta.UserProfiles.Get(ctx, userProfileID, query) (*BetaUserProfile, error)
GET/v1/user_profiles/{user_profile_id}
Update User Profile
client.Beta.UserProfiles.Update(ctx, userProfileID, params) (*BetaUserProfile, error)
POST/v1/user_profiles/{user_profile_id}
Create Enrollment URL
client.Beta.UserProfiles.NewEnrollmentURL(ctx, userProfileID, body) (*BetaUserProfileEnrollmentURL, error)
POST/v1/user_profiles/{user_profile_id}/enrollment_url

BetaDreams

Create a Dream
client.Beta.Dreams.New(ctx, params) (*BetaDream, error)
POST/v1/dreams

Start an asynchronous job that uses past sessions to produce a reorganized version of a memory store and get back the dream to poll for the result.

List Dreams
client.Beta.Dreams.List(ctx, params) (*PageCursor[BetaDream], error)
GET/v1/dreams

List the dreams in the workspace, newest first.

Get a Dream
client.Beta.Dreams.Get(ctx, dreamID, query) (*BetaDream, error)
GET/v1/dreams/{dream_id}

Get a dream by ID to check its status, output memory store, and token usage.

Cancel a Dream
client.Beta.Dreams.Cancel(ctx, dreamID, body) (*BetaDream, error)
POST/v1/dreams/{dream_id}/cancel

Stop a pending or running dream.

Archive a Dream
client.Beta.Dreams.Archive(ctx, dreamID, body) (*BetaDream, error)
POST/v1/dreams/{dream_id}/archive

Hide a completed, failed, or canceled dream from the default list of dreams.

BetaTunnels

Create Tunnel
client.Beta.Tunnels.New(ctx, params) (*BetaTunnel, error)
POST/v1/tunnels

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Get Tunnel
client.Beta.Tunnels.Get(ctx, tunnelID, query) (*BetaTunnel, error)
GET/v1/tunnels/{tunnel_id}

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

List Tunnels
client.Beta.Tunnels.List(ctx, params) (*PageCursor[BetaTunnel], error)
GET/v1/tunnels

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Archive Tunnel
client.Beta.Tunnels.Archive(ctx, tunnelID, body) (*BetaTunnel, error)
POST/v1/tunnels/{tunnel_id}/archive

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Reveal Tunnel Token
client.Beta.Tunnels.RevealToken(ctx, tunnelID, body) (*BetaTunnelToken, error)
POST/v1/tunnels/{tunnel_id}/reveal_token

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Rotate Tunnel Token
client.Beta.Tunnels.RotateToken(ctx, tunnelID, params) (*BetaTunnelToken, error)
POST/v1/tunnels/{tunnel_id}/rotate_token

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

BetaTunnelsCertificates

Create Tunnel Certificate
client.Beta.Tunnels.Certificates.New(ctx, tunnelID, params) (*BetaTunnelCertificate, error)
POST/v1/tunnels/{tunnel_id}/certificates

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Get Tunnel Certificate
client.Beta.Tunnels.Certificates.Get(ctx, certificateID, params) (*BetaTunnelCertificate, error)
GET/v1/tunnels/{tunnel_id}/certificates/{certificate_id}

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

List Tunnel Certificates
client.Beta.Tunnels.Certificates.List(ctx, tunnelID, params) (*PageCursor[BetaTunnelCertificate], error)
GET/v1/tunnels/{tunnel_id}/certificates

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Archive Tunnel Certificate
client.Beta.Tunnels.Certificates.Archive(ctx, certificateID, params) (*BetaTunnelCertificate, error)
POST/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive

The Tunnels API is in research preview. It requires the anthropic-beta: mcp-tunnels-2026-06-22 header and may change without a deprecation period. It supersedes the Admin API endpoints at /v1/organizations/tunnels, which remain available during a migration window.

Get Current Organization
client.Beta.Organization.Get(ctx) (*BetaOrganization, error)
GET/v1/organizations/me

Retrieve information about the organization associated with the authenticated API key.

BetaOrganizationAPI Keys

List API Keys
client.Beta.Organization.APIKeys.List(ctx, query) (*Page[BetaAPIKey], error)
GET/v1/organizations/api_keys
Retrieve API Key (Admin API)
client.Beta.Organization.APIKeys.Get(ctx, apiKeyID) (*BetaAPIKey, error)
GET/v1/organizations/api_keys/{api_key_id}

Retrieve information about a single API key in your organization, looked up by its ID. This Admin API endpoint requires an Admin API key, is intended for programmatic key management, and never returns the key's secret value. To view or create your own API keys, go to API keys in the Claude Console.

Update API Key
client.Beta.Organization.APIKeys.Update(ctx, apiKeyID, body) (*BetaAPIKey, error)
POST/v1/organizations/api_keys/{api_key_id}

BetaOrganizationExternal Keys

Create External Key
client.Beta.Organization.ExternalKeys.New(ctx, body) (*BetaExternalKey, error)
POST/v1/organizations/external_keys

Create an external key config owned by the caller's organization.

List External Keys
client.Beta.Organization.ExternalKeys.List(ctx, query) (*PageCursor[BetaExternalKey], error)
GET/v1/organizations/external_keys

List external key configs in the caller's organization.

Get External Key
client.Beta.Organization.ExternalKeys.Get(ctx, externalKeyID) (*BetaExternalKey, error)
GET/v1/organizations/external_keys/{external_key_id}

Retrieve a single external key config in the caller's organization by ID.

Update External Key
client.Beta.Organization.ExternalKeys.Update(ctx, externalKeyID, body) (*BetaExternalKey, error)
POST/v1/organizations/external_keys/{external_key_id}

Partially update an external key config. Omitted fields are left unchanged.

Delete External Key
client.Beta.Organization.ExternalKeys.Delete(ctx, externalKeyID) (*BetaOrganizationExternalKeyDeleteResponse, error)
DELETE/v1/organizations/external_keys/{external_key_id}

Delete an external key config.

Validate External Key
client.Beta.Organization.ExternalKeys.Validate(ctx, externalKeyID) (*BetaOrganizationExternalKeyValidateResponse, error)
POST/v1/organizations/external_keys/{external_key_id}/validate

Validate an external key config against the customer's KMS.

BetaOrganizationFederationIssuers

Create Federation Issuer
client.Beta.Organization.Federation.Issuers.New(ctx, params) (*BetaFederationIssuer, error)
POST/v1/organizations/federation_issuers

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

List Federation Issuers
client.Beta.Organization.Federation.Issuers.List(ctx, params) (*PageCursor[BetaFederationIssuer], error)
GET/v1/organizations/federation_issuers

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Get Federation Issuer
client.Beta.Organization.Federation.Issuers.Get(ctx, federationIssuerID, query) (*BetaFederationIssuer, error)
GET/v1/organizations/federation_issuers/{federation_issuer_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Update Federation Issuer
client.Beta.Organization.Federation.Issuers.Update(ctx, federationIssuerID, params) (*BetaFederationIssuer, error)
POST/v1/organizations/federation_issuers/{federation_issuer_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Archive Federation Issuer
client.Beta.Organization.Federation.Issuers.Archive(ctx, federationIssuerID, body) (*BetaFederationIssuer, error)
POST/v1/organizations/federation_issuers/{federation_issuer_id}/archive

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

BetaOrganizationFederationRules

Create Federation Rule
client.Beta.Organization.Federation.Rules.New(ctx, params) (*BetaFederationRule, error)
POST/v1/organizations/federation_rules

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

List Federation Rules
client.Beta.Organization.Federation.Rules.List(ctx, params) (*PageCursor[BetaFederationRule], error)
GET/v1/organizations/federation_rules

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Get Federation Rule
client.Beta.Organization.Federation.Rules.Get(ctx, federationRuleID, query) (*BetaFederationRule, error)
GET/v1/organizations/federation_rules/{federation_rule_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Update Federation Rule
client.Beta.Organization.Federation.Rules.Update(ctx, federationRuleID, params) (*BetaFederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Archive Federation Rule
client.Beta.Organization.Federation.Rules.Archive(ctx, federationRuleID, body) (*BetaFederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/archive

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

BetaOrganizationFederationRulesWorkspaces

Add Federation Rule Workspace
client.Beta.Organization.Federation.Rules.Workspaces.Add(ctx, federationRuleID, params) (*BetaFederationRuleWorkspace, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/workspaces

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

List Federation Rule Workspaces
client.Beta.Organization.Federation.Rules.Workspaces.List(ctx, federationRuleID, params) (*PageCursor[BetaFederationRuleWorkspace], error)
GET/v1/organizations/federation_rules/{federation_rule_id}/workspaces

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Remove Federation Rule Workspace
client.Beta.Organization.Federation.Rules.Workspaces.Remove(ctx, workspaceID, params) (*BetaOrganizationFederationRuleWorkspaceRemoveResponse, error)
DELETE/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

BetaOrganizationInvites

Create Invite
client.Beta.Organization.Invites.New(ctx, body) (*BetaOrganizationInvite, error)
POST/v1/organizations/invites

Invite a user to join the organization by email.

List Invites
client.Beta.Organization.Invites.List(ctx, query) (*Page[BetaOrganizationInvite], error)
GET/v1/organizations/invites

List the organization's invites.

Get Invite
client.Beta.Organization.Invites.Get(ctx, inviteID) (*BetaOrganizationInvite, error)
GET/v1/organizations/invites/{invite_id}

Retrieve an invite by ID.

Delete Invite
client.Beta.Organization.Invites.Delete(ctx, inviteID) (*BetaOrganizationInviteDeleteResponse, error)
DELETE/v1/organizations/invites/{invite_id}

Delete a pending invite.

BetaOrganizationService Accounts

Create Service Account
client.Beta.Organization.ServiceAccounts.New(ctx, params) (*BetaServiceAccount, error)
POST/v1/organizations/service_accounts

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

List Service Accounts
client.Beta.Organization.ServiceAccounts.List(ctx, params) (*PageCursor[BetaServiceAccount], error)
GET/v1/organizations/service_accounts

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Get Service Account
client.Beta.Organization.ServiceAccounts.Get(ctx, serviceAccountID, query) (*BetaServiceAccount, error)
GET/v1/organizations/service_accounts/{service_account_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Update Service Account
client.Beta.Organization.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccount, error)
POST/v1/organizations/service_accounts/{service_account_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Archive Service Account
client.Beta.Organization.ServiceAccounts.Archive(ctx, serviceAccountID, body) (*BetaServiceAccount, error)
POST/v1/organizations/service_accounts/{service_account_id}/archive

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

BetaOrganizationService AccountsWorkspaces

Add Workspace To Service Account
client.Beta.Organization.ServiceAccounts.Workspaces.Add(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/service_accounts/{service_account_id}/workspaces

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

List Workspaces For Service Account
client.Beta.Organization.ServiceAccounts.Workspaces.List(ctx, serviceAccountID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/service_accounts/{service_account_id}/workspaces

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Remove Workspace From Service Account
client.Beta.Organization.ServiceAccounts.Workspaces.Remove(ctx, workspaceID, params) (*BetaOrganizationServiceAccountWorkspaceRemoveResponse, error)
DELETE/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

BetaOrganizationUsers

List Users
client.Beta.Organization.Users.List(ctx, query) (*Page[BetaOrganizationUser], error)
GET/v1/organizations/users

List the organization's members.

Get User
client.Beta.Organization.Users.Get(ctx, userID) (*BetaOrganizationUser, error)
GET/v1/organizations/users/{user_id}

Retrieve a member of the organization by user ID.

Update User
client.Beta.Organization.Users.Update(ctx, userID, body) (*BetaOrganizationUser, error)
POST/v1/organizations/users/{user_id}

Update a member's organization role.

Remove User
client.Beta.Organization.Users.Remove(ctx, userID) (*BetaOrganizationUserRemoveResponse, error)
DELETE/v1/organizations/users/{user_id}

Remove a member from the organization.

BetaOrganizationWorkspaces

List Workspaces
client.Beta.Organization.Workspaces.List(ctx, query) (*Page[BetaWorkspace], error)
GET/v1/organizations/workspaces
Create Workspace
client.Beta.Organization.Workspaces.New(ctx, params) (*BetaWorkspace, error)
POST/v1/organizations/workspaces
Get Workspace
client.Beta.Organization.Workspaces.Get(ctx, workspaceID) (*BetaWorkspace, error)
GET/v1/organizations/workspaces/{workspace_id}
Update Workspace
client.Beta.Organization.Workspaces.Update(ctx, workspaceID, body) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}
Archive Workspace
client.Beta.Organization.Workspaces.Archive(ctx, workspaceID) (*BetaWorkspace, error)
POST/v1/organizations/workspaces/{workspace_id}/archive

BetaOrganizationWorkspacesRate Limits

List Workspace Rate Limits
client.Beta.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[BetaWorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

List a workspace's rate limits.

BetaOrganizationWorkspacesMembers

List Workspace Members
client.Beta.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[BetaWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
Create Workspace Member
client.Beta.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
Get Workspace Member
client.Beta.Organization.Workspaces.Members.Get(ctx, userID, query) (*BetaWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Update Workspace Member
client.Beta.Organization.Workspaces.Members.Update(ctx, userID, params) (*BetaWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
Delete Workspace Member
client.Beta.Organization.Workspaces.Members.Remove(ctx, userID, body) (*BetaOrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

BetaOrganizationWorkspacesService Accounts

List Service Account Workspace Members
client.Beta.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, params) (*PageCursor[BetaServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Create Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Get Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Update Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*BetaServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

Delete Service Account Workspace Member
client.Beta.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, params) (*BetaOrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

Requires an OAuth access token with the org:admin scope, from ant auth login --scope org:admin or a workload identity federation rule; Admin API keys are not accepted. See Manage WIF with the Admin API.

BetaOrganizationRate Limits

List Organization Rate Limits
client.Beta.Organization.RateLimits.List(ctx, query) (*PageCursor[BetaOrganizationRateLimit], error)
GET/v1/organizations/rate_limits

List Messages API rate limits for your organization.

BetaOrganizationCompliance Settings

Get Compliance Settings
client.Beta.Organization.ComplianceSettings.Get(ctx) (*BetaComplianceSettings, error)
GET/v1/organizations/compliance_settings

Retrieve your organization's Compliance Settings.

Update Compliance Settings
client.Beta.Organization.ComplianceSettings.Update(ctx, body) (*BetaComplianceSettings, error)
POST/v1/organizations/compliance_settings

Update your organization's Compliance Settings.

BetaOrganizationAnalyticsSummaries

Get Activity Summaries
client.Beta.Organization.Analytics.Summaries.List(ctx, query) (*PageCursor[BetaAnalyticsSingleDayActivitySummary], error)
GET/v1/organizations/analytics/summaries

Get organization-wide activity summaries for a date range.

BetaOrganizationAnalyticsUsers

List User Activity
client.Beta.Organization.Analytics.Users.List(ctx, query) (*PageCursor[BetaAnalyticsUserActivity], error)
GET/v1/organizations/analytics/users

Get per-user activity for a given day, with cursor-based pagination.

BetaOrganizationAnalyticsAppsChatProjects

Get Chat Project Usage
client.Beta.Organization.Analytics.Apps.Chat.Projects.List(ctx, query) (*PageCursor[BetaAnalyticsProjectActivity], error)
GET/v1/organizations/analytics/apps/chat/projects

Get per-project activity for a given day, with cursor-based pagination.

BetaOrganizationAnalyticsConnectors

Get Connector Usage
client.Beta.Organization.Analytics.Connectors.List(ctx, query) (*PageCursor[BetaAnalyticsConnectorActivity], error)
GET/v1/organizations/analytics/connectors

Get per-connector usage for a given day, with cursor-based pagination.

BetaOrganizationAnalyticsPlugins

Get Plugin Usage
client.Beta.Organization.Analytics.Plugins.List(ctx, query) (*PageCursor[BetaAnalyticsPluginActivity], error)
GET/v1/organizations/analytics/plugins

Get per-plugin install + invocation usage for a given day, with pagination.

BetaOrganizationAnalyticsSkills

Get Skill Usage
client.Beta.Organization.Analytics.Skills.List(ctx, query) (*PageCursor[BetaAnalyticsSkillActivity], error)
GET/v1/organizations/analytics/skills

Get per-skill usage for a given day, with cursor-based pagination.

BetaOrganizationAnalyticsArtifacts

Get Artifact Activity
client.Beta.Organization.Analytics.Artifacts.List(ctx, query) (*PageCursor[BetaAnalyticsArtifactActivity], error)
GET/v1/organizations/analytics/artifacts

Get artifact-creation activity for a given day, broken out by MIME type.

BetaOrganizationAnalyticsUsage Report

Get Token Usage Over Time
client.Beta.Organization.Analytics.UsageReport.List(ctx, query) (*PageCursor[BetaAnalyticsUsageReportTimeBucket], error)
GET/v1/organizations/analytics/usage_report

Get token usage over time across a date range.

BetaOrganizationAnalyticsUser Usage Report

Get Per-User Token Usage
client.Beta.Organization.Analytics.UserUsageReport.List(ctx, query) (*PageCursor[BetaAnalyticsUsageUsersItem], error)
GET/v1/organizations/analytics/user_usage_report

Get per-user token usage across a date range.

BetaOrganizationAnalyticsCost Report

Get Cost Over Time
client.Beta.Organization.Analytics.CostReport.List(ctx, query) (*PageCursor[BetaAnalyticsCostReportTimeBucket], error)
GET/v1/organizations/analytics/cost_report

Get cost in USD over time across a date range.

BetaOrganizationAnalyticsUser Cost Report

Get Per-User Cost
client.Beta.Organization.Analytics.UserCostReport.List(ctx, query) (*PageCursor[BetaAnalyticsCostUsersItem], error)
GET/v1/organizations/analytics/user_cost_report

Get per-user cost in USD across a date range.

BetaOrganizationSpend Limits

Set Spend Limit
client.Beta.Organization.SpendLimits.Set(ctx, params) (*BetaSpendLimit, error)
POST/v1/organizations/spend_limits

Set a spend limit.

Get Spend Limit
client.Beta.Organization.SpendLimits.Get(ctx, spendLimitID) (*BetaSpendLimit, error)
GET/v1/organizations/spend_limits/{spend_limit_id}

Retrieve a spend limit by ID.

Delete Spend Limit
client.Beta.Organization.SpendLimits.Delete(ctx, spendLimitID) (*BetaOrganizationSpendLimitDeleteResponse, error)
DELETE/v1/organizations/spend_limits/{spend_limit_id}

Delete a spend limit.

List Spend Limits
client.Beta.Organization.SpendLimits.List(ctx, params) (*PageCursor[BetaSpendLimit], error)
GET/v1/organizations/spend_limits

List the organization's spend limits.

BetaOrganizationSpend LimitsEffective

List Effective Spend Limits
client.Beta.Organization.SpendLimits.Effective.List(ctx, query) (*PageCursor[BetaSpendSummary], error)
GET/v1/organizations/spend_limits/effective

List each member's effective spend limit and period-to-date spend.

BetaOrganizationSpend LimitsIncrease Requests

List Spend Limit Increase Requests
client.Beta.Organization.SpendLimits.IncreaseRequests.List(ctx, query) (*PageCursor[BetaSpendLimitIncreaseRequest], error)
GET/v1/organizations/spend_limit_increase_requests

List spend limit increase requests, most recent first.

Get Spend Limit Increase Request
client.Beta.Organization.SpendLimits.IncreaseRequests.Get(ctx, spendLimitIncreaseRequestID) (*BetaSpendLimitIncreaseRequest, error)
GET/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}

Retrieve a spend limit increase request.

Approve Spend Limit Increase Request
client.Beta.Organization.SpendLimits.IncreaseRequests.Approve(ctx, spendLimitIncreaseRequestID, body) (*BetaOrganizationSpendLimitIncreaseRequestApproveResponse, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve

Approve a pending spend limit increase request.

Deny Spend Limit Increase Request
client.Beta.Organization.SpendLimits.IncreaseRequests.Deny(ctx, spendLimitIncreaseRequestID, body) (*BetaSpendLimitIncreaseRequest, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny

Deny a pending spend limit increase request.

BetaOrganizationRBAC Groups

Create RBAC Group
client.Beta.Organization.RBACGroups.New(ctx, body) (*BetaRBACGroup, error)
POST/v1/organizations/rbac_groups

Create an RBAC Group in the Claude Enterprise tenant. Groups created via the API have source type "direct".

List RBAC Groups
client.Beta.Organization.RBACGroups.List(ctx, query) (*PageCursor[BetaRBACGroup], error)
GET/v1/organizations/rbac_groups

List RBAC Groups in the Claude Enterprise tenant.

Get RBAC Group
client.Beta.Organization.RBACGroups.Get(ctx, rbacGroupID) (*BetaRBACGroup, error)
GET/v1/organizations/rbac_groups/{rbac_group_id}

Retrieve an RBAC Group by ID.

Update RBAC Group
client.Beta.Organization.RBACGroups.Update(ctx, rbacGroupID, body) (*BetaRBACGroup, error)
POST/v1/organizations/rbac_groups/{rbac_group_id}

Update an RBAC Group's name. Groups provisioned by an identity provider (source type "scim") cannot be modified via the API while an organization in the tenant uses SCIM provisioning.

Delete RBAC Group
client.Beta.Organization.RBACGroups.Delete(ctx, rbacGroupID) (*BetaOrganizationRBACGroupDeleteResponse, error)
DELETE/v1/organizations/rbac_groups/{rbac_group_id}

Delete an RBAC Group. Groups provisioned by an identity provider (source type "scim") cannot be deleted via the API while an organization in the tenant uses SCIM provisioning.

BetaOrganizationRBAC GroupsMembers

List RBAC Group Members
client.Beta.Organization.RBACGroups.Members.List(ctx, rbacGroupID, query) (*PageCursor[BetaRBACGroupMember], error)
GET/v1/organizations/rbac_groups/{rbac_group_id}/members

List members of an RBAC Group.

Add RBAC Group Member
client.Beta.Organization.RBACGroups.Members.Add(ctx, rbacGroupID, body) (*BetaRBACGroupMember, error)
POST/v1/organizations/rbac_groups/{rbac_group_id}/members

Add a User to an RBAC Group. Membership of groups provisioned by an identity provider (source type "scim") cannot be modified via the API while an organization in the tenant uses SCIM provisioning.

Remove RBAC Group Member
client.Beta.Organization.RBACGroups.Members.Remove(ctx, userID, body) (*BetaOrganizationRBACGroupMemberRemoveResponse, error)
DELETE/v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}

Remove a User from an RBAC Group. Membership of groups provisioned by an identity provider (source type "scim") cannot be modified via the API while an organization in the tenant uses SCIM provisioning.

BetaOrganizationRBAC Roles

List RBAC Roles
client.Beta.Organization.RBACRoles.List(ctx, query) (*PageCursor[BetaRBACRole], error)
GET/v1/organizations/rbac_roles

List RBAC Roles in the organization.

Get RBAC Role
client.Beta.Organization.RBACRoles.Get(ctx, rbacRoleID) (*BetaRBACRole, error)
GET/v1/organizations/rbac_roles/{rbac_role_id}

Retrieve an RBAC Role by ID.

BetaOrganizationRBAC RolesPermissions

List RBAC Role Permissions
client.Beta.Organization.RBACRoles.Permissions.List(ctx, rbacRoleID, query) (*PageCursor[BetaRBACRolePermission], error)
GET/v1/organizations/rbac_roles/{rbac_role_id}/permissions

List the permissions an RBAC Role grants.

BetaOrganizationPlugins

Create Plugin
client.Beta.Organization.Plugins.New(ctx, params) (*BetaPlugin, error)
POST/v1/organizations/plugins

Create an organization-owned Plugin and its first version by uploading the version's files.

Get Plugin
client.Beta.Organization.Plugins.Get(ctx, pluginID, params) (*BetaPlugin, error)
GET/v1/organizations/plugins/{plugin_id}

Retrieve a Plugin by ID.

Update Plugin
client.Beta.Organization.Plugins.Update(ctx, pluginID, params) (*BetaPlugin, error)
POST/v1/organizations/plugins/{plugin_id}

Change which stored version of an organization-owned Plugin is served to members, for example to roll back to an earlier one. This pins the served version: later uploads are stored but no longer change what is served, and pinning cannot currently be undone, here or in claude.ai.

List Plugins
client.Beta.Organization.Plugins.List(ctx, params) (*PageCursor[BetaPlugin], error)
GET/v1/organizations/plugins

List the Plugins created under the organization, newest first: those in the organization's own plugin marketplaces and those in members' personal plugin marketplaces.

Delete Plugin
client.Beta.Organization.Plugins.Delete(ctx, pluginID, body) (*BetaDeletedPlugin, error)
DELETE/v1/organizations/plugins/{plugin_id}

Permanently delete a Plugin and every version it holds, exactly as when an administrator deletes it in claude.ai. The Plugin may belong to the organization or to a member, including a member who has since left the organization.

BetaOrganizationPluginsVersions

Create Plugin Version
client.Beta.Organization.Plugins.Versions.New(ctx, pluginID, params) (*BetaPluginVersion, error)
POST/v1/organizations/plugins/{plugin_id}/versions

Add a version to an organization-owned Plugin by uploading the new version's files; it becomes the version served to members unless the Plugin's served version has been pinned.

List Plugin Versions
client.Beta.Organization.Plugins.Versions.List(ctx, pluginID, params) (*PageCursor[BetaPluginVersion], error)
GET/v1/organizations/plugins/{plugin_id}/versions

List a Plugin's versions, newest first.

Get Plugin Version
client.Beta.Organization.Plugins.Versions.Get(ctx, version, params) (*BetaPluginVersion, error)
GET/v1/organizations/plugins/{plugin_id}/versions/{version}

Retrieve one version of a Plugin by its ID, or the Plugin's newest version.

Download Plugin Version Archive
client.Beta.Organization.Plugins.Versions.Download(ctx, version, params) (*Response, error)
GET/v1/organizations/plugins/{plugin_id}/versions/{version}/content

Download one version's .zip archive, exactly as stored. Each download of a Plugin from a member's personal plugin marketplace is recorded on the Compliance API activity feed.

BetaOrganizationPluginsInstallation Settings

List Plugin Installation Settings
client.Beta.Organization.Plugins.InstallationSettings.List(ctx, pluginID, params) (*PageCursor[BetaPluginInstallationSetting], error)
GET/v1/organizations/plugins/{plugin_id}/installation_settings

List an organization-owned Plugin's installation settings, which say which members it is for, most recently created first.

Set Plugin Installation Setting
client.Beta.Organization.Plugins.InstallationSettings.Set(ctx, target, params) (*BetaPluginInstallationSetting, error)
POST/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

Set or change an organization-owned Plugin's installation setting for the whole organization or for one RBAC Group.

Remove Plugin Installation Setting
client.Beta.Organization.Plugins.InstallationSettings.Remove(ctx, target, params) (*BetaDeletedPluginInstallationSetting, error)
DELETE/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

Remove an organization-owned Plugin's own installation setting for the whole organization or for one RBAC Group.

BetaOrganizationPluginsShares

List Plugin Shares
client.Beta.Organization.Plugins.Shares.List(ctx, pluginID, params) (*PageCursor[BetaPluginShare], error)
GET/v1/organizations/plugins/{plugin_id}/shares

List the shares the owner of a member-owned Plugin has given — to every member of the organization, to an RBAC Group, or to one member — most recently granted first.

BetaOrganizationPlugin Marketplaces

List Plugin Marketplaces
client.Beta.Organization.PluginMarketplaces.List(ctx, params) (*PageCursor[BetaPluginMarketplace], error)
GET/v1/organizations/plugin_marketplaces

List the plugin marketplaces Plugins live in, newest first: the organization's own and its members' personal ones.

Get Plugin Marketplace
client.Beta.Organization.PluginMarketplaces.Get(ctx, marketplaceID, params) (*BetaPluginMarketplace, error)
GET/v1/organizations/plugin_marketplaces/{marketplace_id}

Retrieve a plugin marketplace by ID.

Update Plugin Marketplace
client.Beta.Organization.PluginMarketplaces.Update(ctx, marketplaceID, params) (*BetaPluginMarketplace, error)
POST/v1/organizations/plugin_marketplaces/{marketplace_id}

Set the default installation setting of one of the organization's own plugin marketplaces. Every Plugin in it without a setting of its own gets this default as its organization-wide setting, including Plugins added later.

Validate Plugin Marketplace Repository
client.Beta.Organization.PluginMarketplaces.ValidateRepository(ctx, params) (*BetaPluginMarketplaceValidationReport, error)
POST/v1/organizations/plugin_marketplaces/validate_repository

Check whether a plugin marketplace held in a public GitHub repository would synchronize into claude.ai, without connecting or storing it.

Validate Plugin Marketplace Archive
client.Beta.Organization.PluginMarketplaces.ValidateArchive(ctx, params) (*BetaPluginMarketplaceValidationReport, error)
POST/v1/organizations/plugin_marketplaces/validate_archive

Check whether a plugin marketplace, uploaded as a .zip of the marketplace directory, would synchronize into claude.ai, without connecting or storing it.

BetaOrganizationTelemetry Destinations

Create a Telemetry Destination
client.Beta.Organization.TelemetryDestinations.New(ctx, params) (*BetaTelemetryDestination, error)
POST/v1/organizations/telemetry_destinations

Register an OpenTelemetry destination for the organization.

List Telemetry Destinations
client.Beta.Organization.TelemetryDestinations.List(ctx, params) (*PageCursor[BetaTelemetryDestination], error)
GET/v1/organizations/telemetry_destinations

List the organization's destinations, newest first, optionally only those that cover given workspaces.

Retrieve a Telemetry Destination
client.Beta.Organization.TelemetryDestinations.Get(ctx, destinationID, query) (*BetaTelemetryDestination, error)
GET/v1/organizations/telemetry_destinations/{destination_id}

Read a destination's configuration, state, and most recent delivery results.

Update a Telemetry Destination
client.Beta.Organization.TelemetryDestinations.Update(ctx, destinationID, params) (*BetaTelemetryDestination, error)
POST/v1/organizations/telemetry_destinations/{destination_id}

Change a telemetry destination's settings, its state, or which workspaces it covers.

Delete a Telemetry Destination
client.Beta.Organization.TelemetryDestinations.Delete(ctx, destinationID, body) (*BetaDeletedTelemetryDestination, error)
DELETE/v1/organizations/telemetry_destinations/{destination_id}

Delete a destination and its workspace list.

Test a Telemetry Destination
client.Beta.Organization.TelemetryDestinations.Test(ctx, destinationID, body) (*BetaTelemetryDestinationTestResponse, error)
POST/v1/organizations/telemetry_destinations/{destination_id}/test

Send one test span, named anthropic.test, to the destination with its registered headers, once and without retries, and report the destination's answer. The response is 200 whether or not the destination answered with a 2xx status: its result has the type success, or the type failure and the reason in error. The destination's configuration, state and delivery_health do not change. A disabled destination can be tested too. Wait 10 seconds between tests of one destination; a request that comes sooner may be answered with status 429.

BetaOrganizationTelemetry DestinationsWorkspaces

List Telemetry Destination Workspaces
client.Beta.Organization.TelemetryDestinations.Workspaces.List(ctx, destinationID, params) (*PageCursor[BetaTelemetryDestinationWorkspace], error)
GET/v1/organizations/telemetry_destinations/{destination_id}/workspaces

List the workspaces on a destination's workspace list, newest entry first.

Add a Telemetry Destination Workspace
client.Beta.Organization.TelemetryDestinations.Workspaces.Add(ctx, workspaceID, params) (*BetaTelemetryDestinationWorkspace, error)
POST/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}

Add one workspace to a destination's workspace list.

Remove a Telemetry Destination Workspace
client.Beta.Organization.TelemetryDestinations.Workspaces.Remove(ctx, workspaceID, params) (*BetaDeletedTelemetryDestinationWorkspace, error)
DELETE/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}

Remove one workspace from a destination's workspace list.