Claude Platform Docs

Rules

Create Federation Rule
$client->beta->organization->federation->rules->create(string issuerID, BetaFederationRuleMatch match, string name, string oauthScope, BetaServiceAccountTarget target, ?bool appliesToAllWorkspaces, ?array<string,string> attributes, ?string description, ?int tokenLifetimeSeconds, ?string workspaceID, ?list<AnthropicBeta> betas): BetaFederationRule
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(?bool includeArchived, ?string issuerID, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<BetaFederationRule>
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->retrieve(string federationRuleID, ?list<AnthropicBeta> betas): BetaFederationRule
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(string federationRuleID, ?bool appliesToAllWorkspaces, ?array<string,string> attributes, ?string description, ?BetaFederationRuleMatch match, ?string name, ?string oauthScope, ?BetaServiceAccountTarget target, ?int tokenLifetimeSeconds, ?string workspaceID, ?list<AnthropicBeta> betas): BetaFederationRule
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(string federationRuleID, ?list<AnthropicBeta> betas): BetaFederationRule
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.

Models
class BetaFederationRule { $type = 'federation_rule'; $id; $appliesToAllWorkspaces; /* 17 more */ }
class BetaFederationRuleMatch { $audience; $claims; $condition; $subjectPrefix; }
?string audience

Exact match against the aud claim (any element if array). When omitted, the JWT's aud must still equal Anthropic's expected audience for the issuer; setting this field overrides that default.

?array<string,string> claims

Exact-match {claim: value} pairs against top-level claims. Only string-valued claims can be matched; use condition for non-string claims.

?string condition

CEL expression over claims for logic the structural fields can't express. Must evaluate to a boolean and may reference only the claims variable; a constant-true expression (such as true) is rejected with 400.

?string subjectPrefix

Match the verified JWT sub claim. Exact match unless the value ends with *, in which case it is a prefix match. Example: repo:my-org/my-repo:ref:refs/heads/main.

class BetaFederationRuleWorkspace { $type = 'federation_rule_workspace'; $createdAt; $createdByActorID; /* 3 more */ }
"federation_rule_workspace" type
\Datetime createdAt

When this workspace was enabled for the rule.

?string createdByActorID

Tagged ID (user_... or svac_...) of the actor that enabled this workspace for the rule, if known.

string federationRuleID

Tagged ID of the federation rule.

string workspaceID

Tagged ID of the workspace this rule is enabled for.

?string workspaceName

Workspace display name. Populated when listing; null in the enable response.

class BetaServiceAccountTarget { $type = 'service_account'; $serviceAccountID; $serviceAccountName; }
"service_account" type
string serviceAccountID

Tagged ID of the service account to mint tokens for.

?string serviceAccountName

Service account's display name at read time. Ignored on writes.

RulesWorkspaces

Add Federation Rule Workspace
$client->beta->organization->federation->rules->workspaces->add(string federationRuleID, string workspaceID, ?list<AnthropicBeta> betas): BetaFederationRuleWorkspace
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(string federationRuleID, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<BetaFederationRuleWorkspace>
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(string workspaceID, string federationRuleID, ?list<AnthropicBeta> betas): WorkspaceRemoveResponse
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.