---
title: "Update Cloudflare account"
method: PATCH
path: "/api/v2/integrations/cloudflare/accounts/{account_id}"
tags: ["Cloudflare Integration"]
---

# Update Cloudflare account

`PATCH /api/v2/integrations/cloudflare/accounts/{account_id}`

Update a Cloudflare account.

## Path parameters

- `account_id` string, required

## Request body

- CloudflareAccountUpdateRequest — Payload schema when updating a Cloudflare account.
  - `data` CloudflareAccountUpdateRequestData, required — Data object for updating a Cloudflare account.
    - `attributes` CloudflareAccountUpdateRequestAttributes — Attributes object for updating a Cloudflare account.
      - `api_key` string, required — The API key of the Cloudflare account.
      - `email` string — The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.
      - `name` string — The name of the Cloudflare account.
      - `resources` string[] — An allowlist of resources to restrict pulling metrics for including `'web', 'dns', 'lb' (load balancer), 'worker'`.
      - `zones` string[] — An allowlist of zones to restrict pulling metrics for.
    - `type` 'cloudflare-accounts' — The JSON:API type for this API. Should always be `cloudflare-accounts`.

## Response `200`

OK

- CloudflareAccountResponse — The expected response schema when getting a Cloudflare account.
  - `data` CloudflareAccountResponseData — Data object of a Cloudflare account.
    - `attributes` CloudflareAccountResponseAttributes, required — Attributes object of a Cloudflare account.
      - `email` string — The email associated with the Cloudflare account.
      - `name` string, required — The name of the Cloudflare account.
      - `resources` string[] — An allowlist of resources, such as `web`, `dns`, `lb` (load balancer), `worker`, that restricts pulling metrics from those resources.
      - `zones` string[] — An allowlist of zones to restrict pulling metrics for.
    - `id` string, required — The ID of the Cloudflare account, a hash of the account name.
    - `type` 'cloudflare-accounts', required — The JSON:API type for this API. Should always be `cloudflare-accounts`.

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/versions/da68bf029e4c/schema)
