---
title: "Update an Anthropic Usage and Costs account"
method: PATCH
path: "/api/v2/integration-interfaces/anthropic-usage-and-costs/accounts/{account_id}"
tags: ["Anthropic Usage And Costs Integration"]
---

# Update an Anthropic Usage and Costs account

`PATCH /api/v2/integration-interfaces/anthropic-usage-and-costs/accounts/{account_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/integration-interfaces/anthropic-usage-and-costs/accounts/{account_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`

Update an Anthropic Usage and Costs integration account. Only the fields provided are changed.

## Path parameters

- `account_id` string, required

## Request body

- AnthropicUsageAndCostsIntegrationAccountUpdateRequest: Request payload to update an Anthropic Usage and Costs integration account.
  - `data` AnthropicUsageAndCostsIntegrationAccountUpdateData, required: Data envelope for updating an Anthropic Usage and Costs integration account.
    - `attributes` AnthropicUsageAndCostsIntegrationAccountUpdateAttributes, required: Writable attributes used to update an Anthropic Usage and Costs integration account. Every field is optional. Only the provided fields are changed. When `dataflows` is provided, only the dataflow IDs in the request are modified. Dataflows omitted from the map keep their current configuration.
      - `authentication` AnthropicUsageAndCostsIntegrationAccountAuthenticationUpdate: Bearer token authentication. Use an Anthropic Admin API key (Platform plan) or an Analytics API key with the `read:analytics` scope (Enterprise plan). An invalid key, or an Analytics key without the `read:analytics` scope, is rejected with a `422` response. Only the provided fields are changed. To keep the stored token, omit `token`.
        - `auth_type` 'bearer_token', required: The authentication method type.
        - `token` string: Anthropic Admin API key with permission to read usage and cost data, or an Analytics API key with the `read:analytics` scope. Generate an Admin API key in the Anthropic Console under **Settings > Admin Keys**.
      - `dataflows` AnthropicUsageAndCostsIntegrationDataflowsRequest: Data Datadog collects from Anthropic Usage and Costs, keyed by dataflow ID. Datadog always collects usage metrics. Each dataflow in this object adds another type of collection. Set `enabled` to start or stop a dataflow. The default for each dataflow applies when the account is created. On update, omitted fields keep their current values. If a dataflow depends on a Datadog product, its description names that product. If you enable a dataflow without that product, Datadog stores the setting but collects no data.
        - `anthropic-cloud-cost-metrics` AnthropicUsageAndCostsCloudCostMetricsIntegrationDataflowRequest: Anthropic costs by model, workspace, and service tier, in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). Requires Cloud Cost Management on your Datadog organization. Without it, this dataflow collects no data. Cost data appears in Cloud Cost Management within 24 to 48 hours of enabling this dataflow.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`. Set to `true` to start collection.
      - `name` string: Human-readable name of the Anthropic Usage and Costs integration account.
    - `id` string, required: Unique identifier of the Anthropic Usage and Costs integration account to update.
    - `type` 'integration-account', required: The type of the integration account resource. Always `integration-account`.

## Response `200`

OK

- AnthropicUsageAndCostsIntegrationAccountResponse: Response payload for a single Anthropic Usage and Costs integration account.
  - `data` AnthropicUsageAndCostsIntegrationAccountResponseData, required: Data envelope of an Anthropic Usage and Costs integration account, including server-assigned identity.
    - `attributes` AnthropicUsageAndCostsIntegrationAccountResponseAttributes, required: Attributes of an Anthropic Usage and Costs integration account returned in responses.
      - `authentication` AnthropicUsageAndCostsIntegrationAccountAuthenticationResponse: The bearer token authentication method configured on the account.
        - `auth_type` 'bearer_token', required: The authentication method type.
      - `dataflows` AnthropicUsageAndCostsIntegrationDataflowsResponse: Data Datadog collects from Anthropic Usage and Costs, keyed by dataflow ID.
        - `anthropic-cloud-cost-metrics` AnthropicUsageAndCostsCloudCostMetricsIntegrationDataflowResponse: Anthropic costs by model, workspace, and service tier, in [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/). Requires Cloud Cost Management on your Datadog organization. Without it, this dataflow collects no data.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `anthropic-usage-metrics` AnthropicUsageAndCostsUsageMetricsIntegrationDataflowResponse: Anthropic usage metrics, such as input, output, and cache token consumption by model, workspace, and service tier. With an Analytics API key, usage is also broken down by user, product, context window, inference geography, and speed. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
          - `enabled` boolean: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `claude-daily-usage-dora-metrics` AnthropicUsageAndCostsDailyUsageDoraMetricsIntegrationDataflowResponse: Daily Claude usage data used for DORA Metrics. This dataflow is always on and cannot be turned off, which is why it appears in responses only.
          - `enabled` boolean: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
      - `name` string, required: Human-readable name of the Anthropic Usage and Costs integration account.
    - `id` string, required: Server-generated unique identifier of the Anthropic Usage and Costs integration account.
    - `type` 'integration-account', required: The type of the integration account resource. Always `integration-account`.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `422`: The server cannot process the request because it contains invalid data.
- `429`: Too many requests

## Changes

- **2026-11-20** `bc1b0b6c9ece`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/changes/api/v2/integration-interfaces/anthropic-usage-and-costs/accounts/:account_id/patch.md)

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/4ba32926196d?raw)
