from line 1
1---
2title: Workspaces
3url: https://platform.claude.com/docs/en/api/admin/federation_rules/workspaces
4---
5
61# Workspaces
72
83## List Federation Rule Workspaces
94
10**get** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces`
5**GET** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces`
116
127List workspaces where this federation rule is enabled.
138
from line 12
1712rules with `applies_to_all_workspaces` or a legacy single
1813`workspace_id`, check those fields on the rule itself.
1914
20### Path Parameters
15### Path parameters
2116
2217- `federation_rule_id: string`
2318
2419 ID of the federation rule.
2520
26### Query Parameters
21### Query parameters
2722
2823- `limit: optional number`
2924
3025 Number of results per page.
3126
27 default: 20, maximum: 100, minimum: 1
28
3229- `page: optional string`
3330
3431 Opaque cursor from a previous response's `next_page`.
3532
36### Header Parameters
33### Headers
3734
3835- `"anthropic-beta": optional array of string`
3936
from line 40
4340
4441### Returns
4542
46- `data: array of object { created_at, created_by_actor_id, federation_rule_id, 3 more }`
43- `data: array of object`
4744
4845 - `created_at: string`
4946
5047 When this workspace was enabled for the rule.
5148
49 format: date-time
50
5251 - `created_by_actor_id: string or null`
5352
5453 Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
from line 58
5958
6059 - `type: "federation_rule_workspace"`
6160
62 - `"federation_rule_workspace"`
61 default: federation_rule_workspace
6362
6463 - `workspace_id: string`
6564
from line 74
7574
7675### Example
7776
78```http
77```bash
7978curl https://api.anthropic.com/v1/organizations/federation_rules/$FEDERATION_RULE_ID/workspaces \
8079 -H 'anthropic-version: 2023-06-01' \
8180 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
8281```
8382
84#### Response
83#### Response (200)
8584
8685```json
8786{
from line 100
101100
102101## Add Federation Rule Workspace
103102
104**post** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces`
103**POST** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces`
105104
106105Enable a federation rule for a workspace.
107106
from line 113
114113`oauth_scope` is `workspace:developer` or `workspace:inference`; other
115114scopes require a Console session. Admin API keys are not accepted.
116115
117### Path Parameters
116### Path parameters
118117
119118- `federation_rule_id: string`
120119
121120 ID of the federation rule.
122121
123### Header Parameters
122### Headers
124123
125124- `"anthropic-beta": optional array of string`
126125
from line 127
128127
129128 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
130129
131### Body Parameters
130### Body parameters
132131
133132- `workspace_id: string`
134133
from line 139
140139
141140 When this workspace was enabled for the rule.
142141
142 format: date-time
143
143144- `created_by_actor_id: string or null`
144145
145146 Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
from line 151
150151
151152- `type: "federation_rule_workspace"`
152153
153 - `"federation_rule_workspace"`
154 default: federation_rule_workspace
154155
155156- `workspace_id: string`
156157
from line 163
162163
163164### Example
164165
165```http
166```bash
166167curl https://api.anthropic.com/v1/organizations/federation_rules/$FEDERATION_RULE_ID/workspaces \
167168 -H 'Content-Type: application/json' \
168169 -H 'anthropic-version: 2023-06-01' \
from line 173
172173 }'
173174```
174175
175#### Response
176#### Response (200)
176177
177178```json
178179{
from line 188
187188
188189## Remove Federation Rule Workspace
189190
190**delete** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}`
191**DELETE** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}`
191192
192193Disable a federation rule for a workspace.
193194
from line 197
196197`workspace:developer` or `workspace:inference`; other scopes require a
197198Console session. Admin API keys are not accepted.
198199
199### Path Parameters
200### Path parameters
200201
201202- `federation_rule_id: string`
202203
from line 207
206207
207208 ID of the workspace to disable for.
208209
209### Header Parameters
210### Headers
210211
211212- `"anthropic-beta": optional array of string`
212213
from line 223
222223
223224- `type: "federation_rule_workspace_deleted"`
224225
225 - `"federation_rule_workspace_deleted"`
226 default: federation_rule_workspace_deleted
226227
227228- `workspace_id: string`
228229
from line 231
230231
231232### Example
232233
233```http
234```bash
234235curl https://api.anthropic.com/v1/organizations/federation_rules/$FEDERATION_RULE_ID/workspaces/$WORKSPACE_ID \
235236 -X DELETE \
236237 -H 'anthropic-version: 2023-06-01' \
from line 238
237238 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
238239```
239240
240#### Response
241#### Response (200)
241242
242243```json
243244{
from line 248
247248}
248249```
249250
250## Domain Types
251## Domain types
251252
252253### Workspace List Response
253254
254- `WorkspaceListResponse object { created_at, created_by_actor_id, federation_rule_id, 3 more }`
255- `WorkspaceListResponse object`
255256
256257 - `created_at: string`
257258
258259 When this workspace was enabled for the rule.
259260
261 format: date-time
262
260263 - `created_by_actor_id: string or null`
261264
262265 Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
from line 270
267270
268271 - `type: "federation_rule_workspace"`
269272
270 - `"federation_rule_workspace"`
273 default: federation_rule_workspace
271274
272275 - `workspace_id: string`
273276
from line 282
279282
280283### Workspace Create Response
281284
282- `WorkspaceCreateResponse object { created_at, created_by_actor_id, federation_rule_id, 3 more }`
285- `WorkspaceCreateResponse object`
283286
284287 - `created_at: string`
285288
286289 When this workspace was enabled for the rule.
287290
291 format: date-time
292
288293 - `created_by_actor_id: string or null`
289294
290295 Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known.
from line 300
295300
296301 - `type: "federation_rule_workspace"`
297302
298 - `"federation_rule_workspace"`
303 default: federation_rule_workspace
299304
300305 - `workspace_id: string`
301306
from line 312
307312
308313### Workspace Delete Response
309314
310- `WorkspaceDeleteResponse object { federation_rule_id, type, workspace_id }`
315- `WorkspaceDeleteResponse object`
311316
312317 - `federation_rule_id: string`
313318
from line 320
315320
316321 - `type: "federation_rule_workspace_deleted"`
317322
318 - `"federation_rule_workspace_deleted"`
323 default: federation_rule_workspace_deleted
319324
320325 - `workspace_id: string`
321326
No line in this hunk matches that.