Claude Platform Docs

組織

取得目前組織
client.Organization.Get(ctx) (*OrganizationInfo, error)
GET/v1/organizations/me

擷取與已驗證 API 金鑰相關聯之組織的資訊。

Models
type APIKeyRequesterUnconfirmedErrorDetails struct { ErrorCode }
ErrorCode APIKeyRequesterUnconfirmedErrorCode
type ChangeOutcomeUnknownErrorDetails struct { ErrorCode }
ErrorCode ChangeOutcomeUnknownErrorCode
type ConcurrentMembershipChangeErrorDetails struct { ErrorCode }
ErrorCode ConcurrentMembershipChangeErrorCode
type OrgMemberLimitExceededErrorDetails struct { ErrorCode }
ErrorCode OrgMemberLimitExceededErrorCode
type OrganizationInfo struct { Type: "organization"; ID; Name }
Type Organization

Object type.

For Organizations, this is always "organization".

defaultorganization
ID string

ID of the Organization.

formatuuid
Name string

Name of the Organization.

type OrganizationRole string
One of the following:
const OrganizationRoleAdmin OrganizationRole = "admin"
const OrganizationRoleBilling OrganizationRole = "billing"
const OrganizationRoleClaudeCodeUser OrganizationRole = "claude_code_user"
const OrganizationRoleDeveloper OrganizationRole = "developer"
const OrganizationRoleManaged OrganizationRole = "managed"
const OrganizationRoleMembershipAdmin OrganizationRole = "membership_admin"
const OrganizationRoleOwner OrganizationRole = "owner"
const OrganizationRolePrimaryOwner OrganizationRole = "primary_owner"
const OrganizationRoleUser OrganizationRole = "user"
type RBACRoleNotFoundErrorDetails struct { ErrorCode }
ErrorCode RBACRoleNotFoundErrorCode
Errors
const ErrorCodeOrgMemberLimitExceeded ErrorCode = "org_member_limit_exceeded"⁠HTTP status 400

The organization has reached the member limit that Anthropic set for it. Pending invites count toward the limit.

const ErrorCodeAPIKeyRequesterUnconfirmed ErrorCode = "api_key_requester_unconfirmed"⁠HTTP status 403

The API could not confirm that this request came from your organization, so it refused a change to an API key. If you were updating an API key, the key did not change. If you were archiving a service account, it is archived, but some of its API keys are not. If you were removing a user, they are still a member, but they may be signed out and some of their API keys may be turned off. It is safe to send the same request again. If the error continues, contact Anthropic support and give them the request_id from this response.

const ErrorCodeRBACRoleNotFound ErrorCode = "rbac_role_not_found"⁠HTTP status 404

No RBAC Role with this ID was found.

const ErrorCodeConcurrentMembershipChange ErrorCode = "concurrent_membership_change"⁠HTTP status 409

Another change to the organization's members is in progress. Retry the request once it completes.

const ErrorCodeChangeOutcomeUnknown ErrorCode = "change_outcome_unknown"⁠HTTP status 503

Some of the request's changes may have been saved and others not. Send the same request again to finish it; changes already saved aren't repeated.

組織API 金鑰

列出 API 金鑰
client.Organization.APIKeys.List(ctx, query) (*Page[APIKey], error)
GET/v1/organizations/api_keys
擷取 API 金鑰(Admin API)
client.Organization.APIKeys.Get(ctx, apiKeyID) (*APIKey, error)
GET/v1/organizations/api_keys/{api_key_id}

依 ID 查詢並擷取您組織中單一 API 金鑰的資訊。此 Admin API 端點需要 Admin API 金鑰,適用於以程式方式管理金鑰,且絕不會傳回金鑰的秘密值。若要檢視或建立您自己的 API 金鑰,請前往 Claude Console 中的 API 金鑰。

更新 API 金鑰
client.Organization.APIKeys.Update(ctx, apiKeyID, body) (*APIKey, error)
POST/v1/organizations/api_keys/{api_key_id}

組織外部金鑰

建立外部金鑰
client.Organization.ExternalKeys.New(ctx, body) (*ExternalKey, error)
POST/v1/organizations/external_keys

建立由呼叫者組織擁有的外部金鑰設定。

列出外部金鑰
client.Organization.ExternalKeys.List(ctx, query) (*PageCursor[ExternalKey], error)
GET/v1/organizations/external_keys

列出呼叫者組織中的外部金鑰設定。

取得外部金鑰
client.Organization.ExternalKeys.Get(ctx, externalKeyID) (*ExternalKey, error)
GET/v1/organizations/external_keys/{external_key_id}

依 ID 擷取呼叫者組織中的單一外部金鑰設定。

更新外部金鑰
client.Organization.ExternalKeys.Update(ctx, externalKeyID, body) (*ExternalKey, error)
POST/v1/organizations/external_keys/{external_key_id}

部分更新外部金鑰設定。省略的欄位將保持不變。

刪除外部金鑰
client.Organization.ExternalKeys.Delete(ctx, externalKeyID) (*OrganizationExternalKeyDeleteResponse, error)
DELETE/v1/organizations/external_keys/{external_key_id}

刪除外部金鑰設定。

驗證外部金鑰
client.Organization.ExternalKeys.Validate(ctx, externalKeyID) (*OrganizationExternalKeyValidateResponse, error)
POST/v1/organizations/external_keys/{external_key_id}/validate

針對客戶的 KMS 驗證外部金鑰設定。

組織聯合簽發者

建立聯合簽發者
client.Organization.Federation.Issuers.New(ctx, body) (*FederationIssuer, error)
POST/v1/organizations/federation_issuers

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

列出聯合簽發者
client.Organization.Federation.Issuers.List(ctx, query) (*PageCursor[FederationIssuer], error)
GET/v1/organizations/federation_issuers

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

取得聯合簽發者
client.Organization.Federation.Issuers.Get(ctx, federationIssuerID) (*FederationIssuer, error)
GET/v1/organizations/federation_issuers/{federation_issuer_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

更新聯合簽發者
client.Organization.Federation.Issuers.Update(ctx, federationIssuerID, body) (*FederationIssuer, error)
POST/v1/organizations/federation_issuers/{federation_issuer_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

封存聯合簽發者
client.Organization.Federation.Issuers.Archive(ctx, federationIssuerID) (*FederationIssuer, error)
POST/v1/organizations/federation_issuers/{federation_issuer_id}/archive

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

組織聯合規則

建立聯合規則
client.Organization.Federation.Rules.New(ctx, body) (*FederationRule, error)
POST/v1/organizations/federation_rules

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

列出聯合規則
client.Organization.Federation.Rules.List(ctx, query) (*PageCursor[FederationRule], error)
GET/v1/organizations/federation_rules

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

取得聯合規則
client.Organization.Federation.Rules.Get(ctx, federationRuleID) (*FederationRule, error)
GET/v1/organizations/federation_rules/{federation_rule_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

更新聯合規則
client.Organization.Federation.Rules.Update(ctx, federationRuleID, body) (*FederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

封存聯合規則
client.Organization.Federation.Rules.Archive(ctx, federationRuleID) (*FederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/archive

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

組織聯合規則工作區

新增聯合規則工作區
client.Organization.Federation.Rules.Workspaces.Add(ctx, federationRuleID, body) (*FederationRuleWorkspace, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/workspaces

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

列出聯合規則工作區
client.Organization.Federation.Rules.Workspaces.List(ctx, federationRuleID, query) (*PageCursor[FederationRuleWorkspace], error)
GET/v1/organizations/federation_rules/{federation_rule_id}/workspaces

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

移除聯合規則工作區
client.Organization.Federation.Rules.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationFederationRuleWorkspaceRemoveResponse, error)
DELETE/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

組織邀請

建立邀請
client.Organization.Invites.New(ctx, body) (*OrganizationInvite, error)
POST/v1/organizations/invites

透過電子郵件邀請使用者加入組織。

列出邀請
client.Organization.Invites.List(ctx, query) (*Page[OrganizationInvite], error)
GET/v1/organizations/invites

列出組織的邀請。

取得邀請
client.Organization.Invites.Get(ctx, inviteID) (*OrganizationInvite, error)
GET/v1/organizations/invites/{invite_id}

依 ID 擷取邀請。

刪除邀請
client.Organization.Invites.Delete(ctx, inviteID) (*OrganizationInviteDeleteResponse, error)
DELETE/v1/organizations/invites/{invite_id}

刪除待處理的邀請。

組織服務帳戶

建立服務帳戶
client.Organization.ServiceAccounts.New(ctx, body) (*ServiceAccount, error)
POST/v1/organizations/service_accounts

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

列出服務帳戶
client.Organization.ServiceAccounts.List(ctx, query) (*PageCursor[ServiceAccount], error)
GET/v1/organizations/service_accounts

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

取得服務帳戶
client.Organization.ServiceAccounts.Get(ctx, serviceAccountID) (*ServiceAccount, error)
GET/v1/organizations/service_accounts/{service_account_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

更新服務帳戶
client.Organization.ServiceAccounts.Update(ctx, serviceAccountID, body) (*ServiceAccount, error)
POST/v1/organizations/service_accounts/{service_account_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

封存服務帳戶
client.Organization.ServiceAccounts.Archive(ctx, serviceAccountID) (*ServiceAccount, error)
POST/v1/organizations/service_accounts/{service_account_id}/archive

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

組織服務帳戶工作區

將工作區新增至服務帳戶
client.Organization.ServiceAccounts.Workspaces.Add(ctx, serviceAccountID, body) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/service_accounts/{service_account_id}/workspaces

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

列出服務帳戶的工作區
client.Organization.ServiceAccounts.Workspaces.List(ctx, serviceAccountID, query) (*PageCursor[ServiceAccountWorkspaceMember], error)
GET/v1/organizations/service_accounts/{service_account_id}/workspaces

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

從服務帳戶移除工作區
client.Organization.ServiceAccounts.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationServiceAccountWorkspaceRemoveResponse, error)
DELETE/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

組織使用者

列出使用者
client.Organization.Users.List(ctx, query) (*Page[OrganizationUser], error)
GET/v1/organizations/users

列出組織的成員。

取得使用者
client.Organization.Users.Get(ctx, userID) (*OrganizationUser, error)
GET/v1/organizations/users/{user_id}

依使用者 ID 擷取組織成員。

更新使用者
client.Organization.Users.Update(ctx, userID, body) (*OrganizationUser, error)
POST/v1/organizations/users/{user_id}

更新成員的組織角色。

移除使用者
client.Organization.Users.Remove(ctx, userID) (*OrganizationUserRemoveResponse, error)
DELETE/v1/organizations/users/{user_id}

從組織中移除成員。

組織工作區

列出工作區
client.Organization.Workspaces.List(ctx, query) (*Page[Workspace], error)
GET/v1/organizations/workspaces
建立工作區
client.Organization.Workspaces.New(ctx, body) (*Workspace, error)
POST/v1/organizations/workspaces
取得工作區
client.Organization.Workspaces.Get(ctx, workspaceID) (*Workspace, error)
GET/v1/organizations/workspaces/{workspace_id}
更新工作區
client.Organization.Workspaces.Update(ctx, workspaceID, body) (*Workspace, error)
POST/v1/organizations/workspaces/{workspace_id}
封存工作區
client.Organization.Workspaces.Archive(ctx, workspaceID) (*Workspace, error)
POST/v1/organizations/workspaces/{workspace_id}/archive

組織工作區速率限制

列出工作區速率限制
client.Organization.Workspaces.RateLimits.List(ctx, workspaceID, query) (*PageCursor[WorkspaceRateLimit], error)
GET/v1/organizations/workspaces/{workspace_id}/rate_limits

列出工作區的速率限制。

設定工作區速率限制
client.Organization.Workspaces.RateLimits.Update(ctx, rateLimitID, params) (*WorkspaceRateLimit, error)
POST/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}

為工作區中的單一速率限制群組設定或清除速率限制覆寫。

組織工作區成員

列出工作區成員
client.Organization.Workspaces.Members.List(ctx, workspaceID, query) (*Page[WorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/members
建立工作區成員
client.Organization.Workspaces.Members.Add(ctx, workspaceID, body) (*WorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members
取得工作區成員
client.Organization.Workspaces.Members.Get(ctx, userID, query) (*WorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/members/{user_id}
更新工作區成員
client.Organization.Workspaces.Members.Update(ctx, userID, params) (*WorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/members/{user_id}
刪除工作區成員
client.Organization.Workspaces.Members.Remove(ctx, userID, body) (*OrganizationWorkspaceMemberRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/members/{user_id}

組織工作區服務帳戶

列出服務帳戶工作區成員
client.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, query) (*PageCursor[ServiceAccountWorkspaceMember], error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

建立服務帳戶工作區成員
client.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, body) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

取得服務帳戶工作區成員
client.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, query) (*ServiceAccountWorkspaceMember, error)
GET/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

更新服務帳戶工作區成員
client.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*ServiceAccountWorkspaceMember, error)
POST/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合(workload identity federation)規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

刪除服務帳戶工作區成員
client.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, body) (*OrganizationWorkspaceServiceAccountRemoveResponse, error)
DELETE/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}

需要具有 org:admin 範圍的 OAuth 存取權杖,可透過 ant auth login --scope org:admin 或工作負載身分聯合規則取得;不接受 Admin API 金鑰。請參閱使用 Admin API 管理 WIF。

組織速率限制

列出組織速率限制
client.Organization.RateLimits.List(ctx, query) (*PageCursor[OrganizationRateLimit], error)
GET/v1/organizations/rate_limits

列出您組織的 Messages API 速率限制。

組織合規設定

取得合規設定
client.Organization.ComplianceSettings.Get(ctx) (*OrganizationComplianceSettings, error)
GET/v1/organizations/compliance_settings

擷取您組織的合規設定。

更新合規設定
client.Organization.ComplianceSettings.Update(ctx, body) (*OrganizationComplianceSettings, error)
POST/v1/organizations/compliance_settings

更新您組織的合規設定。

組織分析摘要

取得活動摘要
client.Organization.Analytics.Summaries.List(ctx, query) (*PageCursor[AnalyticsSingleDayActivitySummary], error)
GET/v1/organizations/analytics/summaries

取得指定日期範圍內的全組織活動摘要。

組織分析使用者

列出使用者活動
client.Organization.Analytics.Users.List(ctx, query) (*PageCursor[AnalyticsUserActivity], error)
GET/v1/organizations/analytics/users

取得指定日期的每位使用者活動,採用游標式分頁。

組織分析應用程式聊天專案

取得聊天專案用量
client.Organization.Analytics.Apps.Chat.Projects.List(ctx, query) (*PageCursor[AnalyticsProjectActivity], error)
GET/v1/organizations/analytics/apps/chat/projects

取得指定日期的每個專案活動,並支援以游標為基礎的分頁。

組織分析連接器

取得連接器使用量
client.Organization.Analytics.Connectors.List(ctx, query) (*PageCursor[AnalyticsConnectorActivity], error)
GET/v1/organizations/analytics/connectors

取得指定日期的每個連接器用量,採用游標式分頁。

組織分析外掛程式

取得外掛程式使用量
client.Organization.Analytics.Plugins.List(ctx, query) (*PageCursor[AnalyticsPluginActivity], error)
GET/v1/organizations/analytics/plugins

取得指定日期的每個外掛程式安裝與呼叫用量,採用分頁。

組織分析技能

取得技能使用量
client.Organization.Analytics.Skills.List(ctx, query) (*PageCursor[AnalyticsSkillActivity], error)
GET/v1/organizations/analytics/skills

取得指定日期的每項技能用量,採用游標式分頁。

組織分析Artifacts

取得 Artifact 活動
client.Organization.Analytics.Artifacts.List(ctx, query) (*PageCursor[AnalyticsArtifactActivity], error)
GET/v1/organizations/analytics/artifacts

取得指定日期的 artifact 建立活動,依 MIME 類型細分。

組織支出限制有效

列出有效支出限制
client.Organization.SpendLimits.Effective.List(ctx, query) (*PageCursor[SpendSummary], error)
GET/v1/organizations/spend_limits/effective

列出每位成員的有效支出限制及本期至今的支出。

組織支出限制提高請求

列出支出限制提高請求
client.Organization.SpendLimits.IncreaseRequests.List(ctx, query) (*PageCursor[SpendLimitIncreaseRequest], error)
GET/v1/organizations/spend_limit_increase_requests

列出支出限制提高請求,最新的在前。

取得支出限制提高請求
client.Organization.SpendLimits.IncreaseRequests.Get(ctx, spendLimitIncreaseRequestID) (*SpendLimitIncreaseRequest, error)
GET/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}

擷取支出限制提高請求。

核准支出限制提高請求
client.Organization.SpendLimits.IncreaseRequests.Approve(ctx, spendLimitIncreaseRequestID, body) (*OrganizationSpendLimitIncreaseRequestApproveResponse, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/approve

核准待處理的支出限制提高請求。

拒絕支出限制提高請求
client.Organization.SpendLimits.IncreaseRequests.Deny(ctx, spendLimitIncreaseRequestID, body) (*SpendLimitIncreaseRequest, error)
POST/v1/organizations/spend_limit_increase_requests/{spend_limit_increase_request_id}/deny

拒絕待處理的支出限制提高請求。

組織RBAC 群組

建立 RBAC 群組
client.Organization.RBACGroups.New(ctx, body) (*RBACGroup, error)
POST/v1/organizations/rbac_groups

在 Claude Enterprise 租戶中建立 RBAC 群組。透過 API 建立的群組其來源類型為 "direct"。

列出 RBAC 群組
client.Organization.RBACGroups.List(ctx, query) (*PageCursor[RBACGroup], error)
GET/v1/organizations/rbac_groups

列出 Claude Enterprise 租戶中的 RBAC 群組。

取得 RBAC 群組
client.Organization.RBACGroups.Get(ctx, rbacGroupID) (*RBACGroup, error)
GET/v1/organizations/rbac_groups/{rbac_group_id}

依 ID 擷取 RBAC 群組。

更新 RBAC 群組
client.Organization.RBACGroups.Update(ctx, rbacGroupID, body) (*RBACGroup, error)
POST/v1/organizations/rbac_groups/{rbac_group_id}

更新 RBAC 群組的名稱。當租用戶中的組織使用 SCIM 佈建時,由身分識別提供者佈建的群組(來源類型為 "scim")無法透過 API 修改。

刪除 RBAC 群組
client.Organization.RBACGroups.Delete(ctx, rbacGroupID) (*DeletedRBACGroup, error)
DELETE/v1/organizations/rbac_groups/{rbac_group_id}

刪除 RBAC 群組。當租用戶中的組織使用 SCIM 佈建時,由身分識別提供者佈建的群組(來源類型為 "scim")無法透過 API 刪除。

組織RBAC 群組成員

列出 RBAC 群組成員
client.Organization.RBACGroups.Members.List(ctx, rbacGroupID, query) (*PageCursor[RBACGroupMember], error)
GET/v1/organizations/rbac_groups/{rbac_group_id}/members

列出 RBAC 群組的成員。

新增 RBAC 群組成員
client.Organization.RBACGroups.Members.Add(ctx, rbacGroupID, body) (*RBACGroupMember, error)
POST/v1/organizations/rbac_groups/{rbac_group_id}/members

將使用者新增至 RBAC 群組。當租用戶中的組織使用 SCIM 佈建時,由身分識別提供者佈建的群組(來源類型為 "scim")其成員資格無法透過 API 修改。

移除 RBAC 群組成員
client.Organization.RBACGroups.Members.Remove(ctx, userID, body) (*DeletedRBACGroupMember, error)
DELETE/v1/organizations/rbac_groups/{rbac_group_id}/members/{user_id}

從 RBAC 群組中移除使用者。當租用戶中的組織使用 SCIM 佈建時,由身分識別提供者佈建的群組(來源類型為 "scim")其成員資格無法透過 API 修改。

組織RBAC 角色

列出 RBAC 角色
client.Organization.RBACRoles.List(ctx, query) (*PageCursor[RBACRole], error)
GET/v1/organizations/rbac_roles

列出組織中的 RBAC 角色。

取得 RBAC 角色
client.Organization.RBACRoles.Get(ctx, rbacRoleID) (*RBACRole, error)
GET/v1/organizations/rbac_roles/{rbac_role_id}

依 ID 擷取 RBAC 角色。

組織RBAC 角色權限

列出 RBAC 角色權限
client.Organization.RBACRoles.Permissions.List(ctx, rbacRoleID, query) (*PageCursor[RBACRolePermission], error)
GET/v1/organizations/rbac_roles/{rbac_role_id}/permissions

列出 RBAC 角色所授予的權限。