Organization
Get Current Organization
organization.retrieve() -> OrganizationInfoRetrieve information about the organization associated with the authenticated API key.
Models
OrganizationAPI Keys
Retrieve API Key (Admin API)
organization.api_keys.retrieve(api_key_id) -> APIKeyRetrieve 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
organization.api_keys.update(api_key_id, **kwargs) -> APIKeyOrganizationExternal Keys
Create External Key
organization.external_keys.create(**kwargs) -> ExternalKeyCreate an external key config owned by the caller's organization.
List External Keys
organization.external_keys.list(**kwargs) -> SyncPageCursor[ExternalKey]List external key configs in the caller's organization.
Get External Key
organization.external_keys.retrieve(external_key_id) -> ExternalKeyRetrieve a single external key config in the caller's organization by ID.
Update External Key
organization.external_keys.update(external_key_id, **kwargs) -> ExternalKeyPartially update an external key config. Omitted fields are left unchanged.
Delete External Key
organization.external_keys.delete(external_key_id) -> ExternalKeyDeleteResponseDelete an external key config.
Validate External Key
organization.external_keys.validate(external_key_id) -> ExternalKeyValidateResponseValidate an external key config against the customer's KMS.
OrganizationFederationIssuers
Create Federation Issuer
organization.federation.issuers.create(**kwargs) -> FederationIssuerRequires 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
organization.federation.issuers.list(**kwargs) -> SyncPageCursor[FederationIssuer]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
organization.federation.issuers.retrieve(federation_issuer_id) -> FederationIssuerRequires 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
organization.federation.issuers.update(federation_issuer_id, **kwargs) -> FederationIssuerRequires 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
organization.federation.issuers.archive(federation_issuer_id) -> FederationIssuerRequires 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.
OrganizationFederationRules
Create Federation Rule
organization.federation.rules.create(**kwargs) -> FederationRuleRequires 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
organization.federation.rules.list(**kwargs) -> SyncPageCursor[FederationRule]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
organization.federation.rules.retrieve(federation_rule_id) -> FederationRuleRequires 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
organization.federation.rules.update(federation_rule_id, **kwargs) -> FederationRuleRequires 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
organization.federation.rules.archive(federation_rule_id) -> FederationRuleRequires 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.
OrganizationFederationRulesWorkspaces
Add Federation Rule Workspace
organization.federation.rules.workspaces.add(federation_rule_id, **kwargs) -> FederationRuleWorkspaceRequires 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
organization.federation.rules.workspaces.list(federation_rule_id, **kwargs) -> SyncPageCursor[FederationRuleWorkspace]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
organization.federation.rules.workspaces.remove(workspace_id, **kwargs) -> WorkspaceRemoveResponseRequires 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.
OrganizationInvites
Create Invite
organization.invites.create(**kwargs) -> OrganizationInviteInvite a user to join the organization by email.
List Invites
organization.invites.list(**kwargs) -> SyncPage[OrganizationInvite]List the organization's invites.
Get Invite
organization.invites.retrieve(invite_id) -> OrganizationInviteRetrieve an invite by ID.
Delete Invite
organization.invites.delete(invite_id) -> InviteDeleteResponseDelete a pending invite.
OrganizationService Accounts
Create Service Account
organization.service_accounts.create(**kwargs) -> ServiceAccountRequires 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
organization.service_accounts.list(**kwargs) -> SyncPageCursor[ServiceAccount]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
organization.service_accounts.retrieve(service_account_id) -> ServiceAccountRequires 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
organization.service_accounts.update(service_account_id, **kwargs) -> ServiceAccountRequires 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
organization.service_accounts.archive(service_account_id) -> ServiceAccountRequires 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.
OrganizationService AccountsWorkspaces
Add Workspace To Service Account
organization.service_accounts.workspaces.add(service_account_id, **kwargs) -> ServiceAccountWorkspaceMemberRequires 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
organization.service_accounts.workspaces.list(service_account_id, **kwargs) -> SyncPageCursor[ServiceAccountWorkspaceMember]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
organization.service_accounts.workspaces.remove(workspace_id, **kwargs) -> WorkspaceRemoveResponseRequires 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.
OrganizationUsers
List Users
organization.users.list(**kwargs) -> SyncPage[OrganizationUser]List the organization's members.
Get User
organization.users.retrieve(user_id) -> OrganizationUserRetrieve a member of the organization by user ID.
Update User
organization.users.update(user_id, **kwargs) -> OrganizationUserUpdate a member's organization role.
Remove User
organization.users.remove(user_id) -> UserRemoveResponseRemove a member from the organization.
OrganizationWorkspaces
List Workspaces
organization.workspaces.list(**kwargs) -> SyncPage[Workspace]Create Workspace
organization.workspaces.create(**kwargs) -> WorkspaceGet Workspace
organization.workspaces.retrieve(workspace_id) -> WorkspaceUpdate Workspace
organization.workspaces.update(workspace_id, **kwargs) -> WorkspaceArchive Workspace
organization.workspaces.archive(workspace_id) -> WorkspaceOrganizationWorkspacesRate Limits
List Workspace Rate Limits
organization.workspaces.rate_limits.list(workspace_id, **kwargs) -> SyncPageCursor[WorkspaceRateLimit]List a workspace's rate limits.
OrganizationWorkspacesMembers
List Workspace Members
organization.workspaces.members.list(workspace_id, **kwargs) -> SyncPage[WorkspaceMember]Create Workspace Member
organization.workspaces.members.add(workspace_id, **kwargs) -> WorkspaceMemberGet Workspace Member
organization.workspaces.members.retrieve(user_id, **kwargs) -> WorkspaceMemberUpdate Workspace Member
organization.workspaces.members.update(user_id, **kwargs) -> WorkspaceMemberDelete Workspace Member
organization.workspaces.members.remove(user_id, **kwargs) -> MemberRemoveResponseOrganizationWorkspacesService Accounts
List Service Account Workspace Members
organization.workspaces.service_accounts.list(workspace_id, **kwargs) -> SyncPageCursor[ServiceAccountWorkspaceMember]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
organization.workspaces.service_accounts.add(workspace_id, **kwargs) -> ServiceAccountWorkspaceMemberRequires 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
organization.workspaces.service_accounts.retrieve(service_account_id, **kwargs) -> ServiceAccountWorkspaceMemberRequires 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
organization.workspaces.service_accounts.update(service_account_id, **kwargs) -> ServiceAccountWorkspaceMemberRequires 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
organization.workspaces.service_accounts.remove(service_account_id, **kwargs) -> ServiceAccountRemoveResponseRequires 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.
OrganizationRate Limits
List Organization Rate Limits
organization.rate_limits.list(**kwargs) -> SyncPageCursor[OrganizationRateLimit]List Messages API rate limits for your organization.
OrganizationCompliance Settings
Get Compliance Settings
organization.compliance_settings.retrieve() -> OrganizationComplianceSettingsRetrieve your organization's Compliance Settings.
Update Compliance Settings
organization.compliance_settings.update(**kwargs) -> OrganizationComplianceSettingsUpdate your organization's Compliance Settings.