SPB Git

Repository Public

workspaces.md 66.4 KB 2,728 lines markdown

1---2title: Workspaces3url: https://platform.claude.com/docs/en/api/beta/organization/workspaces4---56# Workspaces78## List Workspaces910**GET** `/v1/organizations/workspaces`1112List Workspaces1314### Query parameters1516- `after_id: optional string`1718  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.1920- `before_id: optional string`2122  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.2324- `include_archived: optional boolean`2526  Whether to include Workspaces that have been archived in the response2728  default: false2930- `limit: optional number`3132  Number of items to return per page.3334  Defaults to `20`. Ranges from `1` to `1000`.3536  default: 20, maximum: 1000, minimum: 13738### Returns3940- `data: array of BetaWorkspace`4142  - `type: "workspace"`4344    Object type.4546    For Workspaces, this is always `"workspace"`.4748    default: workspace4950  - `id: string`5152    ID of the Workspace.5354  - `archived_at: string or null`5556    RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.5758    format: date-time5960  - `compartment_id: string`6162    Identifier for this Workspace's encryption compartment. When you configure a63    customer-managed encryption key (CMEK) on AWS, reference this value in your64    KMS key-policy condition so the key is scoped to this compartment. On GCP and65    Azure, Anthropic enforces the compartment binding automatically; you do not66    need to reference this value in your key configuration. See the CMEK67    integration guide for the required key configuration; unless your organization68    is on Claude Platform on AWS, it includes a separate value used during key69    validation. On Claude Platform on AWS there is no separate validation value:70    the key is validated against this Workspace's own value when it is attached, so71    if your key policy uses the compartment condition, add this value to it before72    attaching the key.7374  - `created_at: string`7576    RFC 3339 datetime string indicating when the Workspace was created.7778    format: date-time7980  - `data_residency: BetaDataResidency`8182    Data residency configuration.8384    - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`8586      Permitted inference geo values. 'unrestricted' means all geos are allowed.8788      - `Geos = array of BetaAllowedInferenceGeo`8990        - `"global"`9192        - `"us"`9394      - `Unrestricted = "unrestricted"`9596    - `default_inference_geo: "global" or "us"`9798      Default inference geo applied when requests omit the parameter.99100      - `"global"`101102      - `"us"`103104    - `workspace_geo: "us"`105106      Geographic region for workspace data storage. Immutable after creation.107108  - `display_color: string`109110    Hex color code representing the Workspace in the Anthropic Console.111112  - `external_key_id: string or null`113114    ID of the customer-managed encryption key (CMEK) configuration to use for this115    Workspace. Setting this field requires CMEK to be enabled for your116    organization. When set, data stored for this Workspace is encrypted with the117    referenced key. Create key configurations with the External Keys API. On118    Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a119    single-Region key in the same AWS account and Region as the Workspace. On that120    platform the key is validated against this Workspace when it is attached, so a121    key-policy problem is reported as an error on this request. This field is write-once:122    once a key is attached to a Workspace it cannot be detached or replaced. To123    rotate key material, rotate the underlying key on your cloud KMS; the124    `external_key_id` stays the same.125126  - `name: string`127128    Name of the Workspace.129130  - `tags: map[string]`131132    User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.133134- `first_id: string or null`135136  First ID in the `data` list. Can be used as the `before_id` for the previous page.137138- `has_more: boolean`139140  Indicates if there are more results in the requested page direction.141142- `last_id: string or null`143144  Last ID in the `data` list. Can be used as the `after_id` for the next page.145146### Example147148```bash149curl https://api.anthropic.com/v1/organizations/workspaces \150    -H 'anthropic-version: 2023-06-01' \151    -H "X-Api-Key: $ANTHROPIC_API_KEY"152```153154#### Response (200)155156```json157{158  "data": [159    {160      "id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",161      "archived_at": "2024-11-01T23:59:27.427722Z",162      "compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",163      "created_at": "2024-10-30T23:58:27.427722Z",164      "data_residency": {165        "allowed_inference_geos": "unrestricted",166        "default_inference_geo": "global",167        "workspace_geo": "us"168      },169      "display_color": "#6C5BB9",170      "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",171      "name": "Workspace Name",172      "tags": {173        "env": "prod",174        "team": "platform"175      },176      "type": "workspace"177    }178  ],179  "first_id": "first_id",180  "has_more": true,181  "last_id": "last_id"182}183```184185## Create Workspace186187**POST** `/v1/organizations/workspaces`188189Create Workspace190191### Headers192193- `"anthropic-beta": optional array of AnthropicBeta`194195  Optional header to specify the beta version(s) you want to use.196197  - `string`198199  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`200201    - `"message-batches-2024-09-24"`202203    - `"prompt-caching-2024-07-31"`204205    - `"computer-use-2024-10-22"`206207    - `"computer-use-2025-01-24"`208209    - `"pdfs-2024-09-25"`210211    - `"token-counting-2024-11-01"`212213    - `"token-efficient-tools-2025-02-19"`214215    - `"output-128k-2025-02-19"`216217    - `"files-api-2025-04-14"`218219    - `"mcp-client-2025-04-04"`220221    - `"mcp-client-2025-11-20"`222223    - `"dev-full-thinking-2025-05-14"`224225    - `"interleaved-thinking-2025-05-14"`226227    - `"code-execution-2025-05-22"`228229    - `"extended-cache-ttl-2025-04-11"`230231    - `"context-1m-2025-08-07"`232233    - `"context-management-2025-06-27"`234235    - `"model-context-window-exceeded-2025-08-26"`236237    - `"skills-2025-10-02"`238239    - `"fast-mode-2026-02-01"`240241    - `"output-300k-2026-03-24"`242243    - `"user-profiles-2026-03-24"`244245    - `"user-profiles-2026-08-18"`246247    - `"user-profiles-2026-09-04"`248249    - `"advisor-tool-2026-03-01"`250251    - `"managed-agents-2026-04-01"`252253    - `"cache-diagnosis-2026-04-07"`254255    - `"dreaming-2026-04-21"`256257    - `"thinking-token-count-2026-05-13"`258259    - `"server-side-fallback-2026-06-01"`260261    - `"server-side-fallback-2026-07-01"`262263    - `"fallback-credit-2026-06-01"`264265    - `"fallback-credit-2026-07-01"`266267    - `"agent-memory-2026-07-22"`268269    - `"mid-conversation-tool-changes-2026-07-01"`270271    - `"compact-2026-01-12"`272273    - `"computer-use-2025-11-24"`274275    - `"mcp-tunnels-2026-06-22"`276277    - `"structured-outputs-2025-11-13"`278279    - `"task-budgets-2026-03-13"`280281    - `"thinking-display-updates-2026-08-18"`282283    - `"ce-user-management-2026-07-13"`284285    - `"mid-conversation-output-config-2026-07-01"`286287    - `"thinking-binding-controls-2026-08-01"`288289    - `"mid-conversation-system-clear-at-2026-08-21"`290291    - `"compact-2026-09-04"`292293### Body parameters294295- `name: string`296297  Name of the Workspace.298299  maxLength: 40, minLength: 1300301- `data_residency: optional BetaDataResidencyCreateConfig or null`302303  Data residency configuration for the workspace. If omitted, defaults to `workspace_geo: "us"`, `allowed_inference_geos: "unrestricted"`, and `default_inference_geo: "global"`.304305  - `allowed_inference_geos: optional array of BetaAllowedInferenceGeo or "unrestricted" or null`306307    Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.308309    - `Geos = array of BetaAllowedInferenceGeo`310311      - `"global"`312313      - `"us"`314315    - `Unrestricted = "unrestricted"`316317  - `default_inference_geo: optional "global" or "us" or null`318319    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"`.320321    - `"global"`322323    - `"us"`324325  - `workspace_geo: optional "us" or null`326327    Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.328329- `display_color: optional string or null`330331  Hex color code representing the Workspace in the Anthropic Console.332333  maxLength: 7, pattern: ^#[0-9A-Fa-f]{6}$334335- `external_key_id: optional string or null`336337  ID of the customer-managed encryption key (CMEK) configuration to use for this338  Workspace. Setting this field requires CMEK to be enabled for your339  organization. When set, data stored for this Workspace is encrypted with the340  referenced key. Create key configurations with the External Keys API. On341  Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a342  single-Region key in the same AWS account and Region as the Workspace. On that343  platform the key is validated against this Workspace when it is attached, so a344  key-policy problem is reported as an error on this request. This field is write-once:345  once a key is attached to a Workspace it cannot be detached or replaced. To346  rotate key material, rotate the underlying key on your cloud KMS; the347  `external_key_id` stays the same.348349- `tags: optional map[string] or null`350351  User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.352353### Returns354355- `BetaWorkspace object`356357  - `type: "workspace"`358359    Object type.360361    For Workspaces, this is always `"workspace"`.362363    default: workspace364365  - `id: string`366367    ID of the Workspace.368369  - `archived_at: string or null`370371    RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.372373    format: date-time374375  - `compartment_id: string`376377    Identifier for this Workspace's encryption compartment. When you configure a378    customer-managed encryption key (CMEK) on AWS, reference this value in your379    KMS key-policy condition so the key is scoped to this compartment. On GCP and380    Azure, Anthropic enforces the compartment binding automatically; you do not381    need to reference this value in your key configuration. See the CMEK382    integration guide for the required key configuration; unless your organization383    is on Claude Platform on AWS, it includes a separate value used during key384    validation. On Claude Platform on AWS there is no separate validation value:385    the key is validated against this Workspace's own value when it is attached, so386    if your key policy uses the compartment condition, add this value to it before387    attaching the key.388389  - `created_at: string`390391    RFC 3339 datetime string indicating when the Workspace was created.392393    format: date-time394395  - `data_residency: BetaDataResidency`396397    Data residency configuration.398399    - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`400401      Permitted inference geo values. 'unrestricted' means all geos are allowed.402403      - `Geos = array of BetaAllowedInferenceGeo`404405        - `"global"`406407        - `"us"`408409      - `Unrestricted = "unrestricted"`410411    - `default_inference_geo: "global" or "us"`412413      Default inference geo applied when requests omit the parameter.414415      - `"global"`416417      - `"us"`418419    - `workspace_geo: "us"`420421      Geographic region for workspace data storage. Immutable after creation.422423  - `display_color: string`424425    Hex color code representing the Workspace in the Anthropic Console.426427  - `external_key_id: string or null`428429    ID of the customer-managed encryption key (CMEK) configuration to use for this430    Workspace. Setting this field requires CMEK to be enabled for your431    organization. When set, data stored for this Workspace is encrypted with the432    referenced key. Create key configurations with the External Keys API. On433    Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a434    single-Region key in the same AWS account and Region as the Workspace. On that435    platform the key is validated against this Workspace when it is attached, so a436    key-policy problem is reported as an error on this request. This field is write-once:437    once a key is attached to a Workspace it cannot be detached or replaced. To438    rotate key material, rotate the underlying key on your cloud KMS; the439    `external_key_id` stays the same.440441  - `name: string`442443    Name of the Workspace.444445  - `tags: map[string]`446447    User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.448449### Example450451```bash452curl https://api.anthropic.com/v1/organizations/workspaces \453    -H 'Content-Type: application/json' \454    -H 'anthropic-version: 2023-06-01' \455    -H "X-Api-Key: $ANTHROPIC_API_KEY" \456    -d '{457          "name": "x",458          "display_color": "#6C5BB9",459          "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",460          "tags": {461            "env": "prod",462            "team": "platform"463          }464        }'465```466467#### Response (200)468469```json470{471  "id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",472  "archived_at": "2024-11-01T23:59:27.427722Z",473  "compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",474  "created_at": "2024-10-30T23:58:27.427722Z",475  "data_residency": {476    "allowed_inference_geos": "unrestricted",477    "default_inference_geo": "global",478    "workspace_geo": "us"479  },480  "display_color": "#6C5BB9",481  "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",482  "name": "Workspace Name",483  "tags": {484    "env": "prod",485    "team": "platform"486  },487  "type": "workspace"488}489```490491## Get Workspace492493**GET** `/v1/organizations/workspaces/{workspace_id}`494495Get Workspace496497### Path parameters498499- `workspace_id: string`500501  ID of the Workspace.502503### Returns504505- `BetaWorkspace object`506507  - `type: "workspace"`508509    Object type.510511    For Workspaces, this is always `"workspace"`.512513    default: workspace514515  - `id: string`516517    ID of the Workspace.518519  - `archived_at: string or null`520521    RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.522523    format: date-time524525  - `compartment_id: string`526527    Identifier for this Workspace's encryption compartment. When you configure a528    customer-managed encryption key (CMEK) on AWS, reference this value in your529    KMS key-policy condition so the key is scoped to this compartment. On GCP and530    Azure, Anthropic enforces the compartment binding automatically; you do not531    need to reference this value in your key configuration. See the CMEK532    integration guide for the required key configuration; unless your organization533    is on Claude Platform on AWS, it includes a separate value used during key534    validation. On Claude Platform on AWS there is no separate validation value:535    the key is validated against this Workspace's own value when it is attached, so536    if your key policy uses the compartment condition, add this value to it before537    attaching the key.538539  - `created_at: string`540541    RFC 3339 datetime string indicating when the Workspace was created.542543    format: date-time544545  - `data_residency: BetaDataResidency`546547    Data residency configuration.548549    - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`550551      Permitted inference geo values. 'unrestricted' means all geos are allowed.552553      - `Geos = array of BetaAllowedInferenceGeo`554555        - `"global"`556557        - `"us"`558559      - `Unrestricted = "unrestricted"`560561    - `default_inference_geo: "global" or "us"`562563      Default inference geo applied when requests omit the parameter.564565      - `"global"`566567      - `"us"`568569    - `workspace_geo: "us"`570571      Geographic region for workspace data storage. Immutable after creation.572573  - `display_color: string`574575    Hex color code representing the Workspace in the Anthropic Console.576577  - `external_key_id: string or null`578579    ID of the customer-managed encryption key (CMEK) configuration to use for this580    Workspace. Setting this field requires CMEK to be enabled for your581    organization. When set, data stored for this Workspace is encrypted with the582    referenced key. Create key configurations with the External Keys API. On583    Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a584    single-Region key in the same AWS account and Region as the Workspace. On that585    platform the key is validated against this Workspace when it is attached, so a586    key-policy problem is reported as an error on this request. This field is write-once:587    once a key is attached to a Workspace it cannot be detached or replaced. To588    rotate key material, rotate the underlying key on your cloud KMS; the589    `external_key_id` stays the same.590591  - `name: string`592593    Name of the Workspace.594595  - `tags: map[string]`596597    User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.598599### Example600601```bash602curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \603    -H 'anthropic-version: 2023-06-01' \604    -H "X-Api-Key: $ANTHROPIC_API_KEY"605```606607#### Response (200)608609```json610{611  "id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",612  "archived_at": "2024-11-01T23:59:27.427722Z",613  "compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",614  "created_at": "2024-10-30T23:58:27.427722Z",615  "data_residency": {616    "allowed_inference_geos": "unrestricted",617    "default_inference_geo": "global",618    "workspace_geo": "us"619  },620  "display_color": "#6C5BB9",621  "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",622  "name": "Workspace Name",623  "tags": {624    "env": "prod",625    "team": "platform"626  },627  "type": "workspace"628}629```630631## Update Workspace632633**POST** `/v1/organizations/workspaces/{workspace_id}`634635Update Workspace636637### Path parameters638639- `workspace_id: string`640641### Body parameters642643- `data_residency: optional BetaDataResidencyUpdateConfig or null`644645  Data residency configuration for the workspace.646647  - `allowed_inference_geos: optional array of BetaAllowedInferenceGeo or "unrestricted" or null`648649    Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list of specific geos.650651    - `Geos = array of BetaAllowedInferenceGeo`652653      - `"global"`654655      - `"us"`656657    - `Unrestricted = "unrestricted"`658659  - `default_inference_geo: optional "global" or "us" or null`660661    Default inference geo applied when requests omit the parameter. Must be a member of `allowed_inference_geos` unless `allowed_inference_geos` is `"unrestricted"`.662663    - `"global"`664665    - `"us"`666667- `display_color: optional string`668669  Hex color code representing the Workspace in the Anthropic Console.670671  maxLength: 7, pattern: ^#[0-9A-Fa-f]{6}$672673- `external_key_id: optional string`674675  ID of the customer-managed encryption key (CMEK) configuration to use for this676  Workspace. Setting this field requires CMEK to be enabled for your677  organization. When set, data stored for this Workspace is encrypted with the678  referenced key. Create key configurations with the External Keys API. On679  Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a680  single-Region key in the same AWS account and Region as the Workspace. On that681  platform the key is validated against this Workspace when it is attached, so a682  key-policy problem is reported as an error on this request. This field is write-once:683  once a key is attached to a Workspace it cannot be detached or replaced. To684  rotate key material, rotate the underlying key on your cloud KMS; the685  `external_key_id` stays the same.686687- `name: optional string`688689  Name of the Workspace.690691  maxLength: 40, minLength: 1692693- `tags: optional map[string] or null`694695  User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.696697### Returns698699- `BetaWorkspace object`700701  - `type: "workspace"`702703    Object type.704705    For Workspaces, this is always `"workspace"`.706707    default: workspace708709  - `id: string`710711    ID of the Workspace.712713  - `archived_at: string or null`714715    RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.716717    format: date-time718719  - `compartment_id: string`720721    Identifier for this Workspace's encryption compartment. When you configure a722    customer-managed encryption key (CMEK) on AWS, reference this value in your723    KMS key-policy condition so the key is scoped to this compartment. On GCP and724    Azure, Anthropic enforces the compartment binding automatically; you do not725    need to reference this value in your key configuration. See the CMEK726    integration guide for the required key configuration; unless your organization727    is on Claude Platform on AWS, it includes a separate value used during key728    validation. On Claude Platform on AWS there is no separate validation value:729    the key is validated against this Workspace's own value when it is attached, so730    if your key policy uses the compartment condition, add this value to it before731    attaching the key.732733  - `created_at: string`734735    RFC 3339 datetime string indicating when the Workspace was created.736737    format: date-time738739  - `data_residency: BetaDataResidency`740741    Data residency configuration.742743    - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`744745      Permitted inference geo values. 'unrestricted' means all geos are allowed.746747      - `Geos = array of BetaAllowedInferenceGeo`748749        - `"global"`750751        - `"us"`752753      - `Unrestricted = "unrestricted"`754755    - `default_inference_geo: "global" or "us"`756757      Default inference geo applied when requests omit the parameter.758759      - `"global"`760761      - `"us"`762763    - `workspace_geo: "us"`764765      Geographic region for workspace data storage. Immutable after creation.766767  - `display_color: string`768769    Hex color code representing the Workspace in the Anthropic Console.770771  - `external_key_id: string or null`772773    ID of the customer-managed encryption key (CMEK) configuration to use for this774    Workspace. Setting this field requires CMEK to be enabled for your775    organization. When set, data stored for this Workspace is encrypted with the776    referenced key. Create key configurations with the External Keys API. On777    Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a778    single-Region key in the same AWS account and Region as the Workspace. On that779    platform the key is validated against this Workspace when it is attached, so a780    key-policy problem is reported as an error on this request. This field is write-once:781    once a key is attached to a Workspace it cannot be detached or replaced. To782    rotate key material, rotate the underlying key on your cloud KMS; the783    `external_key_id` stays the same.784785  - `name: string`786787    Name of the Workspace.788789  - `tags: map[string]`790791    User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.792793### Example794795```bash796curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID \797    -H 'Content-Type: application/json' \798    -H 'anthropic-version: 2023-06-01' \799    -H "X-Api-Key: $ANTHROPIC_API_KEY" \800    -d '{801          "display_color": "#6C5BB9",802          "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",803          "tags": {804            "env": "prod",805            "team": "platform"806          }807        }'808```809810#### Response (200)811812```json813{814  "id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",815  "archived_at": "2024-11-01T23:59:27.427722Z",816  "compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",817  "created_at": "2024-10-30T23:58:27.427722Z",818  "data_residency": {819    "allowed_inference_geos": "unrestricted",820    "default_inference_geo": "global",821    "workspace_geo": "us"822  },823  "display_color": "#6C5BB9",824  "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",825  "name": "Workspace Name",826  "tags": {827    "env": "prod",828    "team": "platform"829  },830  "type": "workspace"831}832```833834## Archive Workspace835836**POST** `/v1/organizations/workspaces/{workspace_id}/archive`837838Archive Workspace839840### Path parameters841842- `workspace_id: string`843844### Returns845846- `BetaWorkspace object`847848  - `type: "workspace"`849850    Object type.851852    For Workspaces, this is always `"workspace"`.853854    default: workspace855856  - `id: string`857858    ID of the Workspace.859860  - `archived_at: string or null`861862    RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.863864    format: date-time865866  - `compartment_id: string`867868    Identifier for this Workspace's encryption compartment. When you configure a869    customer-managed encryption key (CMEK) on AWS, reference this value in your870    KMS key-policy condition so the key is scoped to this compartment. On GCP and871    Azure, Anthropic enforces the compartment binding automatically; you do not872    need to reference this value in your key configuration. See the CMEK873    integration guide for the required key configuration; unless your organization874    is on Claude Platform on AWS, it includes a separate value used during key875    validation. On Claude Platform on AWS there is no separate validation value:876    the key is validated against this Workspace's own value when it is attached, so877    if your key policy uses the compartment condition, add this value to it before878    attaching the key.879880  - `created_at: string`881882    RFC 3339 datetime string indicating when the Workspace was created.883884    format: date-time885886  - `data_residency: BetaDataResidency`887888    Data residency configuration.889890    - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`891892      Permitted inference geo values. 'unrestricted' means all geos are allowed.893894      - `Geos = array of BetaAllowedInferenceGeo`895896        - `"global"`897898        - `"us"`899900      - `Unrestricted = "unrestricted"`901902    - `default_inference_geo: "global" or "us"`903904      Default inference geo applied when requests omit the parameter.905906      - `"global"`907908      - `"us"`909910    - `workspace_geo: "us"`911912      Geographic region for workspace data storage. Immutable after creation.913914  - `display_color: string`915916    Hex color code representing the Workspace in the Anthropic Console.917918  - `external_key_id: string or null`919920    ID of the customer-managed encryption key (CMEK) configuration to use for this921    Workspace. Setting this field requires CMEK to be enabled for your922    organization. When set, data stored for this Workspace is encrypted with the923    referenced key. Create key configurations with the External Keys API. On924    Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a925    single-Region key in the same AWS account and Region as the Workspace. On that926    platform the key is validated against this Workspace when it is attached, so a927    key-policy problem is reported as an error on this request. This field is write-once:928    once a key is attached to a Workspace it cannot be detached or replaced. To929    rotate key material, rotate the underlying key on your cloud KMS; the930    `external_key_id` stays the same.931932  - `name: string`933934    Name of the Workspace.935936  - `tags: map[string]`937938    User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.939940### Example941942```bash943curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/archive \944    -X POST \945    -H 'anthropic-version: 2023-06-01' \946    -H "X-Api-Key: $ANTHROPIC_API_KEY"947```948949#### Response (200)950951```json952{953  "id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",954  "archived_at": "2024-11-01T23:59:27.427722Z",955  "compartment_id": "f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c",956  "created_at": "2024-10-30T23:58:27.427722Z",957  "data_residency": {958    "allowed_inference_geos": "unrestricted",959    "default_inference_geo": "global",960    "workspace_geo": "us"961  },962  "display_color": "#6C5BB9",963  "external_key_id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",964  "name": "Workspace Name",965  "tags": {966    "env": "prod",967    "team": "platform"968  },969  "type": "workspace"970}971```972973## Domain types974975### Beta Allowed Inference Geo976977- `BetaAllowedInferenceGeo = "global" or "us"`978979  - `"global"`980981  - `"us"`982983### Beta Data Residency984985- `BetaDataResidency object`986987  - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`988989    Permitted inference geo values. 'unrestricted' means all geos are allowed.990991    - `Geos = array of BetaAllowedInferenceGeo`992993      - `"global"`994995      - `"us"`996997    - `Unrestricted = "unrestricted"`998999  - `default_inference_geo: "global" or "us"`10001001    Default inference geo applied when requests omit the parameter.10021003    - `"global"`10041005    - `"us"`10061007  - `workspace_geo: "us"`10081009    Geographic region for workspace data storage. Immutable after creation.10101011### Beta Data Residency Create Config10121013- `BetaDataResidencyCreateConfig object`10141015  - `allowed_inference_geos: optional array of BetaAllowedInferenceGeo or "unrestricted" or null`10161017    Permitted inference geo values. Defaults to 'unrestricted' if omitted, which allows all geos. Use the string 'unrestricted' to allow all geos, or a list of specific geos.10181019    - `Geos = array of BetaAllowedInferenceGeo`10201021      - `"global"`10221023      - `"us"`10241025    - `Unrestricted = "unrestricted"`10261027  - `default_inference_geo: optional "global" or "us" or null`10281029    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"`.10301031    - `"global"`10321033    - `"us"`10341035  - `workspace_geo: optional "us" or null`10361037    Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted.10381039### Beta Data Residency Update Config10401041- `BetaDataResidencyUpdateConfig object`10421043  - `allowed_inference_geos: optional array of BetaAllowedInferenceGeo or "unrestricted" or null`10441045    Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list of specific geos.10461047    - `Geos = array of BetaAllowedInferenceGeo`10481049      - `"global"`10501051      - `"us"`10521053    - `Unrestricted = "unrestricted"`10541055  - `default_inference_geo: optional "global" or "us" or null`10561057    Default inference geo applied when requests omit the parameter. Must be a member of `allowed_inference_geos` unless `allowed_inference_geos` is `"unrestricted"`.10581059    - `"global"`10601061    - `"us"`10621063### Beta No Billing Workspace Role10641065- `BetaNoBillingWorkspaceRole = "workspace_admin" or "workspace_developer" or "workspace_restricted_developer" or "workspace_user"`10661067  - `"workspace_admin"`10681069  - `"workspace_developer"`10701071  - `"workspace_restricted_developer"`10721073  - `"workspace_user"`10741075### Beta Workspace10761077- `BetaWorkspace object`10781079  - `type: "workspace"`10801081    Object type.10821083    For Workspaces, this is always `"workspace"`.10841085    default: workspace10861087  - `id: string`10881089    ID of the Workspace.10901091  - `archived_at: string or null`10921093    RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived.10941095    format: date-time10961097  - `compartment_id: string`10981099    Identifier for this Workspace's encryption compartment. When you configure a1100    customer-managed encryption key (CMEK) on AWS, reference this value in your1101    KMS key-policy condition so the key is scoped to this compartment. On GCP and1102    Azure, Anthropic enforces the compartment binding automatically; you do not1103    need to reference this value in your key configuration. See the CMEK1104    integration guide for the required key configuration; unless your organization1105    is on Claude Platform on AWS, it includes a separate value used during key1106    validation. On Claude Platform on AWS there is no separate validation value:1107    the key is validated against this Workspace's own value when it is attached, so1108    if your key policy uses the compartment condition, add this value to it before1109    attaching the key.11101111  - `created_at: string`11121113    RFC 3339 datetime string indicating when the Workspace was created.11141115    format: date-time11161117  - `data_residency: BetaDataResidency`11181119    Data residency configuration.11201121    - `allowed_inference_geos: array of BetaAllowedInferenceGeo or "unrestricted"`11221123      Permitted inference geo values. 'unrestricted' means all geos are allowed.11241125      - `Geos = array of BetaAllowedInferenceGeo`11261127        - `"global"`11281129        - `"us"`11301131      - `Unrestricted = "unrestricted"`11321133    - `default_inference_geo: "global" or "us"`11341135      Default inference geo applied when requests omit the parameter.11361137      - `"global"`11381139      - `"us"`11401141    - `workspace_geo: "us"`11421143      Geographic region for workspace data storage. Immutable after creation.11441145  - `display_color: string`11461147    Hex color code representing the Workspace in the Anthropic Console.11481149  - `external_key_id: string or null`11501151    ID of the customer-managed encryption key (CMEK) configuration to use for this1152    Workspace. Setting this field requires CMEK to be enabled for your1153    organization. When set, data stored for this Workspace is encrypted with the1154    referenced key. Create key configurations with the External Keys API. On1155    Claude Platform on AWS the value is the AWS KMS key ARN, and the key must be a1156    single-Region key in the same AWS account and Region as the Workspace. On that1157    platform the key is validated against this Workspace when it is attached, so a1158    key-policy problem is reported as an error on this request. This field is write-once:1159    once a key is attached to a Workspace it cannot be detached or replaced. To1160    rotate key material, rotate the underlying key on your cloud KMS; the1161    `external_key_id` stays the same.11621163  - `name: string`11641165    Name of the Workspace.11661167  - `tags: map[string]`11681169    User-defined tags as string key-value pairs. Keys may not begin with `anthropic`.11701171### Beta Workspace Member11721173- `BetaWorkspaceMember object`11741175  - `type: "workspace_member"`11761177    Object type.11781179    For Workspace Members, this is always `"workspace_member"`.11801181    default: workspace_member11821183  - `user_id: string`11841185    ID of the User.11861187  - `workspace_id: string`11881189    ID of the Workspace.11901191  - `workspace_role: BetaWorkspaceRole`11921193    Role of the Workspace Member.11941195    - `"workspace_admin"`11961197    - `"workspace_billing"`11981199    - `"workspace_developer"`12001201    - `"workspace_restricted_developer"`12021203    - `"workspace_user"`12041205### Beta Workspace Role12061207- `BetaWorkspaceRole = "workspace_admin" or "workspace_billing" or "workspace_developer" or 2 more`12081209  - `"workspace_admin"`12101211  - `"workspace_billing"`12121213  - `"workspace_developer"`12141215  - `"workspace_restricted_developer"`12161217  - `"workspace_user"`12181219## Workspaces › Rate Limits12201221### List Workspace Rate Limits12221223**GET** `/v1/organizations/workspaces/{workspace_id}/rate_limits`12241225List rate-limit overrides configured for a workspace.12261227Returns only the groups and limiter types that have a workspace-level1228override. Groups without overrides inherit the organization limits and1229are not listed; use `GET /v1/organizations/rate_limits` to see those.12301231When `limit` is omitted, every matching entry is returned in a single1232page; when `limit` truncates the result, follow `next_page` to fetch1233the remaining entries.12341235#### Path parameters12361237- `workspace_id: string`12381239  The ID of the workspace.12401241#### Query parameters12421243- `group_type: optional "batch" or "files" or "model_group" or 3 more`12441245  Filter by group type.12461247  - `"batch"`12481249  - `"files"`12501251  - `"model_group"`12521253  - `"skills"`12541255  - `"token_count"`12561257  - `"web_search"`12581259- `limit: optional number`12601261  Maximum number of items to return per page. Ranges from `1` to `1000`.12621263  When omitted, every remaining entry is returned in a single page and `next_page` is `null`.12641265  maximum: 1000, minimum: 112661267- `page: optional string`12681269  Opaque cursor from a previous response's `next_page`.12701271#### Returns12721273- `data: array of BetaWorkspaceRateLimit`12741275  Rate-limit entries for the workspace, one per group that has at least one override.12761277  - `type: "workspace_rate_limit"`12781279    Object type. Always `workspace_rate_limit` for workspace rate-limit entries.12801281    default: workspace_rate_limit12821283  - `group_type: "batch" or "files" or "model_group" or 3 more`12841285    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`.12861287    - `"batch"`12881289    - `"files"`12901291    - `"model_group"`12921293    - `"skills"`12941295    - `"token_count"`12961297    - `"web_search"`12981299  - `limits: array of BetaWorkspaceRateLimitValue`13001301    The limiter values overridden for this group in this workspace. Limiter types without a workspace override are omitted and inherit the organization value.13021303    - `type: string`13041305      The limiter type (for example, `requests_per_minute` or `input_tokens_per_minute`).13061307    - `org_limit: number or null`13081309      The organization-level value for the same limiter type, for reference. `null` when the organization has no limit configured for this limiter type.13101311    - `value: number`13121313      The workspace-level override value for this limiter type.13141315  - `models: array of string or null`13161317    Model names this entry's limits apply to, including aliases. `null` when `group_type` is not `"model_group"`.13181319  - `rate_limit_id: string`13201321    The `id` of the RateLimit group this override applies to.13221323  - `workspace_id: string`13241325    ID of the Workspace this override applies to.13261327- `next_page: string or null`13281329  Opaque cursor for the next page of results, or `null` when no entries remain beyond this response.13301331#### Example13321333```bash1334curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/rate_limits \1335    -H 'anthropic-version: 2023-06-01' \1336    -H "X-Api-Key: $ANTHROPIC_API_KEY"1337```13381339##### Response (200)13401341```json1342{1343  "data": [1344    {1345      "group_type": "batch",1346      "limits": [1347        {1348          "org_limit": 0,1349          "type": "type",1350          "value": 01351        }1352      ],1353      "models": [1354        "string"1355      ],1356      "rate_limit_id": "rate_limit_id",1357      "type": "workspace_rate_limit",1358      "workspace_id": "workspace_id"1359    }1360  ],1361  "next_page": "next_page"1362}1363```13641365## Workspaces › Members13661367### List Workspace Members13681369**GET** `/v1/organizations/workspaces/{workspace_id}/members`13701371List Workspace Members13721373#### Path parameters13741375- `workspace_id: string`13761377  ID of the Workspace.13781379#### Query parameters13801381- `after_id: optional string`13821383  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.13841385- `before_id: optional string`13861387  ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.13881389- `limit: optional number`13901391  Number of items to return per page.13921393  Defaults to `20`. Ranges from `1` to `1000`.13941395  default: 20, maximum: 1000, minimum: 113961397#### Returns13981399- `data: array of BetaWorkspaceMember`14001401  - `type: "workspace_member"`14021403    Object type.14041405    For Workspace Members, this is always `"workspace_member"`.14061407    default: workspace_member14081409  - `user_id: string`14101411    ID of the User.14121413  - `workspace_id: string`14141415    ID of the Workspace.14161417  - `workspace_role: BetaWorkspaceRole`14181419    Role of the Workspace Member.14201421    - `"workspace_admin"`14221423    - `"workspace_billing"`14241425    - `"workspace_developer"`14261427    - `"workspace_restricted_developer"`14281429    - `"workspace_user"`14301431- `first_id: string or null`14321433  First ID in the `data` list. Can be used as the `before_id` for the previous page.14341435- `has_more: boolean`14361437  Indicates if there are more results in the requested page direction.14381439- `last_id: string or null`14401441  Last ID in the `data` list. Can be used as the `after_id` for the next page.14421443#### Example14441445```bash1446curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \1447    -H 'anthropic-version: 2023-06-01' \1448    -H "X-Api-Key: $ANTHROPIC_API_KEY"1449```14501451##### Response (200)14521453```json1454{1455  "data": [1456    {1457      "type": "workspace_member",1458      "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1459      "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",1460      "workspace_role": "workspace_admin"1461    }1462  ],1463  "first_id": "first_id",1464  "has_more": true,1465  "last_id": "last_id"1466}1467```14681469### Create Workspace Member14701471**POST** `/v1/organizations/workspaces/{workspace_id}/members`14721473Create Workspace Member14741475#### Path parameters14761477- `workspace_id: string`14781479  ID of the Workspace.14801481#### Body parameters14821483- `user_id: string`14841485  ID of the User.14861487- `workspace_role: BetaNoBillingWorkspaceRole`14881489  Role of the new Workspace Member. Cannot be `workspace_billing`.14901491  - `"workspace_admin"`14921493  - `"workspace_developer"`14941495  - `"workspace_restricted_developer"`14961497  - `"workspace_user"`14981499#### Returns15001501- `BetaWorkspaceMember object`15021503  - `type: "workspace_member"`15041505    Object type.15061507    For Workspace Members, this is always `"workspace_member"`.15081509    default: workspace_member15101511  - `user_id: string`15121513    ID of the User.15141515  - `workspace_id: string`15161517    ID of the Workspace.15181519  - `workspace_role: BetaWorkspaceRole`15201521    Role of the Workspace Member.15221523    - `"workspace_admin"`15241525    - `"workspace_billing"`15261527    - `"workspace_developer"`15281529    - `"workspace_restricted_developer"`15301531    - `"workspace_user"`15321533#### Example15341535```bash1536curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members \1537    -H 'Content-Type: application/json' \1538    -H 'anthropic-version: 2023-06-01' \1539    -H "X-Api-Key: $ANTHROPIC_API_KEY" \1540    -d '{1541          "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1542          "workspace_role": "workspace_admin"1543        }'1544```15451546##### Response (200)15471548```json1549{1550  "type": "workspace_member",1551  "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1552  "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",1553  "workspace_role": "workspace_admin"1554}1555```15561557### Get Workspace Member15581559**GET** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`15601561Get Workspace Member15621563#### Path parameters15641565- `workspace_id: string`15661567  ID of the Workspace.15681569- `user_id: string`15701571  ID of the User.15721573#### Returns15741575- `BetaWorkspaceMember object`15761577  - `type: "workspace_member"`15781579    Object type.15801581    For Workspace Members, this is always `"workspace_member"`.15821583    default: workspace_member15841585  - `user_id: string`15861587    ID of the User.15881589  - `workspace_id: string`15901591    ID of the Workspace.15921593  - `workspace_role: BetaWorkspaceRole`15941595    Role of the Workspace Member.15961597    - `"workspace_admin"`15981599    - `"workspace_billing"`16001601    - `"workspace_developer"`16021603    - `"workspace_restricted_developer"`16041605    - `"workspace_user"`16061607#### Example16081609```bash1610curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \1611    -H 'anthropic-version: 2023-06-01' \1612    -H "X-Api-Key: $ANTHROPIC_API_KEY"1613```16141615##### Response (200)16161617```json1618{1619  "type": "workspace_member",1620  "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1621  "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",1622  "workspace_role": "workspace_admin"1623}1624```16251626### Update Workspace Member16271628**POST** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`16291630Update Workspace Member16311632#### Path parameters16331634- `workspace_id: string`16351636  ID of the Workspace.16371638- `user_id: string`16391640  ID of the User.16411642#### Body parameters16431644- `workspace_role: BetaWorkspaceRole`16451646  New workspace role for the User.16471648  - `"workspace_admin"`16491650  - `"workspace_billing"`16511652  - `"workspace_developer"`16531654  - `"workspace_restricted_developer"`16551656  - `"workspace_user"`16571658#### Returns16591660- `BetaWorkspaceMember object`16611662  - `type: "workspace_member"`16631664    Object type.16651666    For Workspace Members, this is always `"workspace_member"`.16671668    default: workspace_member16691670  - `user_id: string`16711672    ID of the User.16731674  - `workspace_id: string`16751676    ID of the Workspace.16771678  - `workspace_role: BetaWorkspaceRole`16791680    Role of the Workspace Member.16811682    - `"workspace_admin"`16831684    - `"workspace_billing"`16851686    - `"workspace_developer"`16871688    - `"workspace_restricted_developer"`16891690    - `"workspace_user"`16911692#### Example16931694```bash1695curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \1696    -H 'Content-Type: application/json' \1697    -H 'anthropic-version: 2023-06-01' \1698    -H "X-Api-Key: $ANTHROPIC_API_KEY" \1699    -d '{1700          "workspace_role": "workspace_admin"1701        }'1702```17031704##### Response (200)17051706```json1707{1708  "type": "workspace_member",1709  "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1710  "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",1711  "workspace_role": "workspace_admin"1712}1713```17141715### Delete Workspace Member17161717**DELETE** `/v1/organizations/workspaces/{workspace_id}/members/{user_id}`17181719Delete Workspace Member17201721#### Path parameters17221723- `workspace_id: string`17241725  ID of the Workspace.17261727- `user_id: string`17281729  ID of the User.17301731#### Returns17321733- `type: "workspace_member_deleted"`17341735  Deleted object type.17361737  For Workspace Members, this is always `"workspace_member_deleted"`.17381739  default: workspace_member_deleted17401741- `user_id: string`17421743  ID of the User.17441745- `workspace_id: string`17461747  ID of the Workspace.17481749#### Example17501751```bash1752curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/members/$USER_ID \1753    -X DELETE \1754    -H 'anthropic-version: 2023-06-01' \1755    -H "X-Api-Key: $ANTHROPIC_API_KEY"1756```17571758##### Response (200)17591760```json1761{1762  "type": "workspace_member_deleted",1763  "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q",1764  "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"1765}1766```17671768## Workspaces › Service Accounts17691770### List Service Account Workspace Members17711772**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts`17731774**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](/docs/en/manage-claude/wif-admin-api).17751776List the service accounts that are members of a workspace.17771778Each entry includes the service account's `workspace_role`. Use `limit`1779and the `next_page` cursor to paginate. Archived workspaces return 400;1780use `GET /service_accounts/{id}/workspaces` to audit memberships of an1781archived workspace. The implicit default-workspace membership is not1782included in this list. Memberships of archived service accounts are1783omitted from the results.17841785#### Path parameters17861787- `workspace_id: string`17881789  ID of the workspace.17901791#### Query parameters17921793- `limit: optional number`17941795  Number of results per page.17961797  default: 20, maximum: 100, minimum: 117981799- `page: optional string`18001801  Opaque cursor from a previous response's `next_page`.18021803#### Headers18041805- `"anthropic-beta": optional array of AnthropicBeta`18061807  Optional header to specify the beta version(s) you want to use.18081809  - `string`18101811  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`18121813    - `"message-batches-2024-09-24"`18141815    - `"prompt-caching-2024-07-31"`18161817    - `"computer-use-2024-10-22"`18181819    - `"computer-use-2025-01-24"`18201821    - `"pdfs-2024-09-25"`18221823    - `"token-counting-2024-11-01"`18241825    - `"token-efficient-tools-2025-02-19"`18261827    - `"output-128k-2025-02-19"`18281829    - `"files-api-2025-04-14"`18301831    - `"mcp-client-2025-04-04"`18321833    - `"mcp-client-2025-11-20"`18341835    - `"dev-full-thinking-2025-05-14"`18361837    - `"interleaved-thinking-2025-05-14"`18381839    - `"code-execution-2025-05-22"`18401841    - `"extended-cache-ttl-2025-04-11"`18421843    - `"context-1m-2025-08-07"`18441845    - `"context-management-2025-06-27"`18461847    - `"model-context-window-exceeded-2025-08-26"`18481849    - `"skills-2025-10-02"`18501851    - `"fast-mode-2026-02-01"`18521853    - `"output-300k-2026-03-24"`18541855    - `"user-profiles-2026-03-24"`18561857    - `"user-profiles-2026-08-18"`18581859    - `"user-profiles-2026-09-04"`18601861    - `"advisor-tool-2026-03-01"`18621863    - `"managed-agents-2026-04-01"`18641865    - `"cache-diagnosis-2026-04-07"`18661867    - `"dreaming-2026-04-21"`18681869    - `"thinking-token-count-2026-05-13"`18701871    - `"server-side-fallback-2026-06-01"`18721873    - `"server-side-fallback-2026-07-01"`18741875    - `"fallback-credit-2026-06-01"`18761877    - `"fallback-credit-2026-07-01"`18781879    - `"agent-memory-2026-07-22"`18801881    - `"mid-conversation-tool-changes-2026-07-01"`18821883    - `"compact-2026-01-12"`18841885    - `"computer-use-2025-11-24"`18861887    - `"mcp-tunnels-2026-06-22"`18881889    - `"structured-outputs-2025-11-13"`18901891    - `"task-budgets-2026-03-13"`18921893    - `"thinking-display-updates-2026-08-18"`18941895    - `"ce-user-management-2026-07-13"`18961897    - `"mid-conversation-output-config-2026-07-01"`18981899    - `"thinking-binding-controls-2026-08-01"`19001901    - `"mid-conversation-system-clear-at-2026-08-21"`19021903    - `"compact-2026-09-04"`19041905#### Returns19061907- `data: array of BetaServiceAccountWorkspaceMember`19081909  - `type: "service_account_workspace_member"`19101911    default: service_account_workspace_member19121913  - `created_by_actor_id: string or null`19141915    Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.19161917  - `implicit: boolean or null`19181919    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.19201921  - `service_account_id: string`19221923    Tagged service account ID (`svac_...`).19241925  - `workspace_id: string`19261927    Tagged workspace ID (`wrkspc_...`).19281929  - `workspace_role: BetaWorkspaceRole`19301931    Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.19321933    - `"workspace_admin"`19341935    - `"workspace_billing"`19361937    - `"workspace_developer"`19381939    - `"workspace_restricted_developer"`19401941    - `"workspace_user"`19421943- `next_page: string or null`19441945  Opaque cursor for the next page, or null if no more results.19461947#### Example19481949```bash1950curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \1951    -H 'anthropic-version: 2023-06-01' \1952    -H "X-Api-Key: $ANTHROPIC_API_KEY"1953```19541955##### Response (200)19561957```json1958{1959  "data": [1960    {1961      "created_by_actor_id": "created_by_actor_id",1962      "implicit": true,1963      "service_account_id": "service_account_id",1964      "type": "service_account_workspace_member",1965      "workspace_id": "workspace_id",1966      "workspace_role": "workspace_admin"1967    }1968  ],1969  "next_page": "next_page"1970}1971```19721973### Create Service Account Workspace Member19741975**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts`19761977**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](/docs/en/manage-claude/wif-admin-api).19781979Add a service account to a workspace with the given `workspace_role`.19801981The role determines what the service account can do in the workspace and1982which workspace-scoped permissions it can be granted when authenticating1983through federation. Every service account is already an implicit1984`workspace_user` member of the default workspace; adding it explicitly1985assigns a chosen role. If the service account is already an explicit1986member of the workspace, its `workspace_role` is replaced with the1987value supplied here. Archived workspaces return 400. Archived service1988accounts cannot be added and are rejected.19891990#### Path parameters19911992- `workspace_id: string`19931994  ID of the workspace.19951996#### Headers19971998- `"anthropic-beta": optional array of AnthropicBeta`19992000  Optional header to specify the beta version(s) you want to use.20012002  - `string`20032004  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`20052006    - `"message-batches-2024-09-24"`20072008    - `"prompt-caching-2024-07-31"`20092010    - `"computer-use-2024-10-22"`20112012    - `"computer-use-2025-01-24"`20132014    - `"pdfs-2024-09-25"`20152016    - `"token-counting-2024-11-01"`20172018    - `"token-efficient-tools-2025-02-19"`20192020    - `"output-128k-2025-02-19"`20212022    - `"files-api-2025-04-14"`20232024    - `"mcp-client-2025-04-04"`20252026    - `"mcp-client-2025-11-20"`20272028    - `"dev-full-thinking-2025-05-14"`20292030    - `"interleaved-thinking-2025-05-14"`20312032    - `"code-execution-2025-05-22"`20332034    - `"extended-cache-ttl-2025-04-11"`20352036    - `"context-1m-2025-08-07"`20372038    - `"context-management-2025-06-27"`20392040    - `"model-context-window-exceeded-2025-08-26"`20412042    - `"skills-2025-10-02"`20432044    - `"fast-mode-2026-02-01"`20452046    - `"output-300k-2026-03-24"`20472048    - `"user-profiles-2026-03-24"`20492050    - `"user-profiles-2026-08-18"`20512052    - `"user-profiles-2026-09-04"`20532054    - `"advisor-tool-2026-03-01"`20552056    - `"managed-agents-2026-04-01"`20572058    - `"cache-diagnosis-2026-04-07"`20592060    - `"dreaming-2026-04-21"`20612062    - `"thinking-token-count-2026-05-13"`20632064    - `"server-side-fallback-2026-06-01"`20652066    - `"server-side-fallback-2026-07-01"`20672068    - `"fallback-credit-2026-06-01"`20692070    - `"fallback-credit-2026-07-01"`20712072    - `"agent-memory-2026-07-22"`20732074    - `"mid-conversation-tool-changes-2026-07-01"`20752076    - `"compact-2026-01-12"`20772078    - `"computer-use-2025-11-24"`20792080    - `"mcp-tunnels-2026-06-22"`20812082    - `"structured-outputs-2025-11-13"`20832084    - `"task-budgets-2026-03-13"`20852086    - `"thinking-display-updates-2026-08-18"`20872088    - `"ce-user-management-2026-07-13"`20892090    - `"mid-conversation-output-config-2026-07-01"`20912092    - `"thinking-binding-controls-2026-08-01"`20932094    - `"mid-conversation-system-clear-at-2026-08-21"`20952096    - `"compact-2026-09-04"`20972098#### Body parameters20992100- `service_account_id: string`21012102  Tagged service account ID to add.21032104- `workspace_role: BetaNoBillingWorkspaceRole`21052106  Role to assign to the service account in this workspace.21072108  - `"workspace_admin"`21092110  - `"workspace_developer"`21112112  - `"workspace_restricted_developer"`21132114  - `"workspace_user"`21152116#### Returns21172118- `BetaServiceAccountWorkspaceMember object`21192120  - `type: "service_account_workspace_member"`21212122    default: service_account_workspace_member21232124  - `created_by_actor_id: string or null`21252126    Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.21272128  - `implicit: boolean or null`21292130    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.21312132  - `service_account_id: string`21332134    Tagged service account ID (`svac_...`).21352136  - `workspace_id: string`21372138    Tagged workspace ID (`wrkspc_...`).21392140  - `workspace_role: BetaWorkspaceRole`21412142    Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.21432144    - `"workspace_admin"`21452146    - `"workspace_billing"`21472148    - `"workspace_developer"`21492150    - `"workspace_restricted_developer"`21512152    - `"workspace_user"`21532154#### Example21552156```bash2157curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \2158    -H 'Content-Type: application/json' \2159    -H 'anthropic-version: 2023-06-01' \2160    -H "X-Api-Key: $ANTHROPIC_API_KEY" \2161    -d '{2162          "service_account_id": "service_account_id",2163          "workspace_role": "workspace_admin"2164        }'2165```21662167##### Response (200)21682169```json2170{2171  "created_by_actor_id": "created_by_actor_id",2172  "implicit": true,2173  "service_account_id": "service_account_id",2174  "type": "service_account_workspace_member",2175  "workspace_id": "workspace_id",2176  "workspace_role": "workspace_admin"2177}2178```21792180### Get Service Account Workspace Member21812182**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`21832184**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](/docs/en/manage-claude/wif-admin-api).21852186Retrieve a service account's membership in a workspace.21872188Returns the membership record, including the service account's2189`workspace_role` in this workspace. Archived workspaces return 400. For2190the default workspace, returns the implicit (`implicit: true`)2191membership when no explicit membership exists; an explicitly added2192membership is returned with its assigned role. An archived service2193account returns 404.21942195#### Path parameters21962197- `workspace_id: string`21982199  ID of the workspace.22002201- `service_account_id: string`22022203  ID of the service account.22042205#### Headers22062207- `"anthropic-beta": optional array of AnthropicBeta`22082209  Optional header to specify the beta version(s) you want to use.22102211  - `string`22122213  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`22142215    - `"message-batches-2024-09-24"`22162217    - `"prompt-caching-2024-07-31"`22182219    - `"computer-use-2024-10-22"`22202221    - `"computer-use-2025-01-24"`22222223    - `"pdfs-2024-09-25"`22242225    - `"token-counting-2024-11-01"`22262227    - `"token-efficient-tools-2025-02-19"`22282229    - `"output-128k-2025-02-19"`22302231    - `"files-api-2025-04-14"`22322233    - `"mcp-client-2025-04-04"`22342235    - `"mcp-client-2025-11-20"`22362237    - `"dev-full-thinking-2025-05-14"`22382239    - `"interleaved-thinking-2025-05-14"`22402241    - `"code-execution-2025-05-22"`22422243    - `"extended-cache-ttl-2025-04-11"`22442245    - `"context-1m-2025-08-07"`22462247    - `"context-management-2025-06-27"`22482249    - `"model-context-window-exceeded-2025-08-26"`22502251    - `"skills-2025-10-02"`22522253    - `"fast-mode-2026-02-01"`22542255    - `"output-300k-2026-03-24"`22562257    - `"user-profiles-2026-03-24"`22582259    - `"user-profiles-2026-08-18"`22602261    - `"user-profiles-2026-09-04"`22622263    - `"advisor-tool-2026-03-01"`22642265    - `"managed-agents-2026-04-01"`22662267    - `"cache-diagnosis-2026-04-07"`22682269    - `"dreaming-2026-04-21"`22702271    - `"thinking-token-count-2026-05-13"`22722273    - `"server-side-fallback-2026-06-01"`22742275    - `"server-side-fallback-2026-07-01"`22762277    - `"fallback-credit-2026-06-01"`22782279    - `"fallback-credit-2026-07-01"`22802281    - `"agent-memory-2026-07-22"`22822283    - `"mid-conversation-tool-changes-2026-07-01"`22842285    - `"compact-2026-01-12"`22862287    - `"computer-use-2025-11-24"`22882289    - `"mcp-tunnels-2026-06-22"`22902291    - `"structured-outputs-2025-11-13"`22922293    - `"task-budgets-2026-03-13"`22942295    - `"thinking-display-updates-2026-08-18"`22962297    - `"ce-user-management-2026-07-13"`22982299    - `"mid-conversation-output-config-2026-07-01"`23002301    - `"thinking-binding-controls-2026-08-01"`23022303    - `"mid-conversation-system-clear-at-2026-08-21"`23042305    - `"compact-2026-09-04"`23062307#### Returns23082309- `BetaServiceAccountWorkspaceMember object`23102311  - `type: "service_account_workspace_member"`23122313    default: service_account_workspace_member23142315  - `created_by_actor_id: string or null`23162317    Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.23182319  - `implicit: boolean or null`23202321    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.23222323  - `service_account_id: string`23242325    Tagged service account ID (`svac_...`).23262327  - `workspace_id: string`23282329    Tagged workspace ID (`wrkspc_...`).23302331  - `workspace_role: BetaWorkspaceRole`23322333    Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.23342335    - `"workspace_admin"`23362337    - `"workspace_billing"`23382339    - `"workspace_developer"`23402341    - `"workspace_restricted_developer"`23422343    - `"workspace_user"`23442345#### Example23462347```bash2348curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \2349    -H 'anthropic-version: 2023-06-01' \2350    -H "X-Api-Key: $ANTHROPIC_API_KEY"2351```23522353##### Response (200)23542355```json2356{2357  "created_by_actor_id": "created_by_actor_id",2358  "implicit": true,2359  "service_account_id": "service_account_id",2360  "type": "service_account_workspace_member",2361  "workspace_id": "workspace_id",2362  "workspace_role": "workspace_admin"2363}2364```23652366### Update Service Account Workspace Member23672368**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`23692370**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](/docs/en/manage-claude/wif-admin-api).23712372Change a service account's role in a workspace.23732374The new `workspace_role` replaces the current one. Only explicit2375memberships can be updated; to set a role on the implicit2376default-workspace membership, add the service account explicitly with2377`POST /workspaces/{workspace_id}/service_accounts`. Archived workspaces2378return 400. Archived service accounts cannot be updated and are2379rejected.23802381#### Path parameters23822383- `workspace_id: string`23842385  ID of the workspace.23862387- `service_account_id: string`23882389  ID of the service account.23902391#### Headers23922393- `"anthropic-beta": optional array of AnthropicBeta`23942395  Optional header to specify the beta version(s) you want to use.23962397  - `string`23982399  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`24002401    - `"message-batches-2024-09-24"`24022403    - `"prompt-caching-2024-07-31"`24042405    - `"computer-use-2024-10-22"`24062407    - `"computer-use-2025-01-24"`24082409    - `"pdfs-2024-09-25"`24102411    - `"token-counting-2024-11-01"`24122413    - `"token-efficient-tools-2025-02-19"`24142415    - `"output-128k-2025-02-19"`24162417    - `"files-api-2025-04-14"`24182419    - `"mcp-client-2025-04-04"`24202421    - `"mcp-client-2025-11-20"`24222423    - `"dev-full-thinking-2025-05-14"`24242425    - `"interleaved-thinking-2025-05-14"`24262427    - `"code-execution-2025-05-22"`24282429    - `"extended-cache-ttl-2025-04-11"`24302431    - `"context-1m-2025-08-07"`24322433    - `"context-management-2025-06-27"`24342435    - `"model-context-window-exceeded-2025-08-26"`24362437    - `"skills-2025-10-02"`24382439    - `"fast-mode-2026-02-01"`24402441    - `"output-300k-2026-03-24"`24422443    - `"user-profiles-2026-03-24"`24442445    - `"user-profiles-2026-08-18"`24462447    - `"user-profiles-2026-09-04"`24482449    - `"advisor-tool-2026-03-01"`24502451    - `"managed-agents-2026-04-01"`24522453    - `"cache-diagnosis-2026-04-07"`24542455    - `"dreaming-2026-04-21"`24562457    - `"thinking-token-count-2026-05-13"`24582459    - `"server-side-fallback-2026-06-01"`24602461    - `"server-side-fallback-2026-07-01"`24622463    - `"fallback-credit-2026-06-01"`24642465    - `"fallback-credit-2026-07-01"`24662467    - `"agent-memory-2026-07-22"`24682469    - `"mid-conversation-tool-changes-2026-07-01"`24702471    - `"compact-2026-01-12"`24722473    - `"computer-use-2025-11-24"`24742475    - `"mcp-tunnels-2026-06-22"`24762477    - `"structured-outputs-2025-11-13"`24782479    - `"task-budgets-2026-03-13"`24802481    - `"thinking-display-updates-2026-08-18"`24822483    - `"ce-user-management-2026-07-13"`24842485    - `"mid-conversation-output-config-2026-07-01"`24862487    - `"thinking-binding-controls-2026-08-01"`24882489    - `"mid-conversation-system-clear-at-2026-08-21"`24902491    - `"compact-2026-09-04"`24922493#### Body parameters24942495- `workspace_role: BetaNoBillingWorkspaceRole`24962497  New role for the service account in this workspace.24982499  - `"workspace_admin"`25002501  - `"workspace_developer"`25022503  - `"workspace_restricted_developer"`25042505  - `"workspace_user"`25062507#### Returns25082509- `BetaServiceAccountWorkspaceMember object`25102511  - `type: "service_account_workspace_member"`25122513    default: service_account_workspace_member25142515  - `created_by_actor_id: string or null`25162517    Tagged ID (`user_...`/`svac_...`) of the actor who created this membership.25182519  - `implicit: boolean or null`25202521    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.25222523  - `service_account_id: string`25242525    Tagged service account ID (`svac_...`).25262527  - `workspace_id: string`25282529    Tagged workspace ID (`wrkspc_...`).25302531  - `workspace_role: BetaWorkspaceRole`25322533    Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role.25342535    - `"workspace_admin"`25362537    - `"workspace_billing"`25382539    - `"workspace_developer"`25402541    - `"workspace_restricted_developer"`25422543    - `"workspace_user"`25442545#### Example25462547```bash2548curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \2549    -H 'Content-Type: application/json' \2550    -H 'anthropic-version: 2023-06-01' \2551    -H "X-Api-Key: $ANTHROPIC_API_KEY" \2552    -d '{2553          "workspace_role": "workspace_admin"2554        }'2555```25562557##### Response (200)25582559```json2560{2561  "created_by_actor_id": "created_by_actor_id",2562  "implicit": true,2563  "service_account_id": "service_account_id",2564  "type": "service_account_workspace_member",2565  "workspace_id": "workspace_id",2566  "workspace_role": "workspace_admin"2567}2568```25692570### Delete Service Account Workspace Member25712572**DELETE** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`25732574**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](/docs/en/manage-claude/wif-admin-api).25752576Remove a service account from a workspace.25772578Removal is idempotent (returns 200 even if the membership was already2579removed). A DELETE against the implicit default-workspace membership2580returns 200 but is a no-op and the membership persists; deleting an2581explicit default-workspace row reverts to the implicit `workspace_user`2582membership. Archived workspaces return 400.25832584#### Path parameters25852586- `workspace_id: string`25872588  ID of the workspace.25892590- `service_account_id: string`25912592  ID of the service account.25932594#### Headers25952596- `"anthropic-beta": optional array of AnthropicBeta`25972598  Optional header to specify the beta version(s) you want to use.25992600  - `string`26012602  - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`26032604    - `"message-batches-2024-09-24"`26052606    - `"prompt-caching-2024-07-31"`26072608    - `"computer-use-2024-10-22"`26092610    - `"computer-use-2025-01-24"`26112612    - `"pdfs-2024-09-25"`26132614    - `"token-counting-2024-11-01"`26152616    - `"token-efficient-tools-2025-02-19"`26172618    - `"output-128k-2025-02-19"`26192620    - `"files-api-2025-04-14"`26212622    - `"mcp-client-2025-04-04"`26232624    - `"mcp-client-2025-11-20"`26252626    - `"dev-full-thinking-2025-05-14"`26272628    - `"interleaved-thinking-2025-05-14"`26292630    - `"code-execution-2025-05-22"`26312632    - `"extended-cache-ttl-2025-04-11"`26332634    - `"context-1m-2025-08-07"`26352636    - `"context-management-2025-06-27"`26372638    - `"model-context-window-exceeded-2025-08-26"`26392640    - `"skills-2025-10-02"`26412642    - `"fast-mode-2026-02-01"`26432644    - `"output-300k-2026-03-24"`26452646    - `"user-profiles-2026-03-24"`26472648    - `"user-profiles-2026-08-18"`26492650    - `"user-profiles-2026-09-04"`26512652    - `"advisor-tool-2026-03-01"`26532654    - `"managed-agents-2026-04-01"`26552656    - `"cache-diagnosis-2026-04-07"`26572658    - `"dreaming-2026-04-21"`26592660    - `"thinking-token-count-2026-05-13"`26612662    - `"server-side-fallback-2026-06-01"`26632664    - `"server-side-fallback-2026-07-01"`26652666    - `"fallback-credit-2026-06-01"`26672668    - `"fallback-credit-2026-07-01"`26692670    - `"agent-memory-2026-07-22"`26712672    - `"mid-conversation-tool-changes-2026-07-01"`26732674    - `"compact-2026-01-12"`26752676    - `"computer-use-2025-11-24"`26772678    - `"mcp-tunnels-2026-06-22"`26792680    - `"structured-outputs-2025-11-13"`26812682    - `"task-budgets-2026-03-13"`26832684    - `"thinking-display-updates-2026-08-18"`26852686    - `"ce-user-management-2026-07-13"`26872688    - `"mid-conversation-output-config-2026-07-01"`26892690    - `"thinking-binding-controls-2026-08-01"`26912692    - `"mid-conversation-system-clear-at-2026-08-21"`26932694    - `"compact-2026-09-04"`26952696#### Returns26972698- `type: "service_account_workspace_member_deleted"`26992700  default: service_account_workspace_member_deleted27012702- `service_account_id: string`27032704  Tagged service account ID (`svac_...`) named in the delete request. Removal is idempotent; see the endpoint description for the implicit-membership no-op.27052706- `workspace_id: string`27072708  Tagged workspace ID (`wrkspc_...`) named in the delete request.27092710#### Example27112712```bash2713curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \2714    -X DELETE \2715    -H 'anthropic-version: 2023-06-01' \2716    -H "X-Api-Key: $ANTHROPIC_API_KEY"2717```27182719##### Response (200)27202721```json2722{2723  "service_account_id": "service_account_id",2724  "type": "service_account_workspace_member_deleted",2725  "workspace_id": "workspace_id"2726}2727```2728
Files main
Menu

Theme