The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 1
1---
2title: Workspaces
3url: https://platform.claude.com/docs/en/api/admin/workspaces
4---
5
61# Workspaces
72
83## Create Workspace
94
10**post** `/v1/organizations/workspaces`
5**POST** `/v1/organizations/workspaces`
116
127Create Workspace
138
14### Header Parameters
9### Headers
1510
1611- `"anthropic-beta": optional array of string`
1712
from line 14
1914
2015 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
2116
22### Body Parameters
17### Body parameters
2318
2419- `name: string`
2520
2621 Name of the Workspace.
2722
28- `data_residency: optional object { allowed_inference_geos, default_inference_geo, workspace_geo } or null`
23 maxLength: 40, minLength: 1
24
25- `data_residency: optional object or null`
2926
3027 Data residency configuration for the workspace. If omitted, defaults to workspace_geo=`"us"`, allowed_inference_geos=`"unrestricted"`, and default_inference_geo=`"global"`.
3128
from line 38
4138
4239 - `"unrestricted"`
4340
44 - `"unrestricted"`
45
4641 - `default_inference_geo: optional "global" or "us" or null`
4742
4843 Default inference geo applied when requests omit the parameter. Defaults to 'global' if omitted. Must be a member of allowed_inference_geos unless allowed_inference_geos is `"unrestricted"`.
from line 49
5449 - `workspace_geo: optional "us" or null`
5550
5651 Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.
57
58 - `"us"`
5952
6053- `external_key_id: optional string or null`
6154
from line 66
7366
7467### Returns
7568
76- `Workspace object { id, archived_at, compartment_id, 7 more }`
69- `Workspace object`
7770
7871 - `id: string`
7972
from line 75
8275 - `archived_at: string or null`
8376
8477 RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
78
79 format: date-time
8580
8681 - `compartment_id: string`
8782
from line 91
9691
9792 RFC 3339 datetime string indicating when the Workspace was created.
9893
99 - `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
94 format: date-time
95
96 - `data_residency: object`
10097
10198 Data residency configuration.
10299
from line 104
107104 - `array of string`
108105
109106 - `"unrestricted"`
110
111 - `"unrestricted"`
112107
113108 - `default_inference_geo: string`
114109
from line 141
146141
147142 For Workspaces, this is always `"workspace"`.
148143
149 - `"workspace"`
144 default: workspace
150145
151146### Example
152147
153```http
148```bash
154149curl https://api.anthropic.com/v1/organizations/workspaces \
155150 -H 'Content-Type: application/json' \
156151 -H 'anthropic-version: 2023-06-01' \
from line 160
165160 }'
166161```
167162
168#### Response
163#### Response (200)
169164
170165```json
171166{
from line 186
191186
192187## Get Workspace
193188
194**get** `/v1/organizations/workspaces/{workspace_id}`
189**GET** `/v1/organizations/workspaces/{workspace_id}`
195190
196191Get Workspace
197192
198### Path Parameters
193### Path parameters
199194
200195- `workspace_id: string`
201196
from line 198
203198
204199### Returns
205200
206- `Workspace object { id, archived_at, compartment_id, 7 more }`
201- `Workspace object`
207202
208203 - `id: string`
209204
from line 207
212207 - `archived_at: string or null`
213208
214209 RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
210
211 format: date-time
215212
216213 - `compartment_id: string`
217214
from line 223
226223
227224 RFC 3339 datetime string indicating when the Workspace was created.
228225
229 - `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
226 format: date-time
227
228 - `data_residency: object`
230229
231230 Data residency configuration.
232231
from line 236
237236 - `array of string`
238237
239238 - `"unrestricted"`
240
241 - `"unrestricted"`
242239
243240 - `default_inference_geo: string`
244241
from line 273
276273
277274 For Workspaces, this is always `"workspace"`.
278275
279 - `"workspace"`
276 default: workspace
280277
281278### Example
282279
283```http
280```bash
284281curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \
285282 -H 'anthropic-version: 2023-06-01' \
286283 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
287284```
288285
289#### Response
286#### Response (200)
290287
291288```json
292289{
from line 309
312309
313310## List Workspaces
314311
315**get** `/v1/organizations/workspaces`
312**GET** `/v1/organizations/workspaces`
316313
317314List Workspaces
318315
319### Query Parameters
316### Query parameters
320317
321318- `after_id: optional string`
322319
from line 327
330327
331328 Whether to include Workspaces that have been archived in the response
332329
330 default: false
331
333332- `limit: optional number`
334333
335334 Number of items to return per page.
336335
337336 Defaults to `20`. Ranges from `1` to `1000`.
338337
338 default: 20, maximum: 1000, minimum: 1
339
339340### Returns
340341
341342- `data: array of Workspace`
from line 348
347348 - `archived_at: string or null`
348349
349350 RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
351
352 format: date-time
350353
351354 - `compartment_id: string`
352355
from line 364
361364
362365 RFC 3339 datetime string indicating when the Workspace was created.
363366
364 - `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
367 format: date-time
368
369 - `data_residency: object`
365370
366371 Data residency configuration.
367372
from line 377
372377 - `array of string`
373378
374379 - `"unrestricted"`
375
376 - `"unrestricted"`
377380
378381 - `default_inference_geo: string`
379382
from line 414
411414
412415 For Workspaces, this is always `"workspace"`.
413416
414 - `"workspace"`
417 default: workspace
415418
416419- `first_id: string or null`
417420
from line 430
427430
428431### Example
429432
430```http
433```bash
431434curl https://api.anthropic.com/v1/organizations/workspaces \
432435 -H 'anthropic-version: 2023-06-01' \
433436 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
434437```
435438
436#### Response
439#### Response (200)
437440
438441```json
439442{
from line 469
466469
467470## Update Workspace
468471
469**post** `/v1/organizations/workspaces/{workspace_id}`
472**POST** `/v1/organizations/workspaces/{workspace_id}`
470473
471474Update Workspace
472475
473### Path Parameters
474
475- `workspace_id: string`
476
477### Body Parameters
478
479- `data_residency: optional object { allowed_inference_geos, default_inference_geo } or null`
476### Path parameters
477
478- `workspace_id: string`
479
480### Body parameters
481
482- `data_residency: optional object or null`
480483
481484 Data residency configuration for the workspace.
482485
from line 494
491494 - `"us"`
492495
493496 - `"unrestricted"`
494
495 - `"unrestricted"`
496497
497498 - `default_inference_geo: optional "global" or "us" or null`
498499
from line 517
516517
517518 Name of the Workspace.
518519
520 maxLength: 40, minLength: 1
521
519522- `tags: optional map[string] or null`
520523
521524 User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.
522525
523526### Returns
524527
525- `Workspace object { id, archived_at, compartment_id, 7 more }`
528- `Workspace object`
526529
527530 - `id: string`
528531
from line 534
531534 - `archived_at: string or null`
532535
533536 RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
537
538 format: date-time
534539
535540 - `compartment_id: string`
536541
from line 550
545550
546551 RFC 3339 datetime string indicating when the Workspace was created.
547552
548 - `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
553 format: date-time
554
555 - `data_residency: object`
549556
550557 Data residency configuration.
551558
from line 563
556563 - `array of string`
557564
558565 - `"unrestricted"`
559
560 - `"unrestricted"`
561566
562567 - `default_inference_geo: string`
563568
from line 600
595600
596601 For Workspaces, this is always `"workspace"`.
597602
598 - `"workspace"`
603 default: workspace
599604
600605### Example
601606
602```http
607```bash
603608curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \
604609 -H 'Content-Type: application/json' \
605610 -H 'anthropic-version: 2023-06-01' \
from line 618
613618 }'
614619```
615620
616#### Response
621#### Response (200)
617622
618623```json
619624{
from line 644
639644
640645## Archive Workspace
641646
642**post** `/v1/organizations/workspaces/{workspace_id}/archive`
647**POST** `/v1/organizations/workspaces/{workspace_id}/archive`
643648
644649Archive Workspace
645650
646### Path Parameters
651### Path parameters
647652
648653- `workspace_id: string`
649654
650655### Returns
651656
652- `Workspace object { id, archived_at, compartment_id, 7 more }`
657- `Workspace object`
653658
654659 - `id: string`
655660
from line 663
658663 - `archived_at: string or null`
659664
660665 RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.
666
667 format: date-time
661668
662669 - `compartment_id: string`
663670
from line 679
672679
673680 RFC 3339 datetime string indicating when the Workspace was created.
674681
675 - `data_residency: object { allowed_inference_geos, default_inference_geo, workspace_geo }`
682 format: date-time
683
684 - `data_residency: object`
676685
677686 Data residency configuration.
678687
from line 692
683692 - `array of string`
684693
685694 - `"unrestricted"`
686
687 - `"unrestricted"`
688695
689696 - `default_inference_geo: string`
690697
from line 729
722729
723730 For Workspaces, this is always `"workspace"`.
724731
725 - `"workspace"`
732 default: workspace
726733
727734### Example
728735
729```http
736```bash
730737curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/archive \
731738 -X POST \
732739 -H 'anthropic-version: 2023-06-01' \
733740 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
734741```
735742
736#### Response
743#### Response (200)
737744
738745```json
739746{
from line 764
757764}
758765```
759766
760# Members
761
762## Create Workspace Member
763
764**post** `/v1/organizations/workspaces/{workspace_id}/members`
767## Workspaces › Members
768
769### Create Workspace Member
770
771**POST** `/v1/organizations/workspaces/{workspace_id}/members`
765772
766773Create Workspace Member
767774
768### Path Parameters
775#### Path parameters
769776
770777- `workspace_id: string`
771778
772779 ID of the Workspace.
773780
774### Body Parameters
781#### Body parameters
775782
776783- `user_id: string`
777784
from line 796
789796
790797 - `"workspace_user"`
791798
792### Returns
793
794- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
799#### Returns
800
801- `WorkspaceMember object`
795802
796803 - `type: "workspace_member"`
797804
from line 806
799806
800807 For Workspace Members, this is always `"workspace_member"`.
801808
802 - `"workspace_member"`
809 default: workspace_member
803810
804811 - `user_id: string`
805812
from line 830
823830
824831 - `"workspace_user"`
825832
826### Example
827
828```http
833#### Example
834
835```bash
829836curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
830837 -H 'Content-Type: application/json' \
831838 -H 'anthropic-version: 2023-06-01' \
from line 843
836843 }'
837844```
838845
839#### Response
846##### Response (200)
840847
841848```json
842849{
from line 854
847854}
848855```
849856
850## Get Workspace Member
851
852**get** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
857### Get Workspace Member
858
859**GET** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
853860
854861Get Workspace Member
855862
856### Path Parameters
863#### Path parameters
857864
858865- `workspace_id: string`
859866
from line 870
863870
864871 ID of the User.
865872
866### Returns
867
868- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
873#### Returns
874
875- `WorkspaceMember object`
869876
870877 - `type: "workspace_member"`
871878
from line 880
873880
874881 For Workspace Members, this is always `"workspace_member"`.
875882
876 - `"workspace_member"`
883 default: workspace_member
877884
878885 - `user_id: string`
879886
from line 904
897904
898905 - `"workspace_user"`
899906
900### Example
901
902```http
907#### Example
908
909```bash
903910curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
904911 -H 'anthropic-version: 2023-06-01' \
905912 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
906913```
907914
908#### Response
915##### Response (200)
909916
910917```json
911918{
from line 923
916923}
917924```
918925
919## List Workspace Members
920
921**get** `/v1/organizations/workspaces/{workspace_id}/members`
926### List Workspace Members
927
928**GET** `/v1/organizations/workspaces/{workspace_id}/members`
922929
923930List Workspace Members
924931
925### Path Parameters
932#### Path parameters
926933
927934- `workspace_id: string`
928935
929936 ID of the Workspace.
930937
931### Query Parameters
938#### Query parameters
932939
933940- `after_id: optional string`
934941
from line 951
944951
945952 Defaults to `20`. Ranges from `1` to `1000`.
946953
947### Returns
954 default: 20, maximum: 1000, minimum: 1
955
956#### Returns
948957
949958- `data: array of WorkspaceMember`
950959
from line 963
954963
955964 For Workspace Members, this is always `"workspace_member"`.
956965
957 - `"workspace_member"`
966 default: workspace_member
958967
959968 - `user_id: string`
960969
from line 999
990999
9911000 Last ID in the `data` list. Can be used as the `after_id` for the next page.
9921001
993### Example
994
995```http
1002#### Example
1003
1004```bash
9961005curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \
9971006 -H 'anthropic-version: 2023-06-01' \
9981007 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
9991008```
10001009
1001#### Response
1010##### Response (200)
10021011
10031012```json
10041013{
from line 1025
10161025}
10171026```
10181027
1019## Update Workspace Member
1020
1021**post** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
1028### Update Workspace Member
1029
1030**POST** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
10221031
10231032Update Workspace Member
10241033
1025### Path Parameters
1034#### Path parameters
10261035
10271036- `workspace_id: string`
10281037
from line 1041
10321041
10331042 ID of the User.
10341043
1035### Body Parameters
1044#### Body parameters
10361045
10371046- `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
10381047
from line 1057
10481057
10491058 - `"workspace_user"`
10501059
1051### Returns
1052
1053- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
1060#### Returns
1061
1062- `WorkspaceMember object`
10541063
10551064 - `type: "workspace_member"`
10561065
from line 1067
10581067
10591068 For Workspace Members, this is always `"workspace_member"`.
10601069
1061 - `"workspace_member"`
1070 default: workspace_member
10621071
10631072 - `user_id: string`
10641073
from line 1091
10821091
10831092 - `"workspace_user"`
10841093
1085### Example
1086
1087```http
1094#### Example
1095
1096```bash
10881097curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
10891098 -H 'Content-Type: application/json' \
10901099 -H 'anthropic-version: 2023-06-01' \
from line 1103
10941103 }'
10951104```
10961105
1097#### Response
1106##### Response (200)
10981107
10991108```json
11001109{
from line 1114
11051114}
11061115```
11071116
1108## Delete Workspace Member
1109
1110**delete** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
1117### Delete Workspace Member
1118
1119**DELETE** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`
11111120
11121121Delete Workspace Member
11131122
1114### Path Parameters
1123#### Path parameters
11151124
11161125- `workspace_id: string`
11171126
from line 1130
11211130
11221131 ID of the User.
11231132
1124### Returns
1133#### Returns
11251134
11261135- `type: "workspace_member_deleted"`
11271136
from line 1138
11291138
11301139 For Workspace Members, this is always `"workspace_member_deleted"`.
11311140
1132 - `"workspace_member_deleted"`
1141 default: workspace_member_deleted
11331142
11341143- `user_id: string`
11351144
from line 1148
11391148
11401149 ID of the Workspace.
11411150
1142### Example
1143
1144```http
1151#### Example
1152
1153```bash
11451154curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \
11461155 -X DELETE \
11471156 -H 'anthropic-version: 2023-06-01' \
11481157 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
11491158```
11501159
1151#### Response
1160##### Response (200)
11521161
11531162```json
11541163{
from line 1167
11581167}
11591168```
11601169
1161## Domain Types
1162
1163### Workspace Member
1164
1165- `WorkspaceMember object { type, user_id, workspace_id, workspace_role }`
1166
1167 - `type: "workspace_member"`
1168
1169 Object type.
1170
1171 For Workspace Members, this is always `"workspace_member"`.
1172
1173 - `"workspace_member"`
1174
1175 - `user_id: string`
1176
1177 ID of the User.
1178
1179 - `workspace_id: string`
1180
1181 ID of the Workspace.
1182
1183 - `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
1184
1185 Role of the Workspace Member.
1186
1187 - `"workspace_admin"`
1188
1189 - `"workspace_billing"`
1190
1191 - `"workspace_developer"`
1192
1193 - `"workspace_restricted_developer"`
1194
1195 - `"workspace_user"`
1196
1197### Member Delete Response
1198
1199- `MemberDeleteResponse object { type, user_id, workspace_id }`
1200
1201 - `type: "workspace_member_deleted"`
1202
1203 Deleted object type.
1204
1205 For Workspace Members, this is always `"workspace_member_deleted"`.
1206
1207 - `"workspace_member_deleted"`
1208
1209 - `user_id: string`
1210
1211 ID of the User.
1212
1213 - `workspace_id: string`
1214
1215 ID of the Workspace.
1216
1217# Rate Limits
1218
1219## List Workspace Rate Limits
1220
1221**get** `/v1/organizations/workspaces/{workspace_id}/rate_limits`
1170## Workspaces › Rate Limits
1171
1172### List Workspace Rate Limits
1173
1174**GET** `/v1/organizations/workspaces/{workspace_id}/rate_limits`
12221175
12231176List rate-limit overrides configured for a workspace.
12241177
from line 1179
12261179override. Groups without overrides inherit the organization limits and
12271180are not listed; use `GET /v1/organizations/rate_limits` to see those.
12281181
1229### Path Parameters
1182#### Path parameters
12301183
12311184- `workspace_id: string`
12321185
12331186 The ID of the workspace.
12341187
1235### Query Parameters
1188#### Query parameters
12361189
12371190- `group_type: optional "batch" or "files" or "model_group" or 3 more`
12381191
from line 1207
12541207
12551208 Opaque cursor from a previous response's `next_page`.
12561209
1257### Returns
1258
1259- `data: array of object { group_type, limits, models, 3 more }`
1210#### Returns
1211
1212- `data: array of object`
12601213
12611214 Rate-limit entries for the workspace, one per group that has at least one override.
12621215
from line 1229
12761229
12771230 - `"web_search"`
12781231
1279 - `limits: array of object { org_limit, type, value }`
1232 - `limits: array of object`
12801233
12811234 The limiter values overridden for this group in this workspace. Limiter types without a workspace override are omitted and inherit the organization value.
12821235
from line 1257
13041257
13051258 Object type. Always `workspace_rate_limit` for workspace rate-limit entries.
13061259
1307 - `"workspace_rate_limit"`
1260 default: workspace_rate_limit
13081261
13091262 - `workspace_id: string`
13101263
from line 1267
13141267
13151268 Token to provide in as `page` in the subsequent request to retrieve the next page of data.
13161269
1317### Example
1318
1319```http
1270#### Example
1271
1272```bash
13201273curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/rate_limits \
13211274 -H 'anthropic-version: 2023-06-01' \
13221275 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
13231276```
13241277
1325#### Response
1278##### Response (200)
13261279
13271280```json
13281281{
from line 1301
13481301}
13491302```
13501303
1351## Domain Types
1352
1353### Rate Limit List Response
1354
1355- `RateLimitListResponse object { data, next_page }`
1356
1357 - `data: array of object { group_type, limits, models, 3 more }`
1358
1359 Rate-limit entries for the workspace, one per group that has at least one override.
1360
1361 - `group_type: "batch" or "files" or "model_group" or 3 more`
1362
1363 The kind of rate-limit group this entry represents. `model_group` entries apply to a family of models (listed in `models`); other values apply to an API-surface category and have `models` set to `null`.
1364
1365 - `"batch"`
1366
1367 - `"files"`
1368
1369 - `"model_group"`
1370
1371 - `"skills"`
1372
1373 - `"token_count"`
1374
1375 - `"web_search"`
1376
1377 - `limits: array of object { org_limit, type, value }`
1378
1379 The limiter values overridden for this group in this workspace. Limiter types without a workspace override are omitted and inherit the organization value.
1380
1381 - `org_limit: number or null`
1382
1383 The organization-level value for the same limiter type, for reference. `null` when the organization has no limit configured for this limiter type.
1384
1385 - `type: string`
1386
1387 The limiter type (for example, `requests_per_minute` or `input_tokens_per_minute`).
1388
1389 - `value: number`
1390
1391 The workspace-level override value for this limiter type.
1392
1393 - `models: array of string or null`
1394
1395 Model names this entry's limits apply to, including aliases. `null` when `group_type` is not `"model_group"`.
1396
1397 - `rate_limit_id: string`
1398
1399 The `id` of the RateLimit group this override applies to.
1400
1401 - `type: "workspace_rate_limit"`
1402
1403 Object type. Always `workspace_rate_limit` for workspace rate-limit entries.
1404
1405 - `"workspace_rate_limit"`
1406
1407 - `workspace_id: string`
1408
1409 ID of the Workspace this override applies to.
1410
1411 - `next_page: string or null`
1412
1413 Token to provide in as `page` in the subsequent request to retrieve the next page of data.
1414
1415# Service Accounts
1416
1417## Create Service Account Workspace Member
1418
1419**post** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
1304## Workspaces › Service Accounts
1305
1306### Create Service Account Workspace Member
1307
1308**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
14201309
14211310Add a service account to a workspace with the given `workspace_role`.
14221311
from line 1319
14301319accounts cannot be added and are rejected. Requires an OAuth bearer or
14311320Console session; Admin API keys are not accepted.
14321321
1433### Path Parameters
1322#### Path parameters
14341323
14351324- `workspace_id: string`
14361325
14371326 ID of the workspace.
14381327
1439### Header Parameters
1328#### Headers
14401329
14411330- `"anthropic-beta": optional array of string`
14421331
from line 1333
14441333
14451334 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
14461335
1447### Body Parameters
1336#### Body parameters
14481337
14491338- `service_account_id: string`
14501339
from line 1351
14621351
14631352 - `"workspace_user"`
14641353
1465### Returns
1354#### Returns
14661355
14671356- `created_by_actor_id: string or null`
14681357
from line 1367
14781367
14791368- `type: "service_account_workspace_member"`
14801369
1481 - `"service_account_workspace_member"`
1370 default: service_account_workspace_member
14821371
14831372- `workspace_id: string`
14841373
from line 1387
14981387
14991388 - `"workspace_user"`
15001389
1501### Example
1502
1503```http
1390#### Example
1391
1392```bash
15041393curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \
15051394 -H 'Content-Type: application/json' \
15061395 -H 'anthropic-version: 2023-06-01' \
from line 1400
15111400 }'
15121401```
15131402
1514#### Response
1403##### Response (200)
15151404
15161405```json
15171406{
from line 1413
15241413}
15251414```
15261415
1527## Get Service Account Workspace Member
1528
1529**get** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
1416### Get Service Account Workspace Member
1417
1418**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
15301419
15311420Retrieve a service account's membership in a workspace.
15321421
from line 1426
15371426membership is returned with its assigned role. An archived service
15381427account returns 404.
15391428
1540### Path Parameters
1429#### Path parameters
15411430
15421431- `workspace_id: string`
15431432
from line 1436
15471436
15481437 ID of the service account.
15491438
1550### Header Parameters
1439#### Headers
15511440
15521441- `"anthropic-beta": optional array of string`
15531442
from line 1444
15551444
15561445 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
15571446
1558### Returns
1447#### Returns
15591448
15601449- `created_by_actor_id: string or null`
15611450
from line 1460
15711460
15721461- `type: "service_account_workspace_member"`
15731462
1574 - `"service_account_workspace_member"`
1463 default: service_account_workspace_member
15751464
15761465- `workspace_id: string`
15771466
from line 1480
15911480
15921481 - `"workspace_user"`
15931482
1594### Example
1595
1596```http
1483#### Example
1484
1485```bash
15971486curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
15981487 -H 'anthropic-version: 2023-06-01' \
15991488 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
16001489```
16011490
1602#### Response
1491##### Response (200)
16031492
16041493```json
16051494{
from line 1501
16121501}
16131502```
16141503
1615## List Service Account Workspace Members
1616
1617**get** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
1504### List Service Account Workspace Members
1505
1506**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
16181507
16191508List the service accounts that are members of a workspace.
16201509
from line 1514
16251514included in this list. Memberships of archived service accounts are
16261515omitted from the results.
16271516
1628### Path Parameters
1517#### Path parameters
16291518
16301519- `workspace_id: string`
16311520
16321521 ID of the workspace.
16331522
1634### Query Parameters
1523#### Query parameters
16351524
16361525- `limit: optional number`
16371526
16381527 Number of results per page.
16391528
1529 default: 20, maximum: 100, minimum: 1
1530
16401531- `page: optional string`
16411532
16421533 Opaque cursor from a previous response's `next_page`.
16431534
1644### Header Parameters
1535#### Headers
16451536
16461537- `"anthropic-beta": optional array of string`
16471538
from line 1540
16491540
16501541 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
16511542
1652### Returns
1653
1654- `data: array of object { created_by_actor_id, implicit, service_account_id, 3 more }`
1543#### Returns
1544
1545- `data: array of object`
16551546
16561547 - `created_by_actor_id: string or null`
16571548
from line 1558
16671558
16681559 - `type: "service_account_workspace_member"`
16691560
1670 - `"service_account_workspace_member"`
1561 default: service_account_workspace_member
16711562
16721563 - `workspace_id: string`
16731564
from line 1582
16911582
16921583 Opaque cursor for the next page, or null if no more results.
16931584
1694### Example
1695
1696```http
1585#### Example
1586
1587```bash
16971588curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \
16981589 -H 'anthropic-version: 2023-06-01' \
16991590 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
17001591```
17011592
1702#### Response
1593##### Response (200)
17031594
17041595```json
17051596{
from line 1608
17171608}
17181609```
17191610
1720## Update Service Account Workspace Member
1721
1722**post** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
1611### Update Service Account Workspace Member
1612
1613**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
17231614
17241615Change a service account's role in a workspace.
17251616
from line 1622
17311622rejected. Requires an OAuth bearer or Console session; Admin API keys
17321623are not accepted.
17331624
1734### Path Parameters
1625#### Path parameters
17351626
17361627- `workspace_id: string`
17371628
from line 1632
17411632
17421633 ID of the service account.
17431634
1744### Header Parameters
1635#### Headers
17451636
17461637- `"anthropic-beta": optional array of string`
17471638
from line 1640
17491640
17501641 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
17511642
1752### Body Parameters
1643#### Body parameters
17531644
17541645- `workspace_role: "workspace_admin" or "workspace_developer" or "workspace_restricted_developer" or "workspace_user"`
17551646
from line 1654
17631654
17641655 - `"workspace_user"`
17651656
1766### Returns
1657#### Returns
17671658
17681659- `created_by_actor_id: string or null`
17691660
from line 1670
17791670
17801671- `type: "service_account_workspace_member"`
17811672
1782 - `"service_account_workspace_member"`
1673 default: service_account_workspace_member
17831674
17841675- `workspace_id: string`
17851676
from line 1690
17991690
18001691 - `"workspace_user"`
18011692
1802### Example
1803
1804```http
1693#### Example
1694
1695```bash
18051696curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
18061697 -H 'Content-Type: application/json' \
18071698 -H 'anthropic-version: 2023-06-01' \
from line 1702
18111702 }'
18121703```
18131704
1814#### Response
1705##### Response (200)
18151706
18161707```json
18171708{
from line 1715
18241715}
18251716```
18261717
1827## Delete Service Account Workspace Member
1828
1829**delete** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
1718### Delete Service Account Workspace Member
1719
1720**DELETE** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
18301721
18311722Remove a service account from a workspace.
18321723
from line 1728
18371728membership. Archived workspaces return 400. Requires an OAuth bearer or
18381729Console session; Admin API keys are not accepted.
18391730
1840### Path Parameters
1731#### Path parameters
18411732
18421733- `workspace_id: string`
18431734
from line 1738
18471738
18481739 ID of the service account.
18491740
1850### Header Parameters
1741#### Headers
18511742
18521743- `"anthropic-beta": optional array of string`
18531744
from line 1746
18551746
18561747 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
18571748
1858### Returns
1749#### Returns
18591750
18601751- `service_account_id: string`
18611752
from line 1754
18631754
18641755- `type: "service_account_workspace_member_deleted"`
18651756
1866 - `"service_account_workspace_member_deleted"`
1757 default: service_account_workspace_member_deleted
18671758
18681759- `workspace_id: string`
18691760
18701761 Tagged workspace ID (`wrkspc_...`) named in the delete request.
18711762
1872### Example
1873
1874```http
1763#### Example
1764
1765```bash
18751766curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
18761767 -X DELETE \
18771768 -H 'anthropic-version: 2023-06-01' \
18781769 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
18791770```
18801771
1881#### Response
1772##### Response (200)
18821773
18831774```json
18841775{
from line 1778
18871778 "workspace_id": "workspace_id"
18881779}
18891780```
1890
1891## Domain Types
1892
1893### Service Account Create Response
1894
1895- `ServiceAccountCreateResponse object { created_by_actor_id, implicit, service_account_id, 3 more }`
1896
1897 - `created_by_actor_id: string or null`
1898
1899 Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.
1900
1901 - `implicit: boolean or null`
1902
1903 True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.
1904
1905 - `service_account_id: string`
1906
1907 Tagged service account ID (`svac_...`).
1908
1909 - `type: "service_account_workspace_member"`
1910
1911 - `"service_account_workspace_member"`
1912
1913 - `workspace_id: string`
1914
1915 Tagged workspace ID (`wrkspc_...`).
1916
1917 - `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
1918
1919 Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.
1920
1921 - `"workspace_admin"`
1922
1923 - `"workspace_billing"`
1924
1925 - `"workspace_developer"`
1926
1927 - `"workspace_restricted_developer"`
1928
1929 - `"workspace_user"`
1930
1931### Service Account Retrieve Response
1932
1933- `ServiceAccountRetrieveResponse object { created_by_actor_id, implicit, service_account_id, 3 more }`
1934
1935 - `created_by_actor_id: string or null`
1936
1937 Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.
1938
1939 - `implicit: boolean or null`
1940
1941 True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.
1942
1943 - `service_account_id: string`
1944
1945 Tagged service account ID (`svac_...`).
1946
1947 - `type: "service_account_workspace_member"`
1948
1949 - `"service_account_workspace_member"`
1950
1951 - `workspace_id: string`
1952
1953 Tagged workspace ID (`wrkspc_...`).
1954
1955 - `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
1956
1957 Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.
1958
1959 - `"workspace_admin"`
1960
1961 - `"workspace_billing"`
1962
1963 - `"workspace_developer"`
1964
1965 - `"workspace_restricted_developer"`
1966
1967 - `"workspace_user"`
1968
1969### Service Account List Response
1970
1971- `ServiceAccountListResponse object { created_by_actor_id, implicit, service_account_id, 3 more }`
1972
1973 - `created_by_actor_id: string or null`
1974
1975 Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.
1976
1977 - `implicit: boolean or null`
1978
1979 True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.
1980
1981 - `service_account_id: string`
1982
1983 Tagged service account ID (`svac_...`).
1984
1985 - `type: "service_account_workspace_member"`
1986
1987 - `"service_account_workspace_member"`
1988
1989 - `workspace_id: string`
1990
1991 Tagged workspace ID (`wrkspc_...`).
1992
1993 - `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
1994
1995 Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.
1996
1997 - `"workspace_admin"`
1998
1999 - `"workspace_billing"`
2000
2001 - `"workspace_developer"`
2002
2003 - `"workspace_restricted_developer"`
2004
2005 - `"workspace_user"`
2006
2007### Service Account Update Response
2008
2009- `ServiceAccountUpdateResponse object { created_by_actor_id, implicit, service_account_id, 3 more }`
2010
2011 - `created_by_actor_id: string or null`
2012
2013 Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.
2014
2015 - `implicit: boolean or null`
2016
2017 True when this is the implicit default-workspace membership every service account has when no explicit membership exists. Implicit memberships have role workspace_user and cannot be removed.
2018
2019 - `service_account_id: string`
2020
2021 Tagged service account ID (`svac_...`).
2022
2023 - `type: "service_account_workspace_member"`
2024
2025 - `"service_account_workspace_member"`
2026
2027 - `workspace_id: string`
2028
2029 Tagged workspace ID (`wrkspc_...`).
2030
2031 - `workspace_role: "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`
2032
2033 Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.
2034
2035 - `"workspace_admin"`
2036
2037 - `"workspace_billing"`
2038
2039 - `"workspace_developer"`
2040
2041 - `"workspace_restricted_developer"`
2042
2043 - `"workspace_user"`
2044
2045### Service Account Delete Response
2046
2047- `ServiceAccountDeleteResponse object { service_account_id, type, workspace_id }`
2048
2049 - `service_account_id: string`
2050
2051 Tagged service account ID (`svac_...`) named in the delete request. Removal is idempotent; see the endpoint description for the implicit-membership no-op.
2052
2053 - `type: "service_account_workspace_member_deleted"`
2054
2055 - `"service_account_workspace_member_deleted"`
2056
2057 - `workspace_id: string`
2058
2059 Tagged workspace ID (`wrkspc_...`) named in the delete request.
20601781
No line in this hunk matches that.