The whole hunk
from line 1, old and new numbered
/
lines
from line 1
1---
2title: Rules
3url: https://platform.claude.com/docs/en/api/beta/organization/federation/rules
4---
5
16# Rules
27
38## Create Federation Rule
from line 35
3035
3136 - `string`
3237
33 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
38 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
3439
3540 - `"message-batches-2024-09-24"`
3641
from line 83
7883
7984 - `"user-profiles-2026-08-18"`
8085
86 - `"user-profiles-2026-09-04"`
87
8188 - `"advisor-tool-2026-03-01"`
8289
8390 - `"managed-agents-2026-04-01"`
from line 175
168175
169176 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
170177
178 - `type: "service_account"`
179
171180 - `service_account_id: string`
172181
173182 Tagged ID of the service account to mint tokens for.
174183
175 - `type: "service_account"`
176
177184 - `service_account_name: optional string or null`
178185
179186 Service account's display name at read time. Ignored on writes.
from line 224
217224 rules carrying only the legacy `workspace_id` binding do not enforce
218225 this.
219226
227 - `type: "federation_rule"`
228
229 default: federation_rule
230
220231 - `id: string`
221232
222233 Tagged ID of the federation rule.
from line 310
299310
300311 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
301312
313 - `type: "service_account"`
314
302315 - `service_account_id: string`
303316
304317 Tagged ID of the service account to mint tokens for.
305318
306 - `type: "service_account"`
307
308319 - `service_account_name: optional string or null`
309320
310321 Service account's display name at read time. Ignored on writes.
from line 324
313324
314325 Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds.
315326
316 - `type: "federation_rule"`
317
318 default: federation_rule
319
320327 - `updated_at: string`
321328
322329 When this rule was last updated.
from line 444
437444
438445 - `string`
439446
440 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
447 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
441448
442449 - `"message-batches-2024-09-24"`
443450
from line 492
485492
486493 - `"user-profiles-2026-08-18"`
487494
495 - `"user-profiles-2026-09-04"`
496
488497 - `"advisor-tool-2026-03-01"`
489498
490499 - `"managed-agents-2026-04-01"`
from line 540
531540
532541- `data: array of BetaFederationRule`
533542
543 - `type: "federation_rule"`
544
545 default: federation_rule
546
534547 - `id: string`
535548
536549 Tagged ID of the federation rule.
from line 626
613626
614627 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
615628
629 - `type: "service_account"`
630
616631 - `service_account_id: string`
617632
618633 Tagged ID of the service account to mint tokens for.
619634
620 - `type: "service_account"`
621
622635 - `service_account_name: optional string or null`
623636
624637 Service account's display name at read time. Ignored on writes.
from line 640
627640
628641 Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds.
629642
630 - `type: "federation_rule"`
631
632 default: federation_rule
633
634643 - `updated_at: string`
635644
636645 When this rule was last updated.
from line 739
730739
731740 - `string`
732741
733 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
742 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
734743
735744 - `"message-batches-2024-09-24"`
736745
from line 787
778787
779788 - `"user-profiles-2026-08-18"`
780789
790 - `"user-profiles-2026-09-04"`
791
781792 - `"advisor-tool-2026-03-01"`
782793
783794 - `"managed-agents-2026-04-01"`
from line 846
835846 rules carrying only the legacy `workspace_id` binding do not enforce
836847 this.
837848
849 - `type: "federation_rule"`
850
851 default: federation_rule
852
838853 - `id: string`
839854
840855 Tagged ID of the federation rule.
from line 932
917932
918933 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
919934
935 - `type: "service_account"`
936
920937 - `service_account_id: string`
921938
922939 Tagged ID of the service account to mint tokens for.
923940
924 - `type: "service_account"`
925
926941 - `service_account_name: optional string or null`
927942
928943 Service account's display name at read time. Ignored on writes.
from line 946
931946
932947 Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds.
933948
934 - `type: "federation_rule"`
935
936 default: federation_rule
937
938949 - `updated_at: string`
939950
940951 When this rule was last updated.
from line 1052
10411052
10421053 - `string`
10431054
1044 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1055 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
10451056
10461057 - `"message-batches-2024-09-24"`
10471058
from line 1100
10891100
10901101 - `"user-profiles-2026-08-18"`
10911102
1103 - `"user-profiles-2026-09-04"`
1104
10921105 - `"advisor-tool-2026-03-01"`
10931106
10941107 - `"managed-agents-2026-04-01"`
from line 1206
11931206
11941207 Bind to a fixed service account by ID.
11951208
1209 - `type: "service_account"`
1210
11961211 - `service_account_id: string`
11971212
11981213 Tagged ID of the service account to mint tokens for.
11991214
1200 - `type: "service_account"`
1201
12021215 - `service_account_name: optional string or null`
12031216
12041217 Service account's display name at read time. Ignored on writes.
from line 1241
12281241 rules carrying only the legacy `workspace_id` binding do not enforce
12291242 this.
12301243
1244 - `type: "federation_rule"`
1245
1246 default: federation_rule
1247
12311248 - `id: string`
12321249
12331250 Tagged ID of the federation rule.
from line 1327
13101327
13111328 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
13121329
1330 - `type: "service_account"`
1331
13131332 - `service_account_id: string`
13141333
13151334 Tagged ID of the service account to mint tokens for.
13161335
1317 - `type: "service_account"`
1318
13191336 - `service_account_name: optional string or null`
13201337
13211338 Service account's display name at read time. Ignored on writes.
from line 1341
13241341
13251342 Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds.
13261343
1327 - `type: "federation_rule"`
1328
1329 default: federation_rule
1330
13311344 - `updated_at: string`
13321345
13331346 When this rule was last updated.
from line 1441
14281441
14291442 - `string`
14301443
1431 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1444 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
14321445
14331446 - `"message-batches-2024-09-24"`
14341447
from line 1489
14761489
14771490 - `"user-profiles-2026-08-18"`
14781491
1492 - `"user-profiles-2026-09-04"`
1493
14791494 - `"advisor-tool-2026-03-01"`
14801495
14811496 - `"managed-agents-2026-04-01"`
from line 1548
15331548 rules carrying only the legacy `workspace_id` binding do not enforce
15341549 this.
15351550
1551 - `type: "federation_rule"`
1552
1553 default: federation_rule
1554
15361555 - `id: string`
15371556
15381557 Tagged ID of the federation rule.
from line 1634
16151634
16161635 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
16171636
1637 - `type: "service_account"`
1638
16181639 - `service_account_id: string`
16191640
16201641 Tagged ID of the service account to mint tokens for.
16211642
1622 - `type: "service_account"`
1623
16241643 - `service_account_name: optional string or null`
16251644
16261645 Service account's display name at read time. Ignored on writes.
from line 1648
16291648
16301649 Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds.
16311650
1632 - `type: "federation_rule"`
1633
1634 default: federation_rule
1635
16361651 - `updated_at: string`
16371652
16381653 When this rule was last updated.
from line 1734
17191734 rules carrying only the legacy `workspace_id` binding do not enforce
17201735 this.
17211736
1737 - `type: "federation_rule"`
1738
1739 default: federation_rule
1740
17221741 - `id: string`
17231742
17241743 Tagged ID of the federation rule.
from line 1820
18011820
18021821 Identity that tokens minted via this rule act as. Currently always a `service_account` target.
18031822
1823 - `type: "service_account"`
1824
18041825 - `service_account_id: string`
18051826
18061827 Tagged ID of the service account to mint tokens for.
18071828
1808 - `type: "service_account"`
1809
18101829 - `service_account_name: optional string or null`
18111830
18121831 Service account's display name at read time. Ignored on writes.
from line 1834
18151834
18161835 Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds.
18171836
1818 - `type: "federation_rule"`
1819
1820 default: federation_rule
1821
18221837 - `updated_at: string`
18231838
18241839 When this rule was last updated.
from line 1888
18731888
18741889- `BetaFederationRuleWorkspace object`
18751890
1891 - `type: "federation_rule_workspace"`
1892
1893 default: federation_rule_workspace
1894
18761895 - `created_at: string`
18771896
18781897 When this workspace was enabled for the rule.
from line 1906
18871906
18881907 Tagged ID of the federation rule.
18891908
1890 - `type: "federation_rule_workspace"`
1891
1892 default: federation_rule_workspace
1893
18941909 - `workspace_id: string`
18951910
18961911 Tagged ID of the workspace this rule is enabled for.
from line 1920
19051920
19061921 Bind to a fixed service account by ID.
19071922
1923 - `type: "service_account"`
1924
19081925 - `service_account_id: string`
19091926
19101927 Tagged ID of the service account to mint tokens for.
19111928
1912 - `type: "service_account"`
1913
19141929 - `service_account_name: optional string or null`
19151930
19161931 Service account's display name at read time. Ignored on writes.
from line 1963
19481963
19491964 - `string`
19501965
1951 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1966 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
19521967
19531968 - `"message-batches-2024-09-24"`
19541969
from line 2011
19962011
19972012 - `"user-profiles-2026-08-18"`
19982013
2014 - `"user-profiles-2026-09-04"`
2015
19992016 - `"advisor-tool-2026-03-01"`
20002017
20012018 - `"managed-agents-2026-04-01"`
from line 2065
20482065
20492066- `BetaFederationRuleWorkspace object`
20502067
2068 - `type: "federation_rule_workspace"`
2069
2070 default: federation_rule_workspace
2071
20512072 - `created_at: string`
20522073
20532074 When this workspace was enabled for the rule.
from line 2083
20622083
20632084 Tagged ID of the federation rule.
20642085
2065 - `type: "federation_rule_workspace"`
2066
2067 default: federation_rule_workspace
2068
20692086 - `workspace_id: string`
20702087
20712088 Tagged ID of the workspace this rule is enabled for.
from line 2156
21392156
21402157 - `string`
21412158
2142 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2159 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
21432160
21442161 - `"message-batches-2024-09-24"`
21452162
from line 2204
21872204
21882205 - `"user-profiles-2026-08-18"`
21892206
2207 - `"user-profiles-2026-09-04"`
2208
21902209 - `"advisor-tool-2026-03-01"`
21912210
21922211 - `"managed-agents-2026-04-01"`
from line 2252
22332252
22342253- `data: array of BetaFederationRuleWorkspace`
22352254
2255 - `type: "federation_rule_workspace"`
2256
2257 default: federation_rule_workspace
2258
22362259 - `created_at: string`
22372260
22382261 When this workspace was enabled for the rule.
from line 2270
22472270
22482271 Tagged ID of the federation rule.
22492272
2250 - `type: "federation_rule_workspace"`
2251
2252 default: federation_rule_workspace
2253
22542273 - `workspace_id: string`
22552274
22562275 Tagged ID of the workspace this rule is enabled for.
from line 2339
23202339
23212340 - `string`
23222341
2323 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2342 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
23242343
23252344 - `"message-batches-2024-09-24"`
23262345
from line 2387
23682387
23692388 - `"user-profiles-2026-08-18"`
23702389
2390 - `"user-profiles-2026-09-04"`
2391
23712392 - `"advisor-tool-2026-03-01"`
23722393
23732394 - `"managed-agents-2026-04-01"`
from line 2433
24122433
24132434#### Returns
24142435
2415- `federation_rule_id: string`
2416
2417 Tagged ID of the federation rule.
2418
24192436- `type: "federation_rule_workspace_deleted"`
24202437
24212438 default: federation_rule_workspace_deleted
2439
2440- `federation_rule_id: string`
2441
2442 Tagged ID of the federation rule.
24222443
24232444- `workspace_id: string`
24242445