Claude Platform Docs

Organization

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

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

Models
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"

OrganizationAPI Keys

List API Keys
client.Organization.APIKeys.List(ctx, query) (*Page[APIKey], error)
GET/v1/organizations/api_keys
Retrieve API Key (Admin API)
client.Organization.APIKeys.Get(ctx, apiKeyID) (*APIKey, 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.Organization.APIKeys.Update(ctx, apiKeyID, body) (*APIKey, error)
POST/v1/organizations/api_keys/{api_key_id}

OrganizationExternal Keys

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

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

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

List external key configs in the caller's organization.

Get External Key
client.Organization.ExternalKeys.Get(ctx, externalKeyID) (*ExternalKey, 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.Organization.ExternalKeys.Update(ctx, externalKeyID, body) (*ExternalKey, error)
POST/v1/organizations/external_keys/{external_key_id}

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

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

Delete an external key config.

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

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

OrganizationFederationIssuers

Create Federation Issuer
client.Organization.Federation.Issuers.New(ctx, body) (*FederationIssuer, 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.Organization.Federation.Issuers.List(ctx, query) (*PageCursor[FederationIssuer], 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.Organization.Federation.Issuers.Get(ctx, federationIssuerID) (*FederationIssuer, 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.Organization.Federation.Issuers.Update(ctx, federationIssuerID, body) (*FederationIssuer, 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.Organization.Federation.Issuers.Archive(ctx, federationIssuerID) (*FederationIssuer, 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.

OrganizationFederationRules

Create Federation Rule
client.Organization.Federation.Rules.New(ctx, body) (*FederationRule, 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.Organization.Federation.Rules.List(ctx, query) (*PageCursor[FederationRule], 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.Organization.Federation.Rules.Get(ctx, federationRuleID) (*FederationRule, 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.Organization.Federation.Rules.Update(ctx, federationRuleID, body) (*FederationRule, 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.Organization.Federation.Rules.Archive(ctx, federationRuleID) (*FederationRule, 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.

OrganizationFederationRulesWorkspaces

Add Federation Rule Workspace
client.Organization.Federation.Rules.Workspaces.Add(ctx, federationRuleID, body) (*FederationRuleWorkspace, 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.Organization.Federation.Rules.Workspaces.List(ctx, federationRuleID, query) (*PageCursor[FederationRuleWorkspace], 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.Organization.Federation.Rules.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationFederationRuleWorkspaceRemoveResponse, 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.

OrganizationInvites

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

Invite a user to join the organization by email.

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

List the organization's invites.

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

Retrieve an invite by ID.

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

Delete a pending invite.

OrganizationService Accounts

Create Service Account
client.Organization.ServiceAccounts.New(ctx, body) (*ServiceAccount, 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.Organization.ServiceAccounts.List(ctx, query) (*PageCursor[ServiceAccount], 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.Organization.ServiceAccounts.Get(ctx, serviceAccountID) (*ServiceAccount, 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.Organization.ServiceAccounts.Update(ctx, serviceAccountID, body) (*ServiceAccount, 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.Organization.ServiceAccounts.Archive(ctx, serviceAccountID) (*ServiceAccount, 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.

OrganizationService AccountsWorkspaces

Add Workspace To Service Account
client.Organization.ServiceAccounts.Workspaces.Add(ctx, serviceAccountID, body) (*ServiceAccountWorkspaceMember, 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.Organization.ServiceAccounts.Workspaces.List(ctx, serviceAccountID, query) (*PageCursor[ServiceAccountWorkspaceMember], 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.Organization.ServiceAccounts.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationServiceAccountWorkspaceRemoveResponse, 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.

OrganizationUsers

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

List the organization's members.

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

Retrieve a member of the organization by user ID.

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

Update a member's organization role.

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

Remove a member from the organization.

OrganizationWorkspaces

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

OrganizationWorkspacesRate Limits

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

List a workspace's rate limits.

OrganizationWorkspacesMembers

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

OrganizationWorkspacesService Accounts

List Service Account Workspace Members
client.Organization.Workspaces.ServiceAccounts.List(ctx, workspaceID, query) (*PageCursor[ServiceAccountWorkspaceMember], 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.Organization.Workspaces.ServiceAccounts.Add(ctx, workspaceID, body) (*ServiceAccountWorkspaceMember, 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.Organization.Workspaces.ServiceAccounts.Get(ctx, serviceAccountID, query) (*ServiceAccountWorkspaceMember, 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.Organization.Workspaces.ServiceAccounts.Update(ctx, serviceAccountID, params) (*ServiceAccountWorkspaceMember, 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.Organization.Workspaces.ServiceAccounts.Remove(ctx, serviceAccountID, body) (*OrganizationWorkspaceServiceAccountRemoveResponse, 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.

OrganizationRate Limits

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

List Messages API rate limits for your organization.

OrganizationCompliance Settings

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

Retrieve your organization's Compliance Settings.

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

Update your organization's Compliance Settings.