POST
POST /v1/organizations/federation_rules/{federation_rule_id}?beta=true — Claude API
Beta
Anthropic API key (required); https://api.anthropic.com
Claude APIUpdate Federation Rule
- Base URL
- https://api.anthropic.com
- Auth
- x-api-key: <ANTHROPIC_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 377 tokens · Vary: Accept
→ 377 tokens · Vary: Accept
Critical gotchas
Authentication uses the x-api-key header and requests also require an anthropic-version header.
The official OpenAPI URL is discovered from the SDK repository manifest and must remain under Anthropic's trusted Stainless storage prefix.
cURL
curl -X POST 'https://api.anthropic.com/v1/organizations/federation_rules/federation-rule-id?beta=true' \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H 'anthropic-version: 2023-06-01' \ -H 'Content-Type: application/json' \ -d '{}'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| federation_rule_id | path | string | Yes | ID of the federation rule to update. |
| applies_to_all_workspaces | body | boolean | No | When true, enables this rule for every workspace in the org (including workspaces created later). Setting `false` is rejected with 400 if no workspace would remain enabled; a rule with only a legacy `workspace_id` binding continues to mint. |
| attributes | body | object | No | Replaces the CEL expressions `{name: expr}` extracting named values from claims. Send null to clear them. Not yet supported; any non-empty value is rejected with 400. |
| description | body | string | No | Replaces the description. Omit to leave unchanged; send `null` to clear (the field is stored as an empty string). |
| match | body | object | No | Replaces the entire match object. All populated matcher fields must pass. |
| name | body | string | No | Replaces the slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. |
| oauth_scope | body | string | No | Replaces the space-separated OAuth scopes granted on minted tokens. OAuth callers may only set `workspace:developer` or `workspace:inference`; other scopes (such as `org:admin`) require a Console session. |
| target | body | object | No | Replaces the entire target object. Currently always a `service_account` target. |
| token_lifetime_seconds | body | integer | No | Replaces the lifetime in seconds for access tokens minted via this rule (60-86400). Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds. |
| workspace_id | body | string | No | Replaces the existing single workspace enablement (the previous one is removed). Rejected with 400 if the rule is enabled for more than one workspace; use the `/federation_rules/{federation_rule_id}/workspaces` sub-resource instead. |
Response 200 OK
{
"applies_to_all_workspaces": true,
"archived_at": "2026-09-03T00:00:00Z",
"archived_by_actor_id": "string",
"attributes": {},
"created_at": "2026-09-03T00:00:00Z",
"created_by_actor_id": "string",
"description": "string",
"id": "string",
"issuer_id": "string",
"issuer_name": "string",
"match": {
"audience": "string",
"claims": {},
"condition": "string",
"subject_prefix": "string"
},
"name": "string",
"oauth_scope": "string",
"target": {
"service_account_id": "string",
"service_account_name": "string",
"type": "string"
},
"token_lifetime_seconds": 0,
"type": "federation_rule",
"updated_at": "2026-09-03T00:00:00Z",
"updated_by_actor_id": "string",
"workspace_id": "string",
"workspace_ids": [
"string"
]
} Get a free Claude API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.