openapi: 3.2.0 info: title: Anthropic Organizations API servers: - url: https://api.anthropic.com tags: - name: Organizations paths: /v1/organizations/api_keys/{api_key_id}?beta=true: get: summary: Get API Key operationId: beta_get_api_key_v1_organizations_api_keys__api_key_id__get parameters: - name: api_key_id in: path required: true schema: type: string description: ID of the API key. title: Api Key Id description: ID of the API key. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaApiKey' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update API Key operationId: beta_update_api_key_v1_organizations_api_keys__api_key_id__post parameters: - name: api_key_id in: path required: true schema: type: string description: ID of the API key. title: Api Key Id description: ID of the API key. - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaApiKeyUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaApiKey' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/api_keys?beta=true: get: summary: List API Keys operationId: beta_list_api_keys_v1_organizations_api_keys_get parameters: - name: before_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. title: Before Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. - name: after_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. title: After Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' default: 20 title: Limit description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' - name: status in: query required: false schema: anyOf: - enum: - active - archived - expired - inactive type: string - type: 'null' description: Filter by API key status. title: Status description: Filter by API key status. - name: workspace_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by Workspace ID. title: Workspace Id description: Filter by Workspace ID. - name: created_by_user_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter by the ID of the User who created the object. title: Created By User Id description: Filter by the ID of the User who created the object. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaListResponse_ApiKey_' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/cost_report?beta=true: get: summary: Get Cost Report operationId: beta_get_cost_report_v1_organizations_cost_report_get parameters: - name: limit in: query required: false schema: type: integer maximum: 31 minimum: 1 description: Maximum number of time buckets to return in the response. examples: - 7 default: 7 title: Limit description: Maximum number of time buckets to return in the response. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Optionally set to the `next_page` token from the previous response. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= - null title: Page description: Optionally set to the `next_page` token from the previous response. - name: starting_at in: query required: true schema: type: string format: date-time description: 'Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.' examples: - '2024-10-30T23:58:27.427722Z' title: Starting At description: 'Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.' - name: ending_at in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' description: Time buckets that end before this RFC 3339 timestamp will be returned. examples: - '2024-10-30T23:58:27.427722Z' title: Ending At description: Time buckets that end before this RFC 3339 timestamp will be returned. - name: group_by[] in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BetaCostReportGroupBy' - type: 'null' description: Group by any subset of the available options. examples: - workspace_id - description title: Group By[] description: Group by any subset of the available options. - name: bucket_width in: query required: false schema: $ref: '#/components/schemas/BetaCostReportTimeBucketWidth' description: Time granularity of the response data. examples: - 1d default: 1d description: Time granularity of the response data. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaGetCostReportResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/external_keys/{external_key_id}/validate?beta=true: post: summary: Validate External Key description: 'Validate an external key config against the customer''s KMS. Anthropic performs an encrypt/decrypt roundtrip against the configured KMS key and waits up to 30 seconds for the result. The response status is `success` if the roundtrip succeeded, or `failure` with an error message if it failed or timed out.' operationId: beta_validate_external_key_v1_organizations_external_keys__external_key_id__validate_post parameters: - name: external_key_id in: path required: true schema: type: string maxLength: 2048 description: ID of the External Key. title: External Key Id description: ID of the External Key. - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaValidateExternalKeyResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/external_keys/{external_key_id}?beta=true: get: summary: Get External Key description: Retrieve a single external key config in the caller's organization by ID. operationId: beta_get_external_key_v1_organizations_external_keys__external_key_id__get parameters: - name: external_key_id in: path required: true schema: type: string maxLength: 2048 description: ID of the External Key. title: External Key Id description: ID of the External Key. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaExternalKey' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update External Key description: 'Partially update an external key config. Omitted fields are left unchanged. `display_name` is always editable. `geo` and `provider_config` cannot be changed once any workspace references this config, because previously encrypted data requires the original key identity to decrypt.' operationId: beta_update_external_key_v1_organizations_external_keys__external_key_id__post parameters: - name: external_key_id in: path required: true schema: type: string maxLength: 2048 description: ID of the External Key. title: External Key Id description: ID of the External Key. - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaExternalKeyUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaExternalKey' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations delete: summary: Delete External Key description: 'Delete an external key config. The request is rejected if any workspace still references this config.' operationId: beta_delete_external_key_v1_organizations_external_keys__external_key_id__delete parameters: - name: external_key_id in: path required: true schema: type: string maxLength: 2048 description: ID of the External Key. title: External Key Id description: ID of the External Key. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaDeleteExternalKeyResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/external_keys?beta=true: post: summary: Create External Key description: Create an external key config owned by the caller's organization. operationId: beta_create_external_key_v1_organizations_external_keys_post parameters: - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaExternalKeyCreateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaExternalKey' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List External Keys description: 'List external key configs in the caller''s organization. Results are ordered by creation time (newest first). Use the `next_page` cursor from the response to fetch subsequent pages.' operationId: beta_list_external_keys_v1_organizations_external_keys_get parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaExternalKeyListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_issuers/{federation_issuer_id}/archive?beta=true: post: summary: Archive Federation Issuer description: '**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). Archive a federation issuer. Idempotent; re-archiving returns the issuer with its original `archived_at`. Rejected with 400 if any live (non-archived) federation rule still references the issuer; archive those rules first (a rule''s issuer cannot be changed), or recreate them against another issuer.' operationId: beta_archive_federation_issuer_v1_organizations_federation_issuers__federation_issuer_id__archive_post parameters: - name: federation_issuer_id in: path required: true schema: type: string description: ID of the federation issuer to archive. title: Federation Issuer Id description: ID of the federation issuer to archive. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuer' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_issuers/{federation_issuer_id}?beta=true: get: summary: Get Federation Issuer description: '**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). Retrieve a federation issuer by its ID (`fdis_...`).' operationId: beta_get_federation_issuer_v1_organizations_federation_issuers__federation_issuer_id__get parameters: - name: federation_issuer_id in: path required: true schema: type: string description: ID of the federation issuer. title: Federation Issuer Id description: ID of the federation issuer. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuer' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update Federation Issuer description: '**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). Partially update a federation issuer. Setting `jwks` replaces the full JWKS shape at once. Archived issuers cannot be updated; this returns 400. Create a new issuer instead. Updating an issuer that backs a rule with a scope outside `workspace:developer` or `workspace:inference` requires a Console session.' operationId: beta_update_federation_issuer_v1_organizations_federation_issuers__federation_issuer_id__post parameters: - name: federation_issuer_id in: path required: true schema: type: string description: ID of the federation issuer to update. title: Federation Issuer Id description: ID of the federation issuer to update. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuerUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuer' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_issuers?beta=true: post: summary: Create Federation Issuer description: '**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). Register an OIDC issuer that Anthropic will trust for workload identity federation in your organization. The `jwks` field controls how the issuer''s signing keys are obtained and takes one of three shapes selected by `type`: `discovery` (resolve keys through OIDC discovery), `explicit_url` (fetch keys from a fixed JWKS URL), or `inline` (provide a static key set). When `jwks.type` is `discovery` and no `discovery_base` is set, the issuer URL must be publicly reachable over HTTPS so Anthropic can fetch the discovery document; for `explicit_url` and `inline` modes the issuer URL is only matched as the JWT''s `iss` claim and is not fetched.' operationId: beta_create_federation_issuer_v1_organizations_federation_issuers_post parameters: - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuerCreateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuer' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List Federation Issuers description: '**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). List federation issuers in your organization. Archived issuers are excluded unless `include_archived=true`.' operationId: beta_list_federation_issuers_v1_organizations_federation_issuers_get parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: include_archived in: query required: false schema: type: boolean description: Include archived resources. Defaults to false. default: false title: Include Archived description: Include archived resources. Defaults to false. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationIssuerListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_rules/{federation_rule_id}/archive?beta=true: post: summary: Archive Federation Rule description: '**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). Archive a federation rule. Token exchange through this rule stops immediately. Idempotent; re-archiving returns the rule with its original `archived_at`. Archiving clears the rule''s workspace targeting (`workspace_id` and `workspace_ids` are emptied). Tokens already minted before archive remain valid until they expire. OAuth callers may only manage rules whose `oauth_scope` is `workspace:developer` or `workspace:inference`; other scopes require a Console session.' operationId: beta_archive_federation_rule_v1_organizations_federation_rules__federation_rule_id__archive_post parameters: - name: federation_rule_id in: path required: true schema: type: string description: ID of the federation rule to archive. title: Federation Rule Id description: ID of the federation rule to archive. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRule' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}?beta=true: delete: summary: Remove Federation Rule Workspace description: '**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). Disable a federation rule for a workspace. Idempotent; succeeds even if the enablement was already removed. OAuth callers may only manage rules whose `oauth_scope` is `workspace:developer` or `workspace:inference`; other scopes require a Console session.' operationId: beta_remove_federation_rule_workspace_v1_organizations_federation_rules__federation_rule_id__workspaces__workspace_id__delete parameters: - name: federation_rule_id in: path required: true schema: type: string description: ID of the federation rule. title: Federation Rule Id description: ID of the federation rule. - name: workspace_id in: path required: true schema: type: string description: ID of the workspace to disable for. title: Workspace Id description: ID of the workspace to disable for. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaRemoveFederationRuleWorkspaceResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_rules/{federation_rule_id}/workspaces?beta=true: post: summary: Add Federation Rule Workspace description: '**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). Enable a federation rule for a workspace. Idempotent; re-enabling returns the existing enablement. The rule and workspace must both belong to your organization. Membership of the rule''s target service account in this workspace is not checked at enablement: token exchange into this workspace is rejected unless the target is a member (it is implicitly a member of the default workspace). Archived rules are rejected with 400. OAuth callers may only manage rules whose `oauth_scope` is `workspace:developer` or `workspace:inference`; other scopes require a Console session.' operationId: beta_add_federation_rule_workspace_v1_organizations_federation_rules__federation_rule_id__workspaces_post parameters: - name: federation_rule_id in: path required: true schema: type: string description: ID of the federation rule. title: Federation Rule Id description: ID of the federation rule. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaAddFederationRuleWorkspaceParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRuleWorkspace' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List Federation Rule Workspaces description: '**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). List workspaces where this federation rule is enabled. Returns all workspace enablements in a single response; the `limit` and `page` parameters are accepted but have no effect, and `next_page` is always `null`. Returns explicit per-workspace enablements only; for rules with `applies_to_all_workspaces` or a legacy single `workspace_id`, check those fields on the rule itself.' operationId: beta_list_federation_rule_workspaces_v1_organizations_federation_rules__federation_rule_id__workspaces_get parameters: - name: federation_rule_id in: path required: true schema: type: string description: ID of the federation rule. title: Federation Rule Id description: ID of the federation rule. - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRuleWorkspaceListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_rules/{federation_rule_id}?beta=true: get: summary: Get Federation Rule description: '**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). Retrieve a federation rule by its ID (`fdrl_...`).' operationId: beta_get_federation_rule_v1_organizations_federation_rules__federation_rule_id__get parameters: - name: federation_rule_id in: path required: true schema: type: string description: ID of the federation rule. title: Federation Rule Id description: ID of the federation rule. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRule' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update Federation Rule description: '**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). Partially update a federation rule. `issuer_id` is immutable. `match` and `target` are replaced as whole objects when set. Referenced service accounts and workspaces must exist in your organization; invalid references are rejected with a 400 error. Archived rules cannot be updated; this returns 400. Create a new rule instead. Rules on well-known shared issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud, Google) must constrain tenant identity via an identity-bearing claim, a tenant-pinning subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition referencing one of those identity claims (e.g. `claims.repository_owner`). On these issuers the requirement is re-checked on every update; if an existing rule''s stored match does not yet constrain tenant identity, any update (even a rename or description change) must also supply a conforming `match` in the same request. OAuth callers may only manage rules whose `oauth_scope` is `workspace:developer` or `workspace:inference`; other scopes require a Console session.' operationId: beta_update_federation_rule_v1_organizations_federation_rules__federation_rule_id__post parameters: - name: federation_rule_id in: path required: true schema: type: string description: ID of the federation rule to update. title: Federation Rule Id description: ID of the federation rule to update. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaFederationRuleUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRule' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/federation_rules?beta=true: post: summary: Create Federation Rule description: '**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). Create a federation rule owned by your organization. The referenced issuer and the target service account must already exist in the same organization; invalid references are rejected with a 400 error. The workspace reference is validated. Membership is not checked at rule creation: token exchange resolves a single enabled workspace per call and is rejected unless the target service account is a member of that workspace (it is implicitly a member of the default workspace). Rules on well-known shared issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud, Google) must constrain tenant identity via an identity-bearing claim, a tenant-pinning subject prefix (such as `repo:YOUR_ORG/...`), or a CEL condition referencing one of those identity claims (e.g. `claims.repository_owner`). OAuth callers may only manage rules whose `oauth_scope` is `workspace:developer` or `workspace:inference`; other scopes require a Console session.' operationId: beta_create_federation_rule_v1_organizations_federation_rules_post parameters: - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaFederationRuleCreateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRule' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List Federation Rules description: '**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). List federation rules in your organization. Optionally filter by issuer with `issuer_id`. Archived rules are excluded unless `include_archived=true`.' operationId: beta_list_federation_rules_v1_organizations_federation_rules_get parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: issuer_id in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter to rules referencing this federation issuer. title: Issuer Id description: Filter to rules referencing this federation issuer. - name: include_archived in: query required: false schema: type: boolean description: Include archived resources. Defaults to false. default: false title: Include Archived description: Include archived resources. Defaults to false. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaFederationRuleListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/invites/{invite_id}?beta=true: get: summary: Get Invite description: Retrieve an invite by ID. operationId: beta_get_invite_v1_organizations_invites__invite_id__get parameters: - name: invite_id in: path required: true schema: type: string description: ID of the Invite. title: Invite Id description: ID of the Invite. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaInviteSchema' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations delete: summary: Delete Invite description: Delete a pending invite. operationId: beta_delete_invite_v1_organizations_invites__invite_id__delete parameters: - name: invite_id in: path required: true schema: type: string description: ID of the Invite. title: Invite Id description: ID of the Invite. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaDeleteInviteResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/invites?beta=true: post: summary: Create Invite description: 'Invite a user to join the organization by email. On plans that draw members from a finite pool of purchased seats, the invite automatically consumes a seat from the lowest tier with availability; there is no seat-tier parameter. When no seat is free the request fails with a 400 error rather than purchasing a seat.' operationId: beta_create_invite_v1_organizations_invites_post parameters: - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaCreateInviteParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaInviteSchema' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List Invites description: List the organization's invites. operationId: beta_list_invites_v1_organizations_invites_get parameters: - name: before_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. title: Before Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. - name: after_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. title: After Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' default: 20 title: Limit description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' - name: statuses[] in: query required: false schema: type: array items: enum: - accepted - expired - pending type: string description: Filter by Invite status. Repeatable; values are OR'ed together. Omit to return `pending`, `accepted`, and `expired` Invites alike. title: Statuses[] description: Filter by Invite status. Repeatable; values are OR'ed together. Omit to return `pending`, `accepted`, and `expired` Invites alike. - name: email in: query required: false schema: type: string format: email description: Filter by the email address the Invite was sent to. Matches the same way as the Users list's `email` filter (normalized, case-insensitive). title: Email description: Filter by the email address the Invite was sent to. Matches the same way as the Users list's `email` filter (normalized, case-insensitive). - name: roles[] in: query required: false schema: type: array items: type: string description: 'Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR''ed together. Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.' title: Roles[] description: 'Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR''ed together. Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaListResponse_InviteSchema_' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/me?beta=true: get: summary: Get Current Organization description: Retrieve information about the organization associated with the authenticated API key. operationId: beta_get_current_organization_v1_organizations_me_get parameters: - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationSchema' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/rate_limits?beta=true: get: summary: List Organization Rate Limits description: 'List Messages API rate limits for your organization. Each entry corresponds to one rate-limit group (either a model family or an API-surface category such as the Files API or Message Batches) and contains the set of limiter values that apply to it. This endpoint currently returns every matching entry in a single page regardless of `limit`; follow `next_page` so that clients keep working when pagination is enabled.' operationId: beta_get_org_rate_limits_v1_organizations_rate_limits_get parameters: - name: model in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter to the single entry containing this model. Accepts full model names and aliases. Returns 404 if the model is not found or has no rate limits for this organization. title: Model description: Filter to the single entry containing this model. Accepts full model names and aliases. Returns 404 if the model is not found or has no rate limits for this organization. - name: group_type in: query required: false schema: anyOf: - enum: - batch - files - model_group - skills - token_count - web_search type: string - type: 'null' description: Filter by group type. title: Group Type description: Filter by group type. - name: limit in: query required: false schema: anyOf: - type: integer maximum: 1000 minimum: 1 - type: 'null' description: 'Maximum number of items to return per page. Ranges from `1` to `1000`. Accepted for request-shape compatibility and currently ignored: every entry is returned in a single page.' title: Limit description: 'Maximum number of items to return per page. Ranges from `1` to `1000`. Accepted for request-shape compatibility and currently ignored: every entry is returned in a single page.' - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaRateLimitListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/service_accounts/{service_account_id}/archive?beta=true: post: summary: Archive Service Account description: '**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). Archive a service account. Idempotent; re-archiving returns the service account with its original `archived_at`. Rejected with 400 if any live (non-archived) federation rule still targets this service account, same as issuer archival; archive those rules first or change their target to another service account.' operationId: beta_archive_service_account_v1_organizations_service_accounts__service_account_id__archive_post parameters: - name: service_account_id in: path required: true schema: type: string description: ID of the service account to archive. title: Service Account Id description: ID of the service account to archive. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccount' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}?beta=true: delete: summary: Remove Workspace From Service Account description: '**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). Remove a service account from a workspace. Mirror of `DELETE /workspaces/{workspace_id}/service_accounts/{service_account_id}`, addressed from the service-account side. Removal is idempotent (returns 200 even if the membership was already removed). A DELETE against the implicit default-workspace membership returns 200 but is a no-op and the membership persists; deleting an explicit default-workspace row reverts to the implicit `workspace_user` membership. Archived workspaces return 400.' operationId: beta_remove_workspace_from_service_account_v1_organizations_service_accounts__service_account_id__workspaces__workspace_id__delete parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the workspace. title: Workspace Id description: ID of the workspace. - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberDeleteResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/service_accounts/{service_account_id}/workspaces?beta=true: get: summary: List Workspaces For Service Account description: '**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). List the workspaces a service account is a member of. Each entry includes the service account''s `workspace_role` in that workspace. Use `limit` and the `next_page` cursor to paginate. When the service account has no explicit default-workspace membership, the implicit (`implicit: true`) membership is returned as the first entry on the first page; with `limit=1` the first page may return up to 2 entries (the implicit entry plus one explicit membership) so a pagination cursor can be derived. Memberships are returned only while the service account is active. Without a `page` cursor, an archived service account returns an empty list. A `page` cursor that does not match an active membership returns a 400 invalid-request error. A cursor stops matching when the membership is removed, the workspace is deleted, or the service account is archived. Restart pagination from the first page to recover.' operationId: beta_list_workspaces_for_service_account_v1_organizations_service_accounts__service_account_id__workspaces_get parameters: - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Add Workspace To Service Account description: '**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). Add a service account to a workspace with the given `workspace_role`. Mirror of `POST /workspaces/{workspace_id}/service_accounts`, addressed from the service-account side; both create the same membership. If the service account is already an explicit member of the workspace, its `workspace_role` is replaced with the value supplied here. Archived workspaces return 400. Archived service accounts cannot be added and are rejected.' operationId: beta_add_workspace_to_service_account_v1_organizations_service_accounts__service_account_id__workspaces_post parameters: - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberCreateFromSAParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMember' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/service_accounts/{service_account_id}?beta=true: get: summary: Get Service Account description: '**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). Retrieve a service account by its ID (`svac_...`).' operationId: beta_get_service_account_v1_organizations_service_accounts__service_account_id__get parameters: - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccount' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update Service Account description: '**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). Update a service account. Only `description` and `organization_role` are mutable; `name` cannot be changed. Archived service accounts cannot be updated; this returns 400. Setting `organization_role` to `admin` (even when unchanged) requires an interactive credential (a user OAuth token or a Console session).' operationId: beta_update_service_account_v1_organizations_service_accounts__service_account_id__post parameters: - name: service_account_id in: path required: true schema: type: string description: ID of the service account to update. title: Service Account Id description: ID of the service account to update. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccount' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/service_accounts?beta=true: post: summary: Create Service Account description: '**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). Create a service account. A service account is a named workload identity that federation rules target. `organization_role` is `developer` (default) or `admin`; a rule may only be created or retargeted to grant `org:admin` scope when the target''s `organization_role` is `admin`. Creating an `admin`-role service account requires an interactive credential (a user OAuth token or a Console session) — a workload may only create `developer`-role service accounts.' operationId: beta_create_service_account_v1_organizations_service_accounts_post parameters: - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountCreateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccount' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List Service Accounts description: '**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). List service accounts in the caller''s organization. Results are ordered by creation time, newest first. Use `limit` and the `next_page` cursor to paginate; set `include_archived=true` to include archived service accounts.' operationId: beta_list_service_accounts_v1_organizations_service_accounts_get parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: include_archived in: query required: false schema: type: boolean description: Include archived resources. Defaults to false. default: false title: Include Archived description: Include archived resources. Defaults to false. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}/archive?beta=true: post: summary: Archive Tunnel description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Archive a tunnel. Archival is irreversible. Every non-archived certificate on the tunnel is archived in the same operation, the hostname is retired and never re-allocated, and the tunnel token is invalidated. Retrying against an already-archived tunnel returns the existing record unchanged.' operationId: beta_archive_tunnel_v1_organizations_tunnels__tunnel_id__archive_post deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnel' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}/certificates/{certificate_id}/archive?beta=true: post: summary: Archive Tunnel Certificate description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Archive a certificate, removing it from the set Anthropic trusts for this tunnel. The certificate record is retained. Archiving the last non-archived certificate is permitted; the tunnel rejects MCP traffic until a new certificate is added.' operationId: beta_archive_certificate_v1_organizations_tunnels__tunnel_id__certificates__certificate_id__archive_post deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: certificate_id in: path required: true schema: type: string description: ID of the Tunnel Certificate. title: Certificate Id description: ID of the Tunnel Certificate. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnelCertificate' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}/certificates/{certificate_id}?beta=true: get: summary: Get Tunnel Certificate description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Retrieve a single certificate registered on a tunnel by ID.' operationId: beta_get_certificate_v1_organizations_tunnels__tunnel_id__certificates__certificate_id__get deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: certificate_id in: path required: true schema: type: string description: ID of the Tunnel Certificate. title: Certificate Id description: ID of the Tunnel Certificate. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnelCertificate' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}/certificates?beta=true: post: summary: Create Tunnel Certificate description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Register a public CA certificate for the tunnel. Anthropic verifies the gateway''s server certificate against this CA when it terminates the inner TLS session. The PEM body must contain exactly one X.509 certificate and no private-key material. A tunnel holds at most two non-archived certificates.' operationId: beta_create_certificate_v1_organizations_tunnels__tunnel_id__certificates_post deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaCreateTunnelCertificateParams' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnelCertificate' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations get: summary: List Tunnel Certificates description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. List the certificates registered on a tunnel. Archived certificates are excluded unless `include_archived` is set.' operationId: beta_list_certificates_v1_organizations_tunnels__tunnel_id__certificates_get deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: 'A tunnel has at most two active certificates, so this list is not paginated.' title: Page description: 'A tunnel has at most two active certificates, so this list is not paginated.' - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: Maximum number of certificates to return. default: 20 title: Limit description: Maximum number of certificates to return. - name: include_archived in: query required: false schema: type: boolean description: 'Include archived certificates in the results. Archived certificates are excluded by default.' default: false title: Include Archived description: 'Include archived certificates in the results. Archived certificates are excluded by default.' - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaTunnelCertificateListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}/reveal_token?beta=true: post: summary: Reveal Tunnel Token description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Return the tunnel''s current connection token. The value is fetched live on each call; Anthropic does not store it. Repeated calls return the same value until the token is rotated. Exposed as `POST` so the token does not appear in intermediary access logs.' operationId: beta_reveal_tunnel_token_v1_organizations_tunnels__tunnel_id__reveal_token_post deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnelToken' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}/rotate_token?beta=true: post: summary: Rotate Tunnel Token description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Invalidate the tunnel''s current token for new connections and return a fresh value. Established connections are not severed by rotation; a connector restarted after rotation must use the new value. An optional `reason` is captured for operational context.' operationId: beta_rotate_tunnel_token_v1_organizations_tunnels__tunnel_id__rotate_token_post deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: content: application/json: schema: anyOf: - $ref: '#/components/schemas/BetaRotateTunnelTokenParams' - type: 'null' title: Params responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnelToken' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels/{tunnel_id}?beta=true: get: summary: Get Tunnel description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. Retrieve a single tunnel in the caller''s organization by ID.' operationId: beta_get_tunnel_v1_organizations_tunnels__tunnel_id__get deprecated: true parameters: - name: tunnel_id in: path required: true schema: type: string description: ID of the Tunnel. title: Tunnel Id description: ID of the Tunnel. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaOrganizationTunnel' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/tunnels?beta=true: get: summary: List Tunnels description: '**Deprecated.** This Admin API endpoint is superseded by `/v1/tunnels` on the Claude API and will be removed after a migration window. New integrations should use [`/v1/tunnels`](/docs/en/api/beta/tunnels) with the `anthropic-beta: mcp-tunnels-2026-06-22` header and a WIF token carrying the `workspace:manage_tunnels` scope. Existing integrations continue to work with the `mcp-tunnels-2026-05-19` header and `org:manage_tunnels` scope during the migration window. List the organization''s tunnels. Results span the caller''s organization, ordered by creation time (newest first). Use `workspace_id` to filter to a single workspace; archived tunnels are excluded unless `include_archived` is set.' operationId: beta_list_tunnels_v1_organizations_tunnels_get deprecated: true parameters: - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: 'Opaque pagination cursor from a previous response''s `next_page`. Omit to fetch the first page.' examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= title: Page description: 'Opaque pagination cursor from a previous response''s `next_page`. Omit to fetch the first page.' - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: Maximum number of tunnels to return in a single page. default: 20 title: Limit description: Maximum number of tunnels to return in a single page. - name: workspace_id in: query required: false schema: anyOf: - type: string - type: 'null' description: 'Return only tunnels in this Workspace. Accepts a `wrkspc_`-prefixed Workspace ID; omit to list tunnels across all Workspaces.' examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ title: Workspace Id description: 'Return only tunnels in this Workspace. Accepts a `wrkspc_`-prefixed Workspace ID; omit to list tunnels across all Workspaces.' - name: include_archived in: query required: false schema: type: boolean description: 'Include archived tunnels in the results. Archived tunnels are excluded by default.' default: false title: Include Archived description: 'Include archived tunnels in the results. Archived tunnels are excluded by default.' - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaTunnelListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/usage_report/claude_code?beta=true: get: summary: Get Claude Code Usage Report description: 'Retrieve daily aggregated usage metrics for Claude Code users. Enables organizations to analyze developer productivity and build custom dashboards.' operationId: beta_get_claude_code_usage_report_v1_organizations_usage_report_claude_code_get parameters: - name: starting_at in: query required: true schema: type: string pattern: ^\d{4}-\d{2}-\d{2}$ description: UTC date in YYYY-MM-DD format. Returns metrics for this single day only. examples: - '2026-07-01' format: date title: Starting At description: UTC date in YYYY-MM-DD format. Returns metrics for this single day only. - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: 'Number of records per page (default: 20, max: 1000).' default: 20 title: Limit description: 'Number of records per page (default: 20, max: 1000).' - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor token from previous response's `next_page` field. title: Page description: Opaque cursor token from previous response's `next_page` field. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaGetClaudeCodeUsageReportResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/usage_report/messages?beta=true: get: summary: Get Messages Usage Report operationId: beta_get_messages_usage_report_v1_organizations_usage_report_messages_get parameters: - name: limit in: query required: false schema: type: integer description: 'Maximum number of time buckets to return in the response. The default and max limits depend on `bucket_width`: • `"1d"`: Default of 7 days, maximum of 31 days • `"1h"`: Default of 24 hours, maximum of 168 hours • `"1m"`: Default of 60 minutes, maximum of 1440 minutes' examples: - 7 title: Limit description: 'Maximum number of time buckets to return in the response. The default and max limits depend on `bucket_width`: • `"1d"`: Default of 7 days, maximum of 31 days • `"1h"`: Default of 24 hours, maximum of 168 hours • `"1m"`: Default of 60 minutes, maximum of 1440 minutes' - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Optionally set to the `next_page` token from the previous response. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= - null title: Page description: Optionally set to the `next_page` token from the previous response. - name: starting_at in: query required: true schema: type: string format: date-time description: 'Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.' examples: - '2024-10-30T23:58:27.427722Z' title: Starting At description: 'Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.' - name: ending_at in: query required: false schema: anyOf: - type: string format: date-time - type: 'null' description: Time buckets that end before this RFC 3339 timestamp will be returned. examples: - '2024-10-30T23:58:27.427722Z' title: Ending At description: Time buckets that end before this RFC 3339 timestamp will be returned. - name: api_key_ids[] in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Restrict usage returned to the specified API key ID(s). examples: - apikey_01Rj2N8SVvo6BePZj99NhmiT title: Api Key Ids[] description: Restrict usage returned to the specified API key ID(s). - name: workspace_ids[] in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Restrict usage returned to the specified workspace ID(s). examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ title: Workspace Ids[] description: Restrict usage returned to the specified workspace ID(s). - name: account_ids[] in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Restrict usage returned to the specified user account ID(s). examples: - user_01WCz1FkmYMm4gnmykNKUu3Q title: Account Ids[] description: Restrict usage returned to the specified user account ID(s). - name: service_account_ids[] in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Restrict usage returned to the specified service account ID(s). examples: - svac_01Hk3R9TWxq7CfQak00OiVw4 title: Service Account Ids[] description: Restrict usage returned to the specified service account ID(s). - name: models[] in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Restrict usage returned to the specified model(s). examples: - claude-opus-5 - claude-sonnet-5 title: Models[] description: Restrict usage returned to the specified model(s). - name: service_tiers[] in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BetaUsageReportServiceTier' - type: 'null' description: Restrict usage returned to the specified service tier(s). examples: - standard - batch - priority - priority_on_demand - flex - flex_discount title: Service Tiers[] description: Restrict usage returned to the specified service tier(s). - name: context_window[] in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BetaMessagesUsageReportContextWindow' - type: 'null' description: Restrict usage returned to the specified context window(s). examples: - 0-200k - 200k-1M title: Context Window[] description: Restrict usage returned to the specified context window(s). - name: inference_geos[] in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BetaInferenceGeoFilter' - type: 'null' description: Restrict usage returned to the specified inference geo(s). Use `not_available` for models that do not support specifying `inference_geo`. examples: - global - us - not_available title: Inference Geos[] description: Restrict usage returned to the specified inference geo(s). Use `not_available` for models that do not support specifying `inference_geo`. - name: speeds[] in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BetaSpeed' - type: 'null' description: 'Restrict usage returned to the specified speed(s) (Claude Code research preview). Requires the `fast-mode-2026-02-01` beta header.' examples: - standard - fast title: Speeds[] description: 'Restrict usage returned to the specified speed(s) (Claude Code research preview). Requires the `fast-mode-2026-02-01` beta header.' - name: group_by[] in: query required: false schema: anyOf: - type: array items: $ref: '#/components/schemas/BetaMessagesUsageReportGroupBy' - type: 'null' description: Group by any subset of the available options. Grouping by `speed` requires the `fast-mode-2026-02-01` beta header. examples: - api_key_id - workspace_id - model - service_tier - context_window - inference_geo - speed - account_id - service_account_id title: Group By[] description: Group by any subset of the available options. Grouping by `speed` requires the `fast-mode-2026-02-01` beta header. - name: bucket_width in: query required: false schema: $ref: '#/components/schemas/BetaMessagesUsageReportTimeBucketWidth' description: Time granularity of the response data. examples: - 1d - 1m - 1h default: 1d description: Time granularity of the response data. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaGetMessagesUsageReportResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/users/{user_id}?beta=true: get: summary: Get User description: Retrieve a member of the organization by user ID. operationId: beta_get_user_v1_organizations_users__user_id__get parameters: - name: user_id in: path required: true schema: type: string description: ID of the User. title: User Id description: ID of the User. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaUser' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update User description: Update a member's organization role. operationId: beta_update_user_v1_organizations_users__user_id__post parameters: - name: user_id in: path required: true schema: type: string description: ID of the User. title: User Id description: ID of the User. - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaUpdateUserParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaUser' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations delete: summary: Remove User description: Remove a member from the organization. operationId: beta_remove_user_v1_organizations_users__user_id__delete parameters: - name: user_id in: path required: true schema: type: string description: ID of the User. title: User Id description: ID of the User. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaDeleteUserResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/users?beta=true: get: summary: List Users description: List the organization's members. operationId: beta_list_users_v1_organizations_users_get parameters: - name: before_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. title: Before Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. - name: after_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. title: After Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' default: 20 title: Limit description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' - name: email in: query required: false schema: type: string format: email description: Filter by user email. title: Email description: Filter by user email. - name: roles[] in: query required: false schema: type: array items: type: string description: 'Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR''ed together. Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.' title: Roles[] description: 'Filter to items whose `role` equals one of the supplied values. Repeatable; values are OR''ed together. Accepted values depend on the organization type: Console and API organizations accept `user`, `developer`, `billing`, `admin`, and `claude_code_user`; Claude Enterprise organizations accept `user`, `owner`, `primary_owner`, `membership_admin`, and `managed`.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaListResponse_User_' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}/archive?beta=true: post: summary: Archive Workspace operationId: beta_archive_workspace_v1_organizations_workspaces__workspace_id__archive_post parameters: - name: workspace_id in: path required: true schema: type: string title: Workspace Id - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspace' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}/members/{user_id}?beta=true: get: summary: Get Workspace Member operationId: beta_get_workspace_member_v1_organizations_workspaces__workspace_id__members__user_id__get parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the Workspace. title: Workspace Id description: ID of the Workspace. - name: user_id in: path required: true schema: type: string description: ID of the User. title: User Id description: ID of the User. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspaceMemberSchema' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update Workspace Member operationId: beta_update_workspace_member_v1_organizations_workspaces__workspace_id__members__user_id__post parameters: - name: user_id in: path required: true schema: type: string description: ID of the User. title: User Id description: ID of the User. - name: workspace_id in: path required: true schema: type: string description: ID of the Workspace. title: Workspace Id description: ID of the Workspace. - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaUpdateWorkspaceMemberParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspaceMemberSchema' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations delete: summary: Delete Workspace Member operationId: beta_delete_workspace_member_v1_organizations_workspaces__workspace_id__members__user_id__delete parameters: - name: user_id in: path required: true schema: type: string description: ID of the User. title: User Id description: ID of the User. - name: workspace_id in: path required: true schema: type: string description: ID of the Workspace. title: Workspace Id description: ID of the Workspace. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaDeleteWorkspaceMemberResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}/members?beta=true: get: summary: List Workspace Members operationId: beta_list_workspace_members_v1_organizations_workspaces__workspace_id__members_get parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the Workspace. title: Workspace Id description: ID of the Workspace. - name: before_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. title: Before Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. - name: after_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. title: After Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' default: 20 title: Limit description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaListResponse_WorkspaceMemberSchema_' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Create Workspace Member operationId: beta_create_workspace_member_v1_organizations_workspaces__workspace_id__members_post parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the Workspace. title: Workspace Id description: ID of the Workspace. - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaCreateWorkspaceMemberParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspaceMemberSchema' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}/rate_limits?beta=true: get: summary: List Workspace Rate Limits description: 'List rate-limit overrides configured for a workspace. Returns only the groups and limiter types that have a workspace-level override. Groups without overrides inherit the organization limits and are not listed; use `GET /v1/organizations/rate_limits` to see those. This endpoint currently returns every matching entry in a single page regardless of `limit`; follow `next_page` so that clients keep working when pagination is enabled.' operationId: beta_get_workspace_rate_limits_v1_organizations_workspaces__workspace_id__rate_limits_get parameters: - name: workspace_id in: path required: true schema: type: string description: The ID of the workspace. title: Workspace Id description: The ID of the workspace. - name: group_type in: query required: false schema: anyOf: - enum: - batch - files - model_group - skills - token_count - web_search type: string - type: 'null' description: Filter by group type. title: Group Type description: Filter by group type. - name: limit in: query required: false schema: anyOf: - type: integer maximum: 1000 minimum: 1 - type: 'null' description: 'Maximum number of items to return per page. Ranges from `1` to `1000`. Accepted for request-shape compatibility and currently ignored: every entry is returned in a single page.' title: Limit description: 'Maximum number of items to return per page. Ranges from `1` to `1000`. Accepted for request-shape compatibility and currently ignored: every entry is returned in a single page.' - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspaceRateLimitListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}?beta=true: get: summary: Get Service Account Workspace Member description: '**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). Retrieve a service account''s membership in a workspace. Returns the membership record, including the service account''s `workspace_role` in this workspace. Archived workspaces return 400. For the default workspace, returns the implicit (`implicit: true`) membership when no explicit membership exists; an explicitly added membership is returned with its assigned role. An archived service account returns 404.' operationId: beta_get_service_account_workspace_member_v1_organizations_workspaces__workspace_id__service_accounts__service_account_id__get parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the workspace. title: Workspace Id description: ID of the workspace. - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMember' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update Service Account Workspace Member description: '**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). Change a service account''s role in a workspace. The new `workspace_role` replaces the current one. Only explicit memberships can be updated; to set a role on the implicit default-workspace membership, add the service account explicitly with `POST /workspaces/{workspace_id}/service_accounts`. Archived workspaces return 400. Archived service accounts cannot be updated and are rejected.' operationId: beta_update_service_account_workspace_member_v1_organizations_workspaces__workspace_id__service_accounts__service_account_id__post parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the workspace. title: Workspace Id description: ID of the workspace. - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMember' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations delete: summary: Delete Service Account Workspace Member description: '**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). Remove a service account from a workspace. Removal is idempotent (returns 200 even if the membership was already removed). A DELETE against the implicit default-workspace membership returns 200 but is a no-op and the membership persists; deleting an explicit default-workspace row reverts to the implicit `workspace_user` membership. Archived workspaces return 400.' operationId: beta_delete_service_account_workspace_member_v1_organizations_workspaces__workspace_id__service_accounts__service_account_id__delete parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the workspace. title: Workspace Id description: ID of the workspace. - name: service_account_id in: path required: true schema: type: string description: ID of the service account. title: Service Account Id description: ID of the service account. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberDeleteResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}/service_accounts?beta=true: get: summary: List Service Account Workspace Members description: '**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). List the service accounts that are members of a workspace. Each entry includes the service account''s `workspace_role`. Use `limit` and the `next_page` cursor to paginate. Archived workspaces return 400; use `GET /service_accounts/{id}/workspaces` to audit memberships of an archived workspace. The implicit default-workspace membership is not included in this list. Memberships of archived service accounts are omitted from the results.' operationId: beta_list_service_account_workspace_members_v1_organizations_workspaces__workspace_id__service_accounts_get parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the workspace. title: Workspace Id description: ID of the workspace. - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of results per page. default: 20 title: Limit description: Number of results per page. - name: page in: query required: false schema: anyOf: - type: string - type: 'null' description: Opaque cursor from a previous response's `next_page`. title: Page description: Opaque cursor from a previous response's `next_page`. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberListResponse' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Create Service Account Workspace Member description: '**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). Add a service account to a workspace with the given `workspace_role`. The role determines what the service account can do in the workspace and which workspace-scoped permissions it can be granted when authenticating through federation. Every service account is already an implicit `workspace_user` member of the default workspace; adding it explicitly assigns a chosen role. If the service account is already an explicit member of the workspace, its `workspace_role` is replaced with the value supplied here. Archived workspaces return 400. Archived service accounts cannot be added and are rejected.' operationId: beta_create_service_account_workspace_member_v1_organizations_workspaces__workspace_id__service_accounts_post parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the workspace. title: Workspace Id description: ID of the workspace. - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMemberCreateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMember' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces/{workspace_id}?beta=true: get: summary: Get Workspace operationId: beta_get_workspace_v1_organizations_workspaces__workspace_id__get parameters: - name: workspace_id in: path required: true schema: type: string description: ID of the Workspace. title: Workspace Id description: ID of the Workspace. - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspace' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Update Workspace operationId: beta_update_workspace_v1_organizations_workspaces__workspace_id__post parameters: - name: workspace_id in: path required: true schema: type: string title: Workspace Id - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaWorkspaceUpdateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspace' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations /v1/organizations/workspaces?beta=true: get: summary: List Workspaces operationId: beta_list_workspaces_v1_organizations_workspaces_get parameters: - name: include_archived in: query required: false schema: type: boolean description: Whether to include Workspaces that have been archived in the response default: false title: Include Archived description: Whether to include Workspaces that have been archived in the response - name: before_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. title: Before Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. - name: after_id in: query required: false schema: type: string description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. title: After Id description: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. - name: limit in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' default: 20 title: Limit description: 'Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.' - name: x-api-key in: header required: false schema: type: string description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." title: X-Api-Key description: "Your unique Admin API key for authentication. \n\nThis key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the [Console](https://console.anthropic.com/settings/admin-keys)." - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaListResponse_Workspace_' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations post: summary: Create Workspace operationId: beta_create_workspace_v1_organizations_workspaces_post parameters: - name: anthropic-beta in: header required: false schema: type: string items: type: string description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' title: Anthropic-Beta x-stainless-override-schema: x-stainless-param: betas x-stainless-extend-default: true type: array description: Optional header to specify the beta version(s) you want to use. items: $ref: '#/components/schemas/AnthropicBeta' description: 'Optional header to specify the beta version(s) you want to use. To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.' - name: anthropic-version in: header required: false schema: type: string description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' title: Anthropic-Version description: 'The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BetaWorkspaceCreateParams' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BetaWorkspace' 4XX: description: 'Error response. See our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.' content: application/json: schema: $ref: '#/components/schemas/BetaErrorResponse' tags: - Organizations components: schemas: BetaApiKey: properties: created_at: type: string format: date-time title: Created At description: RFC 3339 datetime string indicating when the API Key was created. examples: - '2024-10-30T23:58:27.427722Z' created_by: anyOf: - $ref: '#/components/schemas/BetaCreatedBy' - type: 'null' description: 'The ID and type of the actor that created the API key, or `null` when the creator is not recorded (legacy, workload-identity-federated, or system-created keys).' examples: - id: user_01WCz1FkmYMm4gnmykNKUu3Q type: user expires_at: anyOf: - type: string format: date-time - type: 'null' title: Expires At description: RFC 3339 datetime string indicating when the API Key expires, or `null` if it never expires. examples: - '2024-10-30T23:58:27.427722Z' id: type: string title: Id description: ID of the API key. examples: - apikey_01Rj2N8SVvo6BePZj99NhmiT name: type: string title: Name description: Name of the API key. examples: - Developer Key partial_key_hint: anyOf: - type: string - type: 'null' title: Partial Key Hint description: Partially redacted hint for the API key. examples: - sk-ant-api03-R2D...igAA principal: anyOf: - oneOf: - $ref: '#/components/schemas/BetaApiKeyUserActor' - $ref: '#/components/schemas/BetaApiKeyServiceAccountActor' discriminator: propertyName: type mapping: service_account_actor: '#/components/schemas/BetaApiKeyServiceAccountActor' user_actor: '#/components/schemas/BetaApiKeyUserActor' - type: 'null' title: Principal description: The principal the API key acts as (a User or a Service Account), or `null` if the API key is not bound to a principal. examples: - type: user_actor user_id: user_01WCz1FkmYMm4gnmykNKUu3Q scope: oneOf: - $ref: '#/components/schemas/BetaApiKeyOrganizationScope' - $ref: '#/components/schemas/BetaApiKeyWorkspaceScope' title: Scope description: 'Where the API key belongs: its Workspace (`{"type": "workspace", "workspace_id": "wrkspc_..."}`, with the Workspace''s real ID even when it is the organization''s default Workspace), or the organization (`{"type": "organization"}`) for a principal-bound API key that has no Workspace.' examples: - type: workspace workspace_id: wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ discriminator: propertyName: type mapping: organization: '#/components/schemas/BetaApiKeyOrganizationScope' workspace: '#/components/schemas/BetaApiKeyWorkspaceScope' status: type: string enum: - active - archived - expired - inactive title: Status description: Status of the API key. examples: - active type: type: string const: api_key title: Type description: 'Object type. For API Keys, this is always `"api_key"`.' default: api_key workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: 'Deprecated: use `scope` instead. ID of the Workspace associated with the API key, or `null` if the API key belongs to the default Workspace. Also `null` for a principal-bound API key that has no Workspace; `scope` tells the two apart.' deprecated: true examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ x-stainless-deprecation-message: Use `scope` instead. `workspace_id` is `null` both for an API key in the default Workspace and for a principal-bound API key that has no Workspace. type: object required: - created_at - created_by - expires_at - id - name - partial_key_hint - principal - scope - status - type - workspace_id title: ApiKey BetaMessagesUsageReportGroupBy: type: string enum: - account_id - api_key_id - context_window - inference_geo - model - service_account_id - service_tier - speed - workspace_id title: MessagesUsageReportGroupBy BetaFederationIssuer: properties: archived_at: anyOf: - type: string format: date-time - type: 'null' title: Archived At description: If set, all rules referencing this issuer reject token exchange. archived_by_actor_id: anyOf: - type: string - type: 'null' title: Archived By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that archived this issuer. check_jti: type: boolean title: Check Jti description: Whether the jwt-bearer exchange enforces JTI single-use (replay protection) for tokens from this issuer. Applies only to assertions carrying a `jti` claim; tokens without one are accepted without single-use enforcement. created_at: type: string format: date-time title: Created At description: When this issuer was created. examples: - '2024-10-30T23:58:27.427722Z' created_by_actor_id: anyOf: - type: string - type: 'null' title: Created By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that created this issuer. id: type: string title: Id description: Tagged ID of the federation issuer. examples: - fdis_01SDCCSbTxrXDpWc1phhtcfK issuer_url: type: string title: Issuer Url description: The `iss` claim value. Incoming JWTs must match exactly. examples: - https://token.actions.githubusercontent.com jwks: oneOf: - $ref: '#/components/schemas/BetaJwksDiscovery' - $ref: '#/components/schemas/BetaJwksExplicitUrl' - $ref: '#/components/schemas/BetaJwksInline' title: Jwks description: How signing keys are obtained for signature verification. discriminator: propertyName: type mapping: discovery: '#/components/schemas/BetaJwksDiscovery' explicit_url: '#/components/schemas/BetaJwksExplicitUrl' inline: '#/components/schemas/BetaJwksInline' jwks_polling_disabled_at: anyOf: - type: string format: date-time - type: 'null' title: Jwks Polling Disabled At description: 'If set, Anthropic''s JWKS poller has paused polling for this issuer after repeated fetch failures. Re-enable by sending `jwks_polling_disabled: false` via the issuer update endpoint (POST) once the upstream JWKS endpoint is fixed. An OAuth caller cannot send this when the issuer backs a rule with any scope other than `workspace:developer` or `workspace:inference`; use a Console session.' max_jwt_lifetime_seconds: type: integer title: Max Jwt Lifetime Seconds description: Maximum allowed iat→exp spread for assertions from this issuer (1-176400 seconds, i.e. up to 49h). Assertions must carry both `iat` and `exp`; a missing `iat` is rejected. name: type: string title: Name description: Admin-chosen slug identifier. examples: - github-actions poll_status: anyOf: - $ref: '#/components/schemas/BetaIssuerPollStatus' - type: 'null' description: Live state of Anthropic's JWKS polling for this issuer. Populated on both single-issuer retrieval and list responses, including archived issuers. Typically null for inline-key issuers (no polling), or when poll status is temporarily unavailable or polling has not started yet. type: type: string const: federation_issuer title: Type default: federation_issuer updated_at: type: string format: date-time title: Updated At description: When this issuer was last updated. examples: - '2024-10-30T23:58:27.427722Z' updated_by_actor_id: anyOf: - type: string - type: 'null' title: Updated By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that last updated this issuer. type: object required: - archived_at - archived_by_actor_id - check_jti - created_at - created_by_actor_id - id - issuer_url - jwks - jwks_polling_disabled_at - max_jwt_lifetime_seconds - name - poll_status - type - updated_at - updated_by_actor_id title: FederationIssuer description: 'Registered external OIDC identity provider. Records an external IdP the organization trusts for the RFC 7523 jwt-bearer grant. The `issuer_url` must match the JWT `iss` claim exactly.' BetaCreateInviteParams: properties: email: type: string format: email title: Email description: Email of the User. examples: - user@emaildomain.com rbac_group_ids: items: type: string type: array maxItems: 100 title: Rbac Group Ids description: RBAC group IDs to assign to the User when the Invite is accepted. A non-empty array is accepted only for a Claude Enterprise organization with RBAC groups, and requires the key to carry the `write:rbac_groups` scope. role: type: string enum: - billing - claude_code_user - developer - managed - user title: NoAdminRoleSchema description: 'Role for the invited User. The accepted values depend on the organization type. Console and API organizations accept `user`, `developer`, `billing`, and `claude_code_user`; `admin` cannot be assigned through the API. Claude Enterprise organizations accept `user` and `managed`.' examples: - user - developer - billing - claude_code_user additionalProperties: false type: object required: - email - role title: CreateInviteParams BetaFederationRuleCreateParams: properties: applies_to_all_workspaces: type: boolean title: Applies To All Workspaces description: When true, enable this rule for every workspace in the org (including workspaces created later). attributes: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Attributes description: 'CEL expressions `{name: expr}` extracting named values from claims. Not yet supported; any non-empty value is rejected with 400.' description: anyOf: - type: string maxLength: 2000 - type: 'null' title: Description description: Optional free-text description. issuer_id: type: string title: Issuer Id description: Tagged ID of the federation issuer. match: $ref: '#/components/schemas/BetaRuleMatch' description: Conditions the verified JWT must satisfy for this rule to apply. At least one of `subject_prefix` (other than a wildcard-only value like `*`), `claims`, or `condition` is required; `audience` alone is not sufficient. name: type: string maxLength: 255 minLength: 1 title: Name description: Slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. oauth_scope: type: string minLength: 1 title: Oauth Scope description: Space-separated OAuth scopes. OAuth callers may only set `workspace:developer` or `workspace:inference`; other scopes (such as `org:admin`) require a Console session. target: $ref: '#/components/schemas/BetaServiceAccountTarget' description: Identity that tokens minted via this rule act as. Currently always a `service_account` target. token_lifetime_seconds: type: integer maximum: 86400 minimum: 60 title: Token Lifetime Seconds description: Lifetime in seconds for access tokens minted via this rule (60-86400). Defaults to 3600 (1h). Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds. workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: Tagged ID of the workspace to enable this rule for. Required unless `applies_to_all_workspaces` is true. Additional workspaces can be added via the `/federation_rules/{federation_rule_id}/workspaces` sub-resource. additionalProperties: false type: object required: - issuer_id - match - name - oauth_scope - target title: FederationRuleCreateParams BetaAddFederationRuleWorkspaceParams: properties: workspace_id: type: string title: Workspace Id description: Tagged ID of the workspace to enable this rule for. additionalProperties: false type: object required: - workspace_id title: AddFederationRuleWorkspaceParams BetaClaudeCodeUsageReportItem: properties: actor: oneOf: - $ref: '#/components/schemas/BetaClaudeCodeUserActor' - $ref: '#/components/schemas/BetaClaudeCodeApiActor' title: Actor description: The user or API key that performed the Claude Code actions. discriminator: propertyName: type mapping: api_actor: '#/components/schemas/BetaClaudeCodeApiActor' user_actor: '#/components/schemas/BetaClaudeCodeUserActor' core_metrics: $ref: '#/components/schemas/BetaCoreMetrics' description: Core productivity metrics measuring Claude Code usage and impact. examples: - commits_by_claude_code: 8 lines_of_code: added: 342 removed: 128 num_sessions: 15 pull_requests_by_claude_code: 2 customer_type: $ref: '#/components/schemas/BetaCustomerType' description: Type of customer account (api for API customers, subscription for Pro/Team customers). examples: - api - subscription date: type: string format: date-time title: Date description: 'UTC day the usage metrics cover, as an RFC 3339 timestamp at midnight UTC (for example `2025-08-08T00:00:00Z`).' examples: - '2025-08-08T00:00:00Z' is_remote: type: boolean title: Is Remote description: 'Whether the usage came from remote Claude Code sessions, such as Claude Code on the web. Remote and local usage are reported as separate rows.' examples: - false - true model_breakdown: items: $ref: '#/components/schemas/BetaModelBreakdown' type: array title: Model Breakdown description: Token usage and cost breakdown by AI model used. examples: - - estimated_cost: amount: 186 currency: USD model: claude-opus-5 tokens: cache_creation: 2340 cache_read: 8790 input: 45230 output: 12450 - estimated_cost: amount: 42 currency: USD model: claude-sonnet-5 tokens: cache_creation: 890 cache_read: 3420 input: 23100 output: 5680 organization_id: type: string title: Organization Id description: ID of the organization that owns the Claude Code usage. examples: - 12345678-1234-5678-1234-567812345678 subscription_type: anyOf: - $ref: '#/components/schemas/BetaSubscriptionType' - type: 'null' description: Subscription tier for subscription customers. `null` for API customers. examples: - enterprise - team - null terminal_type: type: string title: Terminal Type description: Type of terminal or environment where Claude Code was used. examples: - iTerm.app - vscode - tmux tool_actions: additionalProperties: $ref: '#/components/schemas/BetaApprovalMetrics' type: object title: Tool Actions description: Breakdown of tool action acceptance and rejection rates by tool type. examples: - edit_tool: accepted: 25 rejected: 3 multi_edit_tool: accepted: 12 rejected: 1 notebook_edit_tool: accepted: 5 rejected: 2 write_tool: accepted: 8 rejected: 0 type: object required: - actor - core_metrics - customer_type - date - is_remote - model_breakdown - organization_id - terminal_type - tool_actions title: ClaudeCodeUsageReportItem BetaLinesOfCode: properties: added: type: integer title: Added description: Total number of lines of code added across all files by Claude Code. removed: type: integer title: Removed description: Total number of lines of code removed across all files by Claude Code. type: object required: - added - removed title: LinesOfCode BetaClaudeCodeUserActor: properties: email_address: type: string title: Email Address description: Email address of the user who performed Claude Code actions. examples: - user@emaildomain.com type: type: string const: user_actor title: Type description: Actor type. Always `"user_actor"` for a user. type: object required: - email_address - type title: ClaudeCodeUserActor BetaTunnelCertificateListResponse: properties: data: items: $ref: '#/components/schemas/BetaOrganizationTunnelCertificate' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or `null` if there are no more results. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= type: object required: - data - next_page title: TunnelCertificateListResponse BetaCostType: type: string enum: - code_execution - session_usage - tokens - web_search title: CostType BetaExternalKeyListResponse: properties: data: items: $ref: '#/components/schemas/BetaExternalKey' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or null if no more results. Pass as `?page=` to fetch the next page. type: object required: - data - next_page title: ExternalKeyListResponse description: Opaque-cursor page of external keys, ordered by creation time (newest first). BetaExternalKeyUpdateParams: properties: display_name: anyOf: - type: string maxLength: 255 minLength: 1 - type: 'null' title: Display Name description: Human-friendly display name. geo: anyOf: - type: string const: us - type: 'null' title: Geo description: Data residency geo. Only `us` is supported. provider_config: anyOf: - oneOf: - $ref: '#/components/schemas/BetaAwsExternalKeyConfig' - $ref: '#/components/schemas/BetaGcpExternalKeyConfig' - $ref: '#/components/schemas/BetaAzureExternalKeyConfigParams' discriminator: propertyName: type mapping: aws: '#/components/schemas/BetaAwsExternalKeyConfig' azure: '#/components/schemas/BetaAzureExternalKeyConfigParams' gcp: '#/components/schemas/BetaGcpExternalKeyConfig' - type: 'null' title: Provider Config description: KMS provider identity and auth coordinates. additionalProperties: false type: object title: ExternalKeyUpdateParams description: 'Partial update — omitted fields are unchanged. `display_name` is always editable. `geo` and `provider_config` cannot be changed once any workspace references this config.' BetaMessagesUsageReportTimeBucket: properties: starting_at: type: string format: date-time title: Starting At description: Start of the time bucket (inclusive) in RFC 3339 format. examples: - '2025-08-01T00:00:00Z' ending_at: type: string format: date-time title: Ending At description: End of the time bucket (exclusive) in RFC 3339 format. examples: - '2025-08-02T00:00:00Z' results: items: $ref: '#/components/schemas/BetaMessagesUsageReportItem' type: array title: Results description: List of usage items for this time bucket. There may be multiple items if one or more `group_by[]` parameters are specified. type: object required: - starting_at - ending_at - results title: MessagesUsageReportTimeBucket BetaWorkspaceUpdateParams: additionalProperties: false description: Partial update — omitted fields are unchanged. properties: data_residency: anyOf: - $ref: '#/components/schemas/BetaDataResidencyUpdateParams' - type: 'null' description: Data residency configuration for the workspace. display_color: description: Hex color code representing the Workspace in the Anthropic Console. examples: - '#6C5BB9' maxLength: 7 pattern: ^#[0-9A-Fa-f]{6}$ title: Display Color type: string external_key_id: description: 'ID of the customer-managed encryption key (CMEK) configuration to use for this Workspace. Setting this field requires CMEK to be enabled for your organization. When set, data stored for this Workspace is encrypted with the referenced key. Create key configurations with the External Keys API. This field is write-once: once a key is attached to a Workspace it cannot be detached or replaced. To rotate key material, rotate the underlying key on your cloud KMS; the `external_key_id` stays the same.' examples: - ekey_01SDCCSbTxrXDpWc1phhtcfK title: External Key Id type: string name: description: Name of the Workspace. maxLength: 40 minLength: 1 title: Name type: string tags: anyOf: - additionalProperties: anyOf: - type: string - type: 'null' type: object - type: 'null' description: User-defined tags as string key-value pairs. Keys may not begin with `anthropic`. examples: - env: prod team: platform title: Tags title: WorkspaceUpdateParams type: object BetaGetCostReportResponse: properties: data: items: $ref: '#/components/schemas/BetaCostReportTimeBucket' type: array title: Data description: 'List of time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no costs (their `results` list is empty). A page holds at most `limit` buckets.' has_more: type: boolean title: Has More description: Indicates if there are more results. next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or `null` when `has_more` is false. Pass it as the `page` parameter in the next request. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= - null type: object required: - data - has_more - next_page title: GetCostReportResponse BetaInferenceGeoFilter: type: string enum: - global - not_available - us title: InferenceGeoFilter BetaListResponse_Workspace_: properties: data: items: $ref: '#/components/schemas/BetaWorkspace' type: array title: Data first_id: anyOf: - type: string - type: 'null' title: First Id description: First ID in the `data` list. Can be used as the `before_id` for the previous page. has_more: type: boolean title: Has More description: Indicates if there are more results in the requested page direction. last_id: anyOf: - type: string - type: 'null' title: Last Id description: Last ID in the `data` list. Can be used as the `after_id` for the next page. type: object required: - data - first_id - has_more - last_id title: ListResponse[Workspace] BetaFederationIssuerListResponse: properties: data: items: $ref: '#/components/schemas/BetaFederationIssuer' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or null if no more results. type: object required: - data - next_page title: FederationIssuerListResponse BetaFederationRuleUpdateParams: properties: applies_to_all_workspaces: anyOf: - type: boolean - type: 'null' title: Applies To All Workspaces description: When true, enables this rule for every workspace in the org (including workspaces created later). Setting `false` is rejected with 400 if no workspace would remain enabled; a rule with only a legacy `workspace_id` binding continues to mint. attributes: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Attributes description: 'Replaces the CEL expressions `{name: expr}` extracting named values from claims. Send null to clear them. Not yet supported; any non-empty value is rejected with 400.' description: anyOf: - type: string maxLength: 2000 - type: 'null' title: Description description: Replaces the description. Omit to leave unchanged; send `null` to clear (the field is stored as an empty string). match: anyOf: - $ref: '#/components/schemas/BetaRuleMatch' - type: 'null' description: Replaces the entire match object. All populated matcher fields must pass. name: anyOf: - type: string maxLength: 255 minLength: 1 - type: 'null' title: Name description: Replaces the slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. oauth_scope: anyOf: - type: string minLength: 1 - type: 'null' title: Oauth Scope description: Replaces the space-separated OAuth scopes granted on minted tokens. OAuth callers may only set `workspace:developer` or `workspace:inference`; other scopes (such as `org:admin`) require a Console session. target: anyOf: - $ref: '#/components/schemas/BetaServiceAccountTarget' - type: 'null' description: Replaces the entire target object. Currently always a `service_account` target. token_lifetime_seconds: anyOf: - type: integer maximum: 86400 minimum: 60 - type: 'null' title: Token Lifetime Seconds description: Replaces the lifetime in seconds for access tokens minted via this rule (60-86400). Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds. workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: Replaces the existing single workspace enablement (the previous one is removed). Rejected with 400 if the rule is enabled for more than one workspace; use the `/federation_rules/{federation_rule_id}/workspaces` sub-resource instead. additionalProperties: false type: object title: FederationRuleUpdateParams description: 'Partial update. Set fields are applied; omitted fields are unchanged. `issuer_id` is immutable. `match` and `target` are replaced as whole objects when set. Explicit `null` clears `description` and `attributes`; other fields can only be replaced, not cleared.' BetaDataResidencyUpdateParams: additionalProperties: false properties: allowed_inference_geos: anyOf: - items: $ref: '#/components/schemas/BetaAllowedInferenceGeo' type: array x-stainless-variantName: geos - const: unrestricted type: string title: UnrestrictedAllowedInferenceGeos x-stainless-variantName: unrestricted - type: 'null' description: Permitted inference geo values. Use 'unrestricted' to allow all geos, or a list of specific geos. title: Allowed Inference Geos default_inference_geo: anyOf: - $ref: '#/components/schemas/BetaInferenceGeo' - type: 'null' description: Default inference geo applied when requests omit the parameter. Must be a member of `allowed_inference_geos` unless `allowed_inference_geos` is `"unrestricted"`. title: DataResidencyUpdateParams type: object BetaJwksInline: properties: keys: items: additionalProperties: true type: object type: array minItems: 1 title: Keys description: Inline JWK objects. type: type: string const: inline title: Type additionalProperties: false type: object required: - keys - type title: JwksInline description: JWKS supplied directly; no network fetch. BetaFederationRule: properties: applies_to_all_workspaces: type: boolean title: Applies To All Workspaces description: When true, this rule is enabled for every workspace in the org (including ones created after the rule). `workspace_ids` is ignored at exchange time. archived_at: anyOf: - type: string format: date-time - type: 'null' title: Archived At description: If set, this rule is archived and rejects token exchange. archived_by_actor_id: anyOf: - type: string - type: 'null' title: Archived By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that archived this rule. attributes: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Attributes description: CEL expressions extracting named values from claims. Not yet supported; always null. created_at: type: string format: date-time title: Created At description: When this rule was created. examples: - '2024-10-30T23:58:27.427722Z' created_by_actor_id: anyOf: - type: string - type: 'null' title: Created By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that created this rule. description: anyOf: - type: string - type: 'null' title: Description description: Optional free-text description. id: type: string title: Id description: Tagged ID of the federation rule. examples: - fdrl_01SDCCSbTxrXDpWc1phhtcfK issuer_id: type: string title: Issuer Id description: Tagged ID of the issuer whose tokens this rule accepts. issuer_name: anyOf: - type: string - type: 'null' title: Issuer Name description: Issuer's display name at read time. match: $ref: '#/components/schemas/BetaRuleMatch' description: Conditions the verified JWT must satisfy for this rule to apply. All populated matcher fields must pass. name: type: string title: Name description: Admin-chosen slug identifier. examples: - prod-deploy-pipeline oauth_scope: type: string title: Oauth Scope description: Space-separated OAuth scopes granted on the minted token. target: $ref: '#/components/schemas/BetaServiceAccountTarget' description: Identity that tokens minted via this rule act as. Currently always a `service_account` target. token_lifetime_seconds: type: integer title: Token Lifetime Seconds description: Lifetime in seconds of access tokens minted via this rule. Minted tokens are capped at `max(60, min(this value, 2 × remaining assertion validity))` seconds. type: type: string const: federation_rule title: Type default: federation_rule updated_at: type: string format: date-time title: Updated At description: When this rule was last updated. examples: - '2024-10-30T23:58:27.427722Z' updated_by_actor_id: anyOf: - type: string - type: 'null' title: Updated By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that last updated this rule. workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: Legacy single-workspace binding. Prefer `workspace_ids` and the `/federation_rules/{federation_rule_id}/workspaces` sub-resource for managing workspace enablement. workspace_ids: items: type: string type: array title: Workspace Ids description: Tagged IDs of the workspaces this rule is enabled for. May be empty for older rules that only carry the legacy `workspace_id` binding. Ignored at exchange time when `applies_to_all_workspaces` is true (the list may still be non-empty). type: object required: - applies_to_all_workspaces - archived_at - archived_by_actor_id - attributes - created_at - created_by_actor_id - description - id - issuer_id - issuer_name - match - name - oauth_scope - target - token_lifetime_seconds - type - updated_at - updated_by_actor_id - workspace_id - workspace_ids title: FederationRule description: 'Authorization rule binding an external OIDC identity to Anthropic. Evaluates the match conditions and mints an OAuth access token for the resolved target, scoped to a single workspace where the rule is enabled (chosen by the caller at exchange time when the rule is enabled for more than one). For rules enabled via `workspace_ids` or `applies_to_all_workspaces`, the target service account must be a member of that workspace (it is implicitly a member of the default workspace); rules carrying only the legacy `workspace_id` binding do not enforce this.' BetaCacheCreation: properties: ephemeral_1h_input_tokens: default: 0 description: The number of input tokens used to create the 1 hour cache entry. minimum: 0 title: Ephemeral 1H Input Tokens type: integer ephemeral_5m_input_tokens: default: 0 description: The number of input tokens used to create the 5 minute cache entry. minimum: 0 title: Ephemeral 5M Input Tokens type: integer required: - ephemeral_1h_input_tokens - ephemeral_5m_input_tokens title: CacheCreation type: object BetaListResponse_WorkspaceMemberSchema_: properties: data: items: $ref: '#/components/schemas/BetaWorkspaceMemberSchema' type: array title: Data first_id: anyOf: - type: string - type: 'null' title: First Id description: First ID in the `data` list. Can be used as the `before_id` for the previous page. has_more: type: boolean title: Has More description: Indicates if there are more results in the requested page direction. last_id: anyOf: - type: string - type: 'null' title: Last Id description: Last ID in the `data` list. Can be used as the `after_id` for the next page. type: object required: - data - first_id - has_more - last_id title: ListResponse[WorkspaceMemberSchema] BetaListResponse_ApiKey_: properties: data: items: $ref: '#/components/schemas/BetaApiKey' type: array title: Data first_id: anyOf: - type: string - type: 'null' title: First Id description: First ID in the `data` list. Can be used as the `before_id` for the previous page. has_more: type: boolean title: Has More description: Indicates if there are more results in the requested page direction. last_id: anyOf: - type: string - type: 'null' title: Last Id description: Last ID in the `data` list. Can be used as the `after_id` for the next page. type: object required: - data - first_id - has_more - last_id title: ListResponse[ApiKey] BetaModelBreakdown: properties: estimated_cost: $ref: '#/components/schemas/BetaEstimatedCost' description: Estimated cost for using this model model: type: string title: Model description: Name of the AI model used for Claude Code interactions. examples: - claude-opus-5 tokens: $ref: '#/components/schemas/BetaTokenUsage' description: Token usage breakdown for this model type: object required: - estimated_cost - model - tokens title: ModelBreakdown BetaMessagesUsageReportContextWindow: type: string enum: - 0-200k - 200k-1M title: MessagesUsageReportContextWindow BetaDeleteUserResponse: properties: id: type: string title: Id description: ID of the User. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q type: type: string const: user_deleted title: Type description: 'Deleted object type. For Users, this is always `"user_deleted"`.' default: user_deleted type: object required: - id - type title: DeleteUserResponse BetaServiceAccountWorkspaceMemberDeleteResponse: properties: service_account_id: type: string title: Service Account Id description: Tagged service account ID (`svac_...`) named in the delete request. Removal is idempotent; see the endpoint description for the implicit-membership no-op. type: type: string const: service_account_workspace_member_deleted title: Type default: service_account_workspace_member_deleted workspace_id: type: string title: Workspace Id description: Tagged workspace ID (`wrkspc_...`) named in the delete request. type: object required: - service_account_id - type - workspace_id title: ServiceAccountWorkspaceMemberDeleteResponse BetaDataResidencyCreateParams: additionalProperties: false properties: allowed_inference_geos: anyOf: - items: $ref: '#/components/schemas/BetaAllowedInferenceGeo' type: array x-stainless-variantName: geos - const: unrestricted type: string title: UnrestrictedAllowedInferenceGeos x-stainless-variantName: unrestricted - type: 'null' description: 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. title: Allowed Inference Geos default_inference_geo: anyOf: - $ref: '#/components/schemas/BetaInferenceGeo' - type: 'null' description: 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"`. workspace_geo: anyOf: - $ref: '#/components/schemas/BetaWorkspaceGeo' - type: 'null' description: Geographic region for workspace data storage. Immutable after creation. Defaults to 'us' if omitted. title: DataResidencyCreateParams type: object BetaOrganizationTunnelCertificate: properties: archived_at: anyOf: - type: string format: date-time - type: 'null' title: Archived At description: 'RFC 3339 datetime string indicating when the certificate was archived, or `null` if it is not archived.' examples: - '2024-11-01T23:59:27.427722Z' created_at: type: string format: date-time title: Created At description: RFC 3339 datetime string indicating when the certificate was registered. examples: - '2024-10-30T23:58:27.427722Z' expires_at: anyOf: - type: string format: date-time - type: 'null' title: Expires At description: 'RFC 3339 datetime string indicating when the certificate expires, or `null` if it does not expire.' examples: - '2024-10-30T23:58:27.427722Z' fingerprint: type: string title: Fingerprint description: The certificate's SHA-256 fingerprint, as a lowercase hex string. examples: - 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 id: type: string title: Id description: ID of the Tunnel Certificate. examples: - tcrt_01JmWq4ZxnBvR7tKpY2sLdH9 tunnel_id: type: string title: Tunnel Id description: ID of the Tunnel this certificate is registered against. examples: - tnl_01Hx9Kp2RtQvMn3sWbYdLcF8 type: type: string const: tunnel_certificate title: Type description: Object type. Always `tunnel_certificate` for Tunnel Certificates. default: tunnel_certificate type: object required: - archived_at - created_at - expires_at - fingerprint - id - tunnel_id - type title: OrganizationTunnelCertificate BetaFederationIssuerUpdateParams: properties: check_jti: anyOf: - type: boolean - type: 'null' title: Check Jti description: Whether the jwt-bearer exchange enforces JTI single-use (replay protection) for tokens from this issuer. Applies only to assertions carrying a `jti` claim; tokens without one are accepted without single-use enforcement. issuer_url: anyOf: - type: string minLength: 1 - type: 'null' title: Issuer Url description: Replaces the `iss` claim value to match against. For discovery-mode issuers without a `discovery_base`, this is also the URL Anthropic fetches the OIDC discovery document and signing keys from, so changing it repoints the JWKS source. Changing the issuer URL to a well-known shared platform is rejected while any live rule under this issuer would not constrain tenant identity. jwks: anyOf: - oneOf: - $ref: '#/components/schemas/BetaJwksDiscovery' - $ref: '#/components/schemas/BetaJwksExplicitUrl' - $ref: '#/components/schemas/BetaJwksInline' discriminator: propertyName: type mapping: discovery: '#/components/schemas/BetaJwksDiscovery' explicit_url: '#/components/schemas/BetaJwksExplicitUrl' inline: '#/components/schemas/BetaJwksInline' - type: 'null' title: Jwks description: Replaces the entire JWKS configuration. jwks_polling_disabled: anyOf: - type: boolean - type: 'null' title: Jwks Polling Disabled description: Only `false` is accepted, to re-enable polling after the system pauses it. Polling is paused automatically; sending `true` is rejected. max_jwt_lifetime_seconds: anyOf: - type: integer maximum: 176400 exclusiveMinimum: 0 - type: 'null' title: Max Jwt Lifetime Seconds description: Maximum allowed iat→exp spread for assertions from this issuer (1-176400 seconds, i.e. up to 49h). Assertions must carry both `iat` and `exp`; a missing `iat` is rejected. name: anyOf: - type: string maxLength: 255 minLength: 1 - type: 'null' title: Name description: Replaces the slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. additionalProperties: false type: object title: FederationIssuerUpdateParams description: 'Partial update. Set fields are applied; omitted fields are unchanged. Setting `jwks` replaces the whole JWKS configuration at once.' BetaServiceAccountWorkspaceMemberCreateFromSAParams: properties: workspace_id: type: string title: Workspace Id description: Tagged workspace ID to add the service account to. workspace_role: $ref: '#/components/schemas/BetaNoBillingWorkspaceRoleSchema' description: Role to assign to the service account in this workspace. additionalProperties: false type: object required: - workspace_id - workspace_role title: ServiceAccountWorkspaceMemberCreateFromSAParams BetaGatewayTimeoutError: properties: message: default: Request timeout title: Message type: string type: const: timeout_error default: timeout_error title: Type type: string required: - message - type title: GatewayTimeoutError type: object BetaApiKeyWorkspaceScope: properties: type: type: string const: workspace title: Type description: 'Scope type. Always `"workspace"`: the API key belongs to one Workspace.' default: workspace workspace_id: type: string title: Workspace Id description: ID of the Workspace the API key belongs to. Unlike the deprecated top-level `workspace_id`, this is the Workspace's real ID even for the organization's default Workspace. examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ type: object required: - type - workspace_id title: ApiKeyWorkspaceScope BetaMessagesUsageReportItem: properties: uncached_input_tokens: type: integer title: Uncached Input Tokens description: The number of uncached input tokens processed. examples: - 1500 cache_creation: $ref: '#/components/schemas/BetaCacheCreation' description: The number of input tokens for cache creation. cache_read_input_tokens: type: integer title: Cache Read Input Tokens description: The number of input tokens read from the cache. examples: - 200 output_tokens: type: integer title: Output Tokens description: The number of output tokens generated. examples: - 500 server_tool_use: $ref: '#/components/schemas/BetaServerToolUse' description: Server-side tool usage metrics. api_key_id: anyOf: - type: string - type: 'null' title: Api Key Id description: ID of the API key used. `null` if not grouping by API key or for usage in the Anthropic Console. examples: - apikey_01Rj2N8SVvo6BePZj99NhmiT workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: ID of the Workspace used. `null` if not grouping by workspace or for the default workspace. examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ account_id: anyOf: - type: string - type: 'null' title: Account Id description: ID of the user account that made the request. `null` if not grouping by account or for non-OAuth requests. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q service_account_id: anyOf: - type: string - type: 'null' title: Service Account Id description: ID of the service account that made the request. `null` if not grouping by service account or for non-OIDC-federation requests. examples: - svac_01Hk3R9TWxq7CfQak00OiVw4 model: anyOf: - type: string - type: 'null' title: Model description: Model used. `null` if not grouping by model. examples: - claude-opus-5 - claude-sonnet-5 service_tier: anyOf: - $ref: '#/components/schemas/BetaUsageReportServiceTier' - type: 'null' description: Service tier used. `null` if not grouping by service tier. examples: - standard - batch - priority - priority_on_demand - flex - flex_discount context_window: anyOf: - $ref: '#/components/schemas/BetaMessagesUsageReportContextWindow' - type: 'null' description: Context window used. `null` if not grouping by context window. examples: - 0-200k - 200k-1M inference_geo: anyOf: - $ref: '#/components/schemas/BetaInferenceGeoFilter' - type: 'null' title: Inference Geo description: 'Inference geo used matching requests'' `inference_geo` parameter if set, otherwise the workspace''s `default_inference_geo`. For models that do not support specifying `inference_geo` the value is `"not_available"`. Always `null` if not grouping by inference geo.' examples: - global - us - not_available type: object required: - uncached_input_tokens - cache_creation - cache_read_input_tokens - output_tokens - server_tool_use - api_key_id - workspace_id - account_id - service_account_id - model - service_tier - context_window - inference_geo title: MessagesUsageReportItem BetaWorkspaceRateLimit: properties: group_type: type: string enum: - batch - files - model_group - skills - token_count - web_search title: Group Type description: 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`. limits: items: $ref: '#/components/schemas/BetaWorkspaceRateLimitValue' type: array title: Limits description: The limiter values overridden for this group in this workspace. Limiter types without a workspace override are omitted and inherit the organization value. models: anyOf: - items: type: string type: array - type: 'null' title: Models description: Model names this entry's limits apply to, including aliases. `null` when `group_type` is not `"model_group"`. rate_limit_id: type: string title: Rate Limit Id description: The `id` of the RateLimit group this override applies to. type: type: string const: workspace_rate_limit title: Type description: Object type. Always `workspace_rate_limit` for workspace rate-limit entries. default: workspace_rate_limit workspace_id: type: string title: Workspace Id description: ID of the Workspace this override applies to. type: object required: - group_type - limits - models - rate_limit_id - type - workspace_id title: WorkspaceRateLimit BetaSubscriptionType: type: string enum: - enterprise - team title: SubscriptionType BetaExternalKey: properties: attachment: oneOf: - $ref: '#/components/schemas/BetaAttachedAttachment' - $ref: '#/components/schemas/BetaUnattachedAttachment' title: Attachment description: Whether any workspace uses this config to encrypt its data — counting live and archived workspaces (an archived workspace's data remains encrypted under the config), excluding deleted ones. Only an attached config is used by the encryption path; an `unattached` config is inert and can be deleted. examples: - type: attached discriminator: propertyName: type mapping: attached: '#/components/schemas/BetaAttachedAttachment' unattached: '#/components/schemas/BetaUnattachedAttachment' created_at: type: string format: date-time title: Created At examples: - '2024-10-30T23:58:27.427722Z' display_name: anyOf: - type: string - type: 'null' title: Display Name description: Human-friendly display name. Null if none was set. examples: - prod-us-key geo: type: string title: Geo description: Data residency geo. Selects which regional validator handles this key's encrypt/decrypt roundtrips. examples: - us id: type: string title: Id description: Identifier of the external key config. A tagged ID prefixed `ekey_`, or — for organizations on the Claude Platform on AWS — the AWS KMS key ARN. examples: - ekey_01SDCCSbTxrXDpWc1phhtcfK provider_config: oneOf: - $ref: '#/components/schemas/BetaAwsExternalKeyConfig' - $ref: '#/components/schemas/BetaGcpExternalKeyConfig' - $ref: '#/components/schemas/BetaAzureExternalKeyConfig' title: Provider Config description: KMS provider identity and auth coordinates. discriminator: propertyName: type mapping: aws: '#/components/schemas/BetaAwsExternalKeyConfig' azure: '#/components/schemas/BetaAzureExternalKeyConfig' gcp: '#/components/schemas/BetaGcpExternalKeyConfig' type: type: string const: external_key title: Type default: external_key updated_at: type: string format: date-time title: Updated At examples: - '2024-10-30T23:58:27.427722Z' type: object required: - attachment - created_at - display_name - geo - id - provider_config - type - updated_at title: ExternalKey description: 'CMEK external key config belonging to the caller''s organization. Configs are organization-scoped. Workspaces attach to a config; once any workspace references it, the provider fields become effectively immutable (existing encrypted data needs the config for decrypt).' BetaDeleteInviteResponse: properties: id: type: string title: Id description: ID of the Invite. examples: - invite_015gWxCN9Hfg2QhZwTK7Mdeu type: type: string const: invite_deleted title: Type description: 'Deleted object type. For Invites, this is always `"invite_deleted"`.' default: invite_deleted type: object required: - id - type title: DeleteInviteResponse BetaDataResidency: properties: allowed_inference_geos: anyOf: - items: type: string type: array x-stainless-variantName: geos - type: string const: unrestricted title: UnrestrictedAllowedInferenceGeos x-stainless-variantName: unrestricted title: Allowed Inference Geos description: Permitted inference geo values. 'unrestricted' means all geos are allowed. default_inference_geo: type: string title: Default Inference Geo description: Default inference geo applied when requests omit the parameter. workspace_geo: type: string title: Workspace Geo description: Geographic region for workspace data storage. Immutable after creation. type: object required: - allowed_inference_geos - default_inference_geo - workspace_geo title: DataResidency BetaServiceAccountWorkspaceMemberCreateParams: properties: service_account_id: type: string title: Service Account Id description: Tagged service account ID to add. workspace_role: $ref: '#/components/schemas/BetaNoBillingWorkspaceRoleSchema' description: Role to assign to the service account in this workspace. additionalProperties: false type: object required: - service_account_id - workspace_role title: ServiceAccountWorkspaceMemberCreateParams BetaDeleteWorkspaceMemberResponse: properties: type: type: string const: workspace_member_deleted title: Type description: 'Deleted object type. For Workspace Members, this is always `"workspace_member_deleted"`.' default: workspace_member_deleted user_id: type: string title: User Id description: ID of the User. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q workspace_id: type: string title: Workspace Id description: ID of the Workspace. examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ type: object required: - type - user_id - workspace_id title: DeleteWorkspaceMemberResponse BetaApiKeyUserActor: properties: type: type: string const: user_actor title: Type description: Principal type. Always `"user_actor"` for a User. default: user_actor user_id: type: string title: User Id description: ID of the User the API key acts as. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q type: object required: - type - user_id title: ApiKeyUserActor BetaCustomerType: type: string enum: - api - subscription title: CustomerType BetaAttachedAttachment: properties: type: type: string const: attached title: Type default: attached type: object required: - type title: AttachedAttachment BetaAzureExternalKeyConfig: properties: client_id: anyOf: - type: string - type: 'null' title: Client Id description: Azure AD application (client) ID. Omit to use Anthropic's multitenant app. Provide only if using a single-tenant app registration in the customer's directory. key_name: type: string title: Key Name description: Name of the key within the vault. tenant_id: type: string title: Tenant Id description: Azure AD tenant ID. type: type: string const: azure title: Type vault_uri: type: string title: Vault Uri description: Key Vault data-plane URI — `https://{vault-name}.vault.azure.net` or `https://{hsm-name}.managedhsm.azure.net`. examples: - https://my-vault.vault.azure.net/ additionalProperties: false type: object required: - key_name - tenant_id - type - vault_uri title: AzureExternalKeyConfig BetaWorkspaceMemberSchema: properties: type: type: string const: workspace_member title: Type description: 'Object type. For Workspace Members, this is always `"workspace_member"`.' default: workspace_member user_id: type: string title: User Id description: ID of the User. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q workspace_id: type: string title: Workspace Id description: ID of the Workspace. examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ workspace_role: $ref: '#/components/schemas/BetaWorkspaceRoleSchema' description: Role of the Workspace Member. examples: - workspace_user - workspace_developer - workspace_restricted_developer - workspace_admin - workspace_billing type: object required: - type - user_id - workspace_id - workspace_role title: WorkspaceMemberSchema BetaServiceAccountWorkspaceMemberListResponse: properties: data: items: $ref: '#/components/schemas/BetaServiceAccountWorkspaceMember' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or null if no more results. type: object required: - data - next_page title: ServiceAccountWorkspaceMemberListResponse BetaMessagesUsageReportTimeBucketWidth: type: string enum: - 1d - 1h - 1m title: MessagesUsageReportTimeBucketWidth BetaCreateWorkspaceMemberParams: properties: user_id: type: string title: User Id description: ID of the User. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q workspace_role: $ref: '#/components/schemas/BetaNoBillingWorkspaceRoleSchema' description: Role of the new Workspace Member. Cannot be `workspace_billing`. additionalProperties: false type: object required: - user_id - workspace_role title: CreateWorkspaceMemberParams BetaAwsExternalKeyConfig: properties: kms_arn: type: string maxLength: 2048 title: Kms Arn description: Full ARN of the AWS KMS key. examples: - arn:aws:kms:us-east-1:111122223333:key/abcd1234-5678-90ab-cdef-000011112222 region: anyOf: - type: string - type: 'null' title: Region description: AWS region. Derived from `kms_arn` if omitted. examples: - us-east-1 role_arn: anyOf: - type: string - type: 'null' title: Role Arn description: IAM role ARN. Deprecated — Anthropic reaches the KMS key via a managed intermediate role; this field is ignored. deprecated: true examples: - arn:aws:iam::111122223333:role/anthropic-cmek type: type: string const: aws title: Type additionalProperties: false type: object required: - kms_arn - type title: AwsExternalKeyConfig BetaWorkspace: properties: archived_at: anyOf: - type: string format: date-time - type: 'null' title: Archived At description: RFC 3339 datetime string indicating when the Workspace was archived, or `null` if the Workspace is not archived. examples: - '2024-11-01T23:59:27.427722Z' compartment_id: type: string title: Compartment Id description: 'Identifier for this Workspace''s encryption compartment. When you configure a customer-managed encryption key (CMEK) on AWS, reference this value in your KMS key-policy condition so the key is scoped to this compartment. On GCP and Azure, Anthropic enforces the compartment binding automatically; you do not need to reference this value in your key configuration. See the CMEK integration guide for the required key configuration, including the value used during key validation.' examples: - f8a7b6c5-4d3e-4f1a-8b9c-0d1e2f3a4b5c created_at: type: string format: date-time title: Created At description: RFC 3339 datetime string indicating when the Workspace was created. examples: - '2024-10-30T23:58:27.427722Z' data_residency: $ref: '#/components/schemas/BetaDataResidency' description: Data residency configuration. display_color: type: string title: Display Color description: Hex color code representing the Workspace in the Anthropic Console. examples: - '#6C5BB9' external_key_id: anyOf: - type: string - type: 'null' title: External Key Id description: 'ID of the customer-managed encryption key (CMEK) configuration to use for this Workspace. Setting this field requires CMEK to be enabled for your organization. When set, data stored for this Workspace is encrypted with the referenced key. Create key configurations with the External Keys API. This field is write-once: once a key is attached to a Workspace it cannot be detached or replaced. To rotate key material, rotate the underlying key on your cloud KMS; the `external_key_id` stays the same.' examples: - ekey_01SDCCSbTxrXDpWc1phhtcfK id: type: string title: Id description: ID of the Workspace. examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ name: type: string title: Name description: Name of the Workspace. examples: - Workspace Name tags: additionalProperties: type: string type: object title: Tags description: User-defined tags as string key-value pairs. Keys may not begin with `anthropic`. examples: - env: prod team: platform type: type: string const: workspace title: Type description: 'Object type. For Workspaces, this is always `"workspace"`.' default: workspace type: object required: - archived_at - compartment_id - created_at - data_residency - display_color - external_key_id - id - name - tags - type title: Workspace BetaServiceAccountListResponse: properties: data: items: $ref: '#/components/schemas/BetaServiceAccount' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or null if no more results. type: object required: - data - next_page title: ServiceAccountListResponse BetaCostReportTimeBucketWidth: type: string enum: - 1d title: CostReportTimeBucketWidth BetaValidateExternalKeyResponse: properties: error: anyOf: - type: string - type: 'null' title: Error description: Error message when status is `failure`. Null otherwise. status: type: string enum: - failure - success title: Status description: '`success` — encrypt/decrypt roundtrip succeeded. `failure` — the roundtrip failed or timed out; see `error`.' type: type: string const: external_key_validation title: Type default: external_key_validation type: object required: - error - status - type title: ValidateExternalKeyResponse description: 'Result of a validation roundtrip against the customer''s KMS. HTTP 200 for both outcomes — the operation completed; `status` says whether the key works.' BetaRuleMatch: properties: audience: anyOf: - type: string maxLength: 1024 - type: 'null' title: Audience description: Exact match against the `aud` claim (any element if array). When omitted, the JWT's `aud` must still equal Anthropic's expected audience for the issuer; setting this field overrides that default. claims: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Claims description: 'Exact-match `{claim: value}` pairs against top-level claims. Only string-valued claims can be matched; use `condition` for non-string claims.' condition: anyOf: - type: string maxLength: 4096 - type: 'null' title: Condition description: CEL expression over claims for logic the structural fields can't express. Must evaluate to a boolean and may reference only the `claims` variable; a constant-true expression (such as `true`) is rejected with 400. subject_prefix: anyOf: - type: string maxLength: 1024 - type: 'null' title: Subject Prefix description: 'Match the verified JWT `sub` claim. Exact match unless the value ends with `*`, in which case it is a prefix match. Example: `repo:my-org/my-repo:ref:refs/heads/main`.' additionalProperties: false type: object title: RuleMatch description: 'Does the incoming JWT qualify? All populated fields must pass; omitted fields are skipped. At least one of `subject_prefix` (other than a wildcard-only value like `*`), `claims`, or `condition` is required; `audience` alone is not sufficient.' BetaIssuerPollStatus: properties: consecutive_failures: type: integer title: Consecutive Failures description: Consecutive fetch failures since the last success. last_fetched_at: anyOf: - type: string format: date-time - type: 'null' title: Last Fetched At description: When the last successful fetch completed. next_poll_at: anyOf: - type: string format: date-time - type: 'null' title: Next Poll At description: When the next fetch is scheduled. Null if paused. type: object required: - consecutive_failures - last_fetched_at - next_poll_at title: IssuerPollStatus description: 'Status of automatic JWKS polling for a federation issuer. Anthropic periodically fetches the issuer''s signing keys in the background. These fields summarize the most recent fetches so the health of the JWKS endpoint can be monitored.' BetaDeleteExternalKeyResponse: properties: id: type: string title: Id description: ID of the deleted External Key. examples: - ekey_01AbCdEfGhIjKlMnOpQrStUv type: type: string const: external_key_deleted title: Type default: external_key_deleted type: object required: - id - type title: DeleteExternalKeyResponse BetaEstimatedCost: properties: amount: type: integer title: Amount description: Estimated cost amount in minor currency units (e.g., cents for USD). examples: - 150 currency: type: string title: Currency description: Currency code for the estimated cost (e.g., 'USD'). examples: - USD type: object required: - amount - currency title: EstimatedCost BetaAPIError: properties: message: default: Internal server error title: Message type: string type: const: api_error default: api_error title: Type type: string required: - message - type title: APIError type: object BetaTunnelListResponse: properties: data: items: $ref: '#/components/schemas/BetaOrganizationTunnel' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or `null` if there are no more results. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= type: object required: - data - next_page title: TunnelListResponse BetaServiceAccount: properties: archived_at: anyOf: - type: string format: date-time - type: 'null' title: Archived At description: If set, this service account is archived. archived_by_actor_id: anyOf: - type: string - type: 'null' title: Archived By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that archived this service account. created_at: type: string format: date-time title: Created At description: When this service account was created. examples: - '2024-10-30T23:58:27.427722Z' created_by_actor_id: anyOf: - type: string - type: 'null' title: Created By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that created this service account. description: anyOf: - type: string - type: 'null' title: Description description: Optional free-text description. id: type: string title: Id description: Tagged ID of the service account. examples: - svac_01SDCCSbTxrXDpWc1phhtcfK name: type: string title: Name description: Admin-chosen slug identifier. examples: - ci-deploy-bot organization_role: type: string enum: - admin - developer title: Organization Role description: Org-level role. A federation rule may only be created or retargeted to grant `org:admin` scope when this is `admin`. A rule granting `org:admin` whose target is later demoted to `developer` is rejected at token exchange. Rules granting `org:admin` are managed in the Console. type: type: string const: service_account title: Type default: service_account updated_at: type: string format: date-time title: Updated At description: When this service account was last updated. examples: - '2024-10-30T23:58:27.427722Z' updated_by_actor_id: anyOf: - type: string - type: 'null' title: Updated By Actor Id description: Tagged ID (`user_`/`svac_`) of the actor that last updated this service account. type: object required: - archived_at - archived_by_actor_id - created_at - created_by_actor_id - description - id - name - organization_role - type - updated_at - updated_by_actor_id title: ServiceAccount description: 'Named non-human identity within the caller''s organization. A service account is a pure identity: name + org. Authorization lives on whatever references it (federation rules).' BetaUpdateUserParams: properties: role: type: string enum: - billing - claude_code_user - developer - managed - user title: NoAdminRoleSchema description: 'New role for the User. The accepted values depend on the organization type. Console and API organizations accept `user`, `developer`, `billing`, and `claude_code_user`; `admin` cannot be assigned through the API. Claude Enterprise organizations accept `user` and `managed`.' examples: - user - developer - billing - claude_code_user additionalProperties: false type: object required: - role title: UpdateUserParams BetaRateLimitError: properties: message: default: Rate limited title: Message type: string type: const: rate_limit_error default: rate_limit_error title: Type type: string required: - message - type title: RateLimitError type: object BetaServiceAccountUpdateParams: properties: description: anyOf: - type: string maxLength: 2000 - type: 'null' title: Description description: Replaces the description. Omit to leave unchanged; send `null` to clear (the field is stored as an empty string). organization_role: anyOf: - type: string enum: - admin - developer - type: 'null' title: Organization Role description: Replaces the org-level role. Omit or send `null` to leave unchanged. additionalProperties: false type: object title: ServiceAccountUpdateParams description: Partial update. `name` is immutable. BetaServerToolUse: properties: web_search_requests: type: integer title: Web Search Requests description: The number of web search requests made. examples: - 10 type: object required: - web_search_requests title: ServerToolUse BetaInviteSchema: properties: accepted_at: anyOf: - type: string format: date-time - type: 'null' title: Accepted At description: RFC 3339 datetime string indicating when the Invite was accepted, or null. email: type: string title: Email description: Email of the User being invited. examples: - user@emaildomain.com expires_at: type: string format: date-time title: Expires At description: RFC 3339 datetime string indicating when the Invite expires. examples: - '2024-11-20T23:58:27.427722Z' id: type: string title: Id description: ID of the Invite. examples: - invite_015gWxCN9Hfg2QhZwTK7Mdeu invited_at: type: string format: date-time title: Invited At description: RFC 3339 datetime string indicating when the Invite was created. examples: - '2024-10-30T23:58:27.427722Z' rbac_group_ids: items: type: string type: array title: Rbac Group Ids description: RBAC group IDs recorded on the Invite (Claude Enterprise organizations), to be assigned to the User when the Invite is accepted. `[]` when none. role: $ref: '#/components/schemas/BetaOrganizationRoleSchema' description: Organization role of the User. examples: - user - developer - billing - admin - claude_code_user status: $ref: '#/components/schemas/BetaInviteStatusSchema' description: Status of the Invite. examples: - pending type: type: string const: invite title: Type description: 'Object type. For Invites, this is always `"invite"`.' default: invite type: object required: - accepted_at - email - expires_at - id - invited_at - rbac_group_ids - role - status - type title: InviteSchema BetaCostReportItem: properties: currency: type: string title: Currency description: Currency code for the cost amount. Currently always `"USD"`. examples: - USD amount: type: string title: Amount description: Cost amount in lowest currency units (e.g. cents) as a decimal string. For example, `"123.45"` in `"USD"` represents `$1.23`. examples: - '123.78912' - '0.1' - '1500' workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: ID of the Workspace this cost is associated with. `null` if not grouping by workspace or for the default workspace. examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ description: anyOf: - type: string - type: 'null' title: Description description: Description of the cost item. `null` if not grouping by description. examples: - Claude Opus 5 Usage - Input Tokens cost_type: anyOf: - $ref: '#/components/schemas/BetaCostType' - type: 'null' description: Type of cost. `null` if not grouping by description. examples: - tokens - web_search - code_execution - session_usage context_window: anyOf: - $ref: '#/components/schemas/BetaMessagesUsageReportContextWindow' - type: 'null' description: Input context window used. `null` if not grouping by description or for non-token costs. examples: - 0-200k - 200k-1M model: anyOf: - type: string - type: 'null' title: Model description: Model name used. `null` if not grouping by description or for non-token costs. examples: - claude-opus-5 - claude-sonnet-5 service_tier: anyOf: - $ref: '#/components/schemas/BetaCostReportServiceTier' - type: 'null' description: Service tier used. `null` if not grouping by description or for non-token costs. examples: - standard - batch token_type: anyOf: - $ref: '#/components/schemas/BetaCostReportTokenType' - type: 'null' description: Type of token. `null` if not grouping by description or for non-token costs. examples: - uncached_input_tokens - output_tokens - cache_read_input_tokens - cache_creation.ephemeral_1h_input_tokens - cache_creation.ephemeral_5m_input_tokens inference_geo: anyOf: - $ref: '#/components/schemas/BetaInferenceGeoFilter' - type: 'null' title: Inference Geo description: 'Inference geo used matching requests'' `inference_geo` parameter if set, otherwise the workspace''s `default_inference_geo`. For models that do not support specifying `inference_geo` the value is `"not_available"`. Always `null` if not grouping by inference geo.' examples: - global - us - not_available type: object required: - currency - amount - workspace_id - description - cost_type - context_window - model - service_tier - token_type - inference_geo title: CostReportItem BetaOrganizationRoleSchema: type: string enum: - admin - billing - claude_code_user - developer - managed - membership_admin - owner - primary_owner - user title: OrganizationRoleSchema BetaUser: properties: added_at: type: string format: date-time title: Added At description: RFC 3339 datetime string indicating when the User joined the Organization. examples: - '2024-10-30T23:58:27.427722Z' email: type: string title: Email description: Email of the User. examples: - user@emaildomain.com id: type: string title: Id description: ID of the User. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q name: type: string title: Name description: Name of the User. examples: - Jane Doe role: $ref: '#/components/schemas/BetaOrganizationRoleSchema' description: Organization role of the User. examples: - user - developer - billing - admin - claude_code_user type: type: string const: user title: Type description: 'Object type. For Users, this is always `"user"`.' default: user type: object required: - added_at - email - id - name - role - type title: User BetaWorkspaceRateLimitListResponse: properties: data: items: $ref: '#/components/schemas/BetaWorkspaceRateLimit' type: array title: Data description: Rate-limit entries for the workspace, one per group that has at least one override. next_page: anyOf: - type: string - type: 'null' title: Next Page description: Token to provide in as `page` in the subsequent request to retrieve the next page of data. type: object required: - data - next_page title: WorkspaceRateLimitListResponse BetaRateLimitListResponse: properties: data: items: $ref: '#/components/schemas/BetaRateLimit' type: array title: Data description: Rate-limit entries for the organization, one per group. next_page: anyOf: - type: string - type: 'null' title: Next Page description: Token to provide in as `page` in the subsequent request to retrieve the next page of data. type: object required: - data - next_page title: RateLimitListResponse BetaCoreMetrics: properties: commits_by_claude_code: type: integer title: Commits By Claude Code description: Number of git commits created through Claude Code's commit functionality. lines_of_code: $ref: '#/components/schemas/BetaLinesOfCode' description: Statistics on code changes made through Claude Code. num_sessions: type: integer title: Num Sessions description: Number of distinct Claude Code sessions initiated by this actor. pull_requests_by_claude_code: type: integer title: Pull Requests By Claude Code description: Number of pull requests created through Claude Code's PR functionality. type: object required: - commits_by_claude_code - lines_of_code - num_sessions - pull_requests_by_claude_code title: CoreMetrics BetaNoBillingWorkspaceRoleSchema: type: string enum: - workspace_admin - workspace_developer - workspace_restricted_developer - workspace_user title: NoBillingWorkspaceRoleSchema BetaGetClaudeCodeUsageReportResponse: properties: data: items: $ref: '#/components/schemas/BetaClaudeCodeUsageReportItem' type: array title: Data description: List of Claude Code usage records for the requested date. has_more: type: boolean title: Has More description: True if there are more records available beyond the current page. next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor token for fetching the next page of results, or null if no more pages are available. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= - null type: object required: - data - has_more - next_page title: GetClaudeCodeUsageReportResponse BetaCostReportServiceTier: type: string enum: - batch - standard title: CostReportServiceTier BetaServiceAccountWorkspaceMember: properties: created_by_actor_id: anyOf: - type: string - type: 'null' title: Created By Actor Id description: Tagged ID (`user_...`/`svac_...`) of the actor who created this membership. implicit: anyOf: - type: boolean - type: 'null' title: Implicit description: 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. service_account_id: type: string title: Service Account Id description: Tagged service account ID (`svac_...`). type: type: string const: service_account_workspace_member title: Type default: service_account_workspace_member workspace_id: type: string title: Workspace Id description: Tagged workspace ID (`wrkspc_...`). workspace_role: $ref: '#/components/schemas/BetaWorkspaceRoleSchema' description: Role of the service account in this workspace. Service accounts cannot hold the `workspace_billing` role. type: object required: - created_by_actor_id - implicit - service_account_id - type - workspace_id - workspace_role title: ServiceAccountWorkspaceMember BetaInvalidRequestError: properties: message: default: Invalid request title: Message type: string type: const: invalid_request_error default: invalid_request_error title: Type type: string required: - message - type title: InvalidRequestError type: object BetaOrganizationSchema: properties: id: type: string format: uuid title: Id description: ID of the Organization. examples: - 12345678-1234-5678-1234-567812345678 name: type: string title: Name description: Name of the Organization. examples: - Organization Name type: type: string const: organization title: Type description: 'Object type. For Organizations, this is always `"organization"`.' default: organization type: object required: - id - name - type title: OrganizationSchema BetaCreateTunnelCertificateParams: properties: ca_certificate_pem: type: string maxLength: 8192 title: Ca Certificate Pem description: 'PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no private-key material.' examples: - '-----BEGIN CERTIFICATE----- MIIBexampleEXAMPLEexampleEXAMPLEexampleEXAMPLEexampleEXAMPLEexa ...illustrative placeholder, not a real certificate... -----END CERTIFICATE----- ' additionalProperties: false type: object required: - ca_certificate_pem title: CreateTunnelCertificateParams BetaAllowedInferenceGeo: enum: - global - us title: AllowedInferenceGeo type: string BetaExternalKeyCreateParams: properties: display_name: anyOf: - type: string maxLength: 255 minLength: 1 - type: 'null' title: Display Name description: Human-friendly display name. geo: type: string const: us title: Geo description: Data residency geo. Only `us` is supported. provider_config: oneOf: - $ref: '#/components/schemas/BetaAwsExternalKeyConfig' - $ref: '#/components/schemas/BetaGcpExternalKeyConfig' - $ref: '#/components/schemas/BetaAzureExternalKeyConfigParams' title: Provider Config description: KMS provider identity and auth coordinates. discriminator: propertyName: type mapping: aws: '#/components/schemas/BetaAwsExternalKeyConfig' azure: '#/components/schemas/BetaAzureExternalKeyConfigParams' gcp: '#/components/schemas/BetaGcpExternalKeyConfig' additionalProperties: false type: object required: - provider_config title: ExternalKeyCreateParams BetaListResponse_InviteSchema_: properties: data: items: $ref: '#/components/schemas/BetaInviteSchema' type: array title: Data first_id: anyOf: - type: string - type: 'null' title: First Id description: First ID in the `data` list. Can be used as the `before_id` for the previous page. has_more: type: boolean title: Has More description: Indicates if there are more results in the requested page direction. last_id: anyOf: - type: string - type: 'null' title: Last Id description: Last ID in the `data` list. Can be used as the `after_id` for the next page. type: object required: - data - first_id - has_more - last_id title: ListResponse[InviteSchema] BetaRotateTunnelTokenParams: properties: reason: anyOf: - type: string maxLength: 1024 - type: 'null' title: Reason description: Optional free-text reason for the rotation, recorded for audit. examples: - Suspected key compromise additionalProperties: false type: object title: RotateTunnelTokenParams BetaFederationRuleWorkspaceListResponse: properties: data: items: $ref: '#/components/schemas/BetaFederationRuleWorkspace' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page; null when there are no more results. type: object required: - data - next_page title: FederationRuleWorkspaceListResponse BetaServiceAccountWorkspaceMemberUpdateParams: properties: workspace_role: $ref: '#/components/schemas/BetaNoBillingWorkspaceRoleSchema' description: New role for the service account in this workspace. additionalProperties: false type: object required: - workspace_role title: ServiceAccountWorkspaceMemberUpdateParams BetaListResponse_User_: properties: data: items: $ref: '#/components/schemas/BetaUser' type: array title: Data first_id: anyOf: - type: string - type: 'null' title: First Id description: First ID in the `data` list. Can be used as the `before_id` for the previous page. has_more: type: boolean title: Has More description: Indicates if there are more results in the requested page direction. last_id: anyOf: - type: string - type: 'null' title: Last Id description: Last ID in the `data` list. Can be used as the `after_id` for the next page. type: object required: - data - first_id - has_more - last_id title: ListResponse[User] BetaWorkspaceCreateParams: additionalProperties: false properties: data_residency: anyOf: - $ref: '#/components/schemas/BetaDataResidencyCreateParams' - type: 'null' description: 'Data residency configuration for the workspace. If omitted, defaults to `workspace_geo: "us"`, `allowed_inference_geos: "unrestricted"`, and `default_inference_geo: "global"`.' display_color: anyOf: - maxLength: 7 pattern: ^#[0-9A-Fa-f]{6}$ type: string - type: 'null' description: Hex color code representing the Workspace in the Anthropic Console. examples: - '#6C5BB9' title: Display Color external_key_id: anyOf: - type: string - type: 'null' description: 'ID of the customer-managed encryption key (CMEK) configuration to use for this Workspace. Setting this field requires CMEK to be enabled for your organization. When set, data stored for this Workspace is encrypted with the referenced key. Create key configurations with the External Keys API. This field is write-once: once a key is attached to a Workspace it cannot be detached or replaced. To rotate key material, rotate the underlying key on your cloud KMS; the `external_key_id` stays the same.' examples: - ekey_01SDCCSbTxrXDpWc1phhtcfK title: External Key Id name: description: Name of the Workspace. maxLength: 40 minLength: 1 title: Name type: string tags: anyOf: - additionalProperties: type: string type: object - type: 'null' description: User-defined tags as string key-value pairs. Keys may not begin with `anthropic`. examples: - env: prod team: platform title: Tags required: - name title: WorkspaceCreateParams type: object BetaGcpExternalKeyConfig: properties: key_name: type: string title: Key Name description: Full resource name of the Cloud KMS key. examples: - projects/my-proj/locations/us/keyRings/my-ring/cryptoKeys/my-key type: type: string const: gcp title: Type additionalProperties: false type: object required: - key_name - type title: GcpExternalKeyConfig BetaFederationRuleListResponse: properties: data: items: $ref: '#/components/schemas/BetaFederationRule' type: array title: Data next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or null if no more results. type: object required: - data - next_page title: FederationRuleListResponse BetaSpeed: type: string description: Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. enum: - standard - fast BetaServiceAccountTarget: properties: service_account_id: type: string title: Service Account Id description: Tagged ID of the service account to mint tokens for. examples: - svac_01SDCCSbTxrXDpWc1phhtcfK service_account_name: anyOf: - type: string - type: 'null' title: Service Account Name description: Service account's display name at read time. Ignored on writes. type: type: string const: service_account title: Type additionalProperties: false type: object required: - service_account_id - type title: ServiceAccountTarget description: Bind to a fixed service account by ID. BetaCreatedBy: properties: id: type: string title: Id description: ID of the actor that created the object. examples: - user_01WCz1FkmYMm4gnmykNKUu3Q type: type: string enum: - service_account - user title: Type description: Type of the actor that created the object. examples: - user type: object required: - id - type title: CreatedBy BetaOverloadedError: properties: message: default: Overloaded title: Message type: string type: const: overloaded_error default: overloaded_error title: Type type: string required: - message - type title: OverloadedError type: object BetaBillingError: properties: message: default: Billing error title: Message type: string type: const: billing_error default: billing_error title: Type type: string required: - message - type title: BillingError type: object BetaUpdateWorkspaceMemberParams: properties: workspace_role: $ref: '#/components/schemas/BetaWorkspaceRoleSchema' description: New workspace role for the User. additionalProperties: false type: object required: - workspace_role title: UpdateWorkspaceMemberParams BetaUsageReportServiceTier: type: string enum: - batch - flex - flex_discount - priority - priority_on_demand - standard title: UsageReportServiceTier BetaAuthenticationError: properties: message: default: Authentication error title: Message type: string type: const: authentication_error default: authentication_error title: Type type: string required: - message - type title: AuthenticationError type: object BetaJwksDiscovery: properties: ca_cert_pem: anyOf: - type: string maxLength: 8192 - type: 'null' title: Ca Cert Pem description: Optional custom CA (PEM) for TLS verification of the JWKS fetch. discovery_base: anyOf: - type: string - type: 'null' title: Discovery Base description: Set when the discovery URL differs from `issuer_url`. type: type: string const: discovery title: Type additionalProperties: false type: object required: - type title: JwksDiscovery description: JWKS via the issuer's OIDC discovery document. BetaNotFoundError: properties: message: default: Not found title: Message type: string type: const: not_found_error default: not_found_error title: Type type: string required: - message - type title: NotFoundError type: object BetaUnattachedAttachment: properties: type: type: string const: unattached title: Type default: unattached type: object required: - type title: UnattachedAttachment BetaOrganizationTunnelToken: properties: id: type: string title: Id description: 'Stable identifier for the current token value. Changes when the token is rotated.' examples: - ttkn_bb97000eaec162831399ca9b6684a4fdf5be49ace5683057b017aab5c87e19e0 tunnel_token: type: string title: Tunnel Token description: The tunnel's connection token. examples: - eyJhIjoiRVhBTVBMRSIsInQiOiJFWEFNUExFIiwicyI6IkVYQU1QTEUifQ== type: type: string const: tunnel_token title: Type description: Object type. Always `tunnel_token` for Tunnel Tokens. default: tunnel_token type: object required: - id - tunnel_token - type title: OrganizationTunnelToken BetaInviteStatusSchema: type: string enum: - accepted - deleted - expired - pending title: InviteStatusSchema BetaApiKeyServiceAccountActor: properties: service_account_id: type: string title: Service Account Id description: ID of the Service Account the API key acts as. examples: - svac_01Hk3R9TWxq7CfQak00OiVw4 type: type: string const: service_account_actor title: Type description: Principal type. Always `"service_account_actor"` for a Service Account. default: service_account_actor type: object required: - service_account_id - type title: ApiKeyServiceAccountActor BetaCostReportTokenType: type: string enum: - cache_creation.ephemeral_1h_input_tokens - cache_creation.ephemeral_5m_input_tokens - cache_read_input_tokens - output_tokens - uncached_input_tokens title: CostReportTokenType BetaFederationIssuerCreateParams: properties: check_jti: anyOf: - type: boolean - type: 'null' title: Check Jti description: Whether the jwt-bearer exchange enforces JTI single-use (replay protection) for tokens from this issuer. Defaults to true. Applies only to assertions carrying a `jti` claim; tokens without one are accepted without single-use enforcement. issuer_url: type: string minLength: 1 title: Issuer Url description: The `iss` claim value to match against. jwks: oneOf: - $ref: '#/components/schemas/BetaJwksDiscovery' - $ref: '#/components/schemas/BetaJwksExplicitUrl' - $ref: '#/components/schemas/BetaJwksInline' title: Jwks description: How signing keys are obtained. Defaults to OIDC discovery. discriminator: propertyName: type mapping: discovery: '#/components/schemas/BetaJwksDiscovery' explicit_url: '#/components/schemas/BetaJwksExplicitUrl' inline: '#/components/schemas/BetaJwksInline' max_jwt_lifetime_seconds: anyOf: - type: integer maximum: 176400 exclusiveMinimum: 0 - type: 'null' title: Max Jwt Lifetime Seconds description: Maximum allowed iat→exp spread for assertions from this issuer (1-176400 seconds, i.e. up to 49h). Defaults to 3600 (1h). Assertions must carry both `iat` and `exp`; a missing `iat` is rejected. name: type: string maxLength: 255 minLength: 1 title: Name description: Slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. additionalProperties: false type: object required: - issuer_url - name title: FederationIssuerCreateParams BetaApiKeyUpdateParams: additionalProperties: false properties: name: anyOf: - maxLength: 500 minLength: 1 type: string - type: 'null' description: Name of the API key. title: Name status: anyOf: - enum: - active - archived - inactive type: string - type: 'null' description: Status of the API key. title: Status title: ApiKeyUpdateParams type: object BetaPermissionError: properties: message: default: Permission denied title: Message type: string type: const: permission_error default: permission_error title: Type type: string required: - message - type title: PermissionError type: object BetaTokenUsage: properties: cache_creation: type: integer title: Cache Creation description: Number of cache creation tokens consumed by this model. cache_read: type: integer title: Cache Read description: Number of cache read tokens consumed by this model. input: type: integer title: Input description: Number of input tokens consumed by this model. output: type: integer title: Output description: Number of output tokens generated by this model. type: object required: - cache_creation - cache_read - input - output title: TokenUsage BetaRemoveFederationRuleWorkspaceResponse: properties: federation_rule_id: type: string title: Federation Rule Id description: Tagged ID of the federation rule. type: type: string const: federation_rule_workspace_deleted title: Type default: federation_rule_workspace_deleted workspace_id: type: string title: Workspace Id description: Tagged ID of the workspace named in the delete request. Removal is idempotent. type: object required: - federation_rule_id - type - workspace_id title: RemoveFederationRuleWorkspaceResponse BetaServiceAccountCreateParams: properties: description: anyOf: - type: string maxLength: 2000 - type: 'null' title: Description description: Optional free-text description. name: type: string maxLength: 255 minLength: 1 title: Name description: Slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409. examples: - ci-deploy-bot organization_role: type: string enum: - admin - developer title: Organization Role description: Org-level role. Defaults to `developer`. additionalProperties: false type: object required: - name title: ServiceAccountCreateParams BetaJwksExplicitUrl: properties: ca_cert_pem: anyOf: - type: string maxLength: 8192 - type: 'null' title: Ca Cert Pem description: Optional custom CA (PEM) for TLS verification of the JWKS fetch. type: type: string const: explicit_url title: Type url: type: string minLength: 1 title: Url description: JWKS endpoint. additionalProperties: false type: object required: - type - url title: JwksExplicitUrl description: JWKS fetched from a fixed endpoint. BetaOrganizationTunnel: properties: archived_at: anyOf: - type: string format: date-time - type: 'null' title: Archived At description: 'RFC 3339 datetime string indicating when the Tunnel was archived, or `null` if it is not archived.' examples: - '2024-11-01T23:59:27.427722Z' created_at: type: string format: date-time title: Created At description: RFC 3339 datetime string indicating when the Tunnel was created. examples: - '2024-10-30T23:58:27.427722Z' display_name: anyOf: - type: string - type: 'null' title: Display Name description: Human-readable name for the Tunnel (1–255 characters), or `null` if unset. examples: - Production domain: type: string title: Domain description: 'Anthropic-assigned hostname for the Tunnel. MCP server URLs whose host is a subdomain of this value are routed through the Tunnel. Globally unique and never reused, even after the Tunnel is archived.' examples: - a1b2c3d4.tunnel.anthropic.com id: type: string title: Id description: ID of the Tunnel. examples: - tnl_01Hx9Kp2RtQvMn3sWbYdLcF8 type: type: string const: tunnel title: Type description: Object type. Always `tunnel` for Tunnels. default: tunnel workspace_id: anyOf: - type: string - type: 'null' title: Workspace Id description: 'ID of the Workspace this Tunnel belongs to, or `null` for the default Workspace. Immutable after creation.' examples: - wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ type: object required: - archived_at - created_at - display_name - domain - id - type - workspace_id title: OrganizationTunnel BetaFederationRuleWorkspace: properties: created_at: type: string format: date-time title: Created At description: When this workspace was enabled for the rule. examples: - '2024-10-30T23:58:27.427722Z' created_by_actor_id: anyOf: - type: string - type: 'null' title: Created By Actor Id description: Tagged ID (`user_...` or `svac_...`) of the actor that enabled this workspace for the rule, if known. federation_rule_id: type: string title: Federation Rule Id description: Tagged ID of the federation rule. type: type: string const: federation_rule_workspace title: Type default: federation_rule_workspace workspace_id: type: string title: Workspace Id description: Tagged ID of the workspace this rule is enabled for. workspace_name: anyOf: - type: string - type: 'null' title: Workspace Name description: Workspace display name. Populated when listing; null in the enable response. type: object required: - created_at - created_by_actor_id - federation_rule_id - type - workspace_id - workspace_name title: FederationRuleWorkspace BetaCostReportTimeBucket: properties: starting_at: type: string format: date-time title: Starting At description: Start of the time bucket (inclusive) in RFC 3339 format. examples: - '2025-08-01T00:00:00Z' ending_at: type: string format: date-time title: Ending At description: End of the time bucket (exclusive) in RFC 3339 format. examples: - '2025-08-02T00:00:00Z' results: items: $ref: '#/components/schemas/BetaCostReportItem' type: array title: Results description: List of cost items for this time bucket. There may be multiple items if one or more `group_by[]` parameters are specified. type: object required: - starting_at - ending_at - results title: CostReportTimeBucket BetaGetMessagesUsageReportResponse: properties: data: items: $ref: '#/components/schemas/BetaMessagesUsageReportTimeBucket' type: array title: Data description: 'List of time buckets for this page, oldest first: one per `bucket_width` interval, including intervals with no usage (their `results` list is empty). A page holds at most `limit` buckets.' has_more: type: boolean title: Has More description: Indicates if there are more results. next_page: anyOf: - type: string - type: 'null' title: Next Page description: Opaque cursor for the next page, or `null` when `has_more` is false. Pass it as the `page` parameter in the next request. examples: - page_MjAyNS0wNS0xNFQwMDowMDowMFo= - null type: object required: - data - has_more - next_page title: GetMessagesUsageReportResponse BetaApiKeyOrganizationScope: properties: type: type: string const: organization title: Type description: 'Scope type. Always `"organization"`: the API key has no Workspace. Only a principal-bound API key can have this scope.' default: organization type: object required: - type title: ApiKeyOrganizationScope BetaCostReportGroupBy: type: string enum: - description - workspace_id title: CostReportGroupBy BetaApprovalMetrics: properties: accepted: type: integer title: Accepted description: Number of tool action proposals that the user accepted. rejected: type: integer title: Rejected description: Number of tool action proposals that the user rejected. type: object required: - accepted - rejected title: ApprovalMetrics BetaErrorResponse: properties: error: discriminator: mapping: api_error: '#/components/schemas/BetaAPIError' authentication_error: '#/components/schemas/BetaAuthenticationError' billing_error: '#/components/schemas/BetaBillingError' invalid_request_error: '#/components/schemas/BetaInvalidRequestError' not_found_error: '#/components/schemas/BetaNotFoundError' overloaded_error: '#/components/schemas/BetaOverloadedError' permission_error: '#/components/schemas/BetaPermissionError' rate_limit_error: '#/components/schemas/BetaRateLimitError' timeout_error: '#/components/schemas/BetaGatewayTimeoutError' propertyName: type oneOf: - $ref: '#/components/schemas/BetaInvalidRequestError' - $ref: '#/components/schemas/BetaAuthenticationError' - $ref: '#/components/schemas/BetaBillingError' - $ref: '#/components/schemas/BetaPermissionError' - $ref: '#/components/schemas/BetaNotFoundError' - $ref: '#/components/schemas/BetaRateLimitError' - $ref: '#/components/schemas/BetaGatewayTimeoutError' - $ref: '#/components/schemas/BetaAPIError' - $ref: '#/components/schemas/BetaOverloadedError' title: Error request_id: anyOf: - type: string - type: 'null' default: null title: Request Id type: const: error default: error title: Type type: string required: - error - request_id - type title: ErrorResponse type: object BetaWorkspaceGeo: enum: - us title: WorkspaceGeo type: string BetaAzureExternalKeyConfigParams: properties: client_id: anyOf: - type: string - type: 'null' title: Client Id description: Azure AD application (client) ID. Omit to use Anthropic's multitenant app. Provide only if using a single-tenant app registration in the customer's directory. key_name: type: string title: Key Name description: Name of the key within the vault. tenant_id: type: string title: Tenant Id description: Azure AD tenant ID. type: type: string const: azure title: Type vault_uri: type: string title: Vault Uri description: Key Vault data-plane URI — `https://{vault-name}.vault.azure.net` or `https://{hsm-name}.managedhsm.azure.net`. examples: - https://my-vault.vault.azure.net/ additionalProperties: false type: object required: - key_name - tenant_id - type - vault_uri title: AzureExternalKeyConfigParams description: Azure Key Vault provider configuration. BetaRateLimit: properties: group_type: type: string enum: - batch - files - model_group - skills - token_count - web_search title: Group Type description: 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`. id: type: string title: Id description: Stable identifier for this rate-limit group within the organization. limits: items: $ref: '#/components/schemas/BetaRateLimitValue' type: array title: Limits description: The limiter values that apply to this group. models: anyOf: - items: type: string type: array - type: 'null' title: Models description: Model names this entry's limits apply to, including aliases. `null` when `group_type` is not `"model_group"`. type: type: string const: rate_limit title: Type description: Object type. Always `rate_limit` for organization rate-limit entries. default: rate_limit type: object required: - group_type - id - limits - models - type title: RateLimit BetaClaudeCodeApiActor: properties: api_key_name: type: string title: Api Key Name description: Name of the API key used to perform Claude Code actions. examples: - Developer Key type: type: string const: api_actor title: Type description: Actor type. Always `"api_actor"` for an API key. type: object required: - api_key_name - type title: ClaudeCodeApiActor BetaWorkspaceRoleSchema: type: string enum: - workspace_admin - workspace_billing - workspace_developer - workspace_restricted_developer - workspace_user title: WorkspaceRoleSchema AnthropicBeta: anyOf: - type: string - type: string enum: - message-batches-2024-09-24 - prompt-caching-2024-07-31 - computer-use-2024-10-22 - computer-use-2025-01-24 - pdfs-2024-09-25 - token-counting-2024-11-01 - token-efficient-tools-2025-02-19 - output-128k-2025-02-19 - files-api-2025-04-14 - mcp-client-2025-04-04 - mcp-client-2025-11-20 - dev-full-thinking-2025-05-14 - interleaved-thinking-2025-05-14 - code-execution-2025-05-22 - extended-cache-ttl-2025-04-11 - context-1m-2025-08-07 - context-management-2025-06-27 - model-context-window-exceeded-2025-08-26 - skills-2025-10-02 - fast-mode-2026-02-01 - output-300k-2026-03-24 - user-profiles-2026-03-24 - user-profiles-2026-08-18 - advisor-tool-2026-03-01 - managed-agents-2026-04-01 - cache-diagnosis-2026-04-07 - dreaming-2026-04-21 - thinking-token-count-2026-05-13 - server-side-fallback-2026-06-01 - server-side-fallback-2026-07-01 - fallback-credit-2026-06-01 - fallback-credit-2026-07-01 - agent-memory-2026-07-22 - mid-conversation-tool-changes-2026-07-01 - compact-2026-01-12 - computer-use-2025-11-24 - mcp-tunnels-2026-06-22 - structured-outputs-2025-11-13 - task-budgets-2026-03-13 - thinking-display-updates-2026-08-18 - ce-user-management-2026-07-13 x-stainless-nominal: false BetaInferenceGeo: enum: - global - us title: InferenceGeo type: string BetaRateLimitValue: properties: type: type: string title: Type description: The limiter type (for example, `requests_per_minute` or `input_tokens_per_minute`). value: type: integer title: Value description: The configured limit value for this limiter type. type: object required: - type - value title: RateLimitValue BetaWorkspaceRateLimitValue: properties: org_limit: anyOf: - type: integer - type: 'null' title: Org Limit description: The organization-level value for the same limiter type, for reference. `null` when the organization has no limit configured for this limiter type. type: type: string title: Type description: The limiter type (for example, `requests_per_minute` or `input_tokens_per_minute`). value: type: integer title: Value description: The workspace-level override value for this limiter type. type: object required: - org_limit - type - value title: WorkspaceRateLimitValue