> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare

> Connect a Cloudflare Billing Read token to nOps for product cost visibility

## Overview

nOps uses your **Cloudflare account ID** and an API token with **Billing Read** to pull product usage and contracted cost into Inform. The token is stored securely, validated before save, and is not shown again after you connect.

Cloudflare's billable usage API covers **self-serve accounts only**. Enterprise contracts are not included yet. Connecting an Enterprise account will not produce cost data in Inform.

Usage is updated **daily**. Cost appears in Inform after that sync, which can take up to **24 hours**.

## Prerequisites

* A **self-serve** Cloudflare account
* An API token with the **Billing Read** permission
* nOps organization **administrator** access

<Note>
  Only **admins** and **owners** can connect, re-validate, or disconnect. **Members** see **Admin
  Only** on connectable cards.
</Note>

## Create a Cloudflare API token

1. Sign in to the [Cloudflare dashboard](https://dash.cloudflare.com).
2. Open **My Profile → API Tokens → Create Token**.
3. Choose **Create Custom Token**.
4. Add this permission:
   * **Account → Billing → Read**
5. Under **Account Resources**, include the account you want nOps to read.
6. Create the token and copy it immediately — it is typically shown only once.
7. Copy your **Account ID**. It is the 32-character value in the dashboard URL (`https://dash.cloudflare.com/<account_id>/...`) or on the account home page.

<Warning>
  The token **must** include **Billing Read**. A token without that permission cannot read billable
  usage, and nOps will not store it.
</Warning>

## Connect in nOps

### Where to open Cloudflare

* **To connect for the first time** — go to **Settings → Integrations** (`/settings/integrations` or **View all**) and click the **Cloudflare** card.
* **To manage an existing connection** — go to **Settings → Account Status → Connected apps** and click the **Cloudflare** chip to re-validate or disconnect.

### Connect steps

1. Click the **Cloudflare** card or chip.
2. Paste your **Account ID** and **API token**, then click **Connect**.

nOps checks the account ID and token against Cloudflare's billable usage API before storing them. On success, the catalog shows **Integrated** or Connected apps shows **Connected**.

## What nOps brings back

After the daily sync, Inform can show:

* Product name (`ServiceName` and `ServiceFamilyName`)
* Charge period
* Quantity
* Contracted cost (`ContractedCost`)
* Zone, when Cloudflare includes one (`ZoneId` / `ZoneName`)

<Note>
  This API does not cover **Enterprise** contracts. If your Cloudflare account is Enterprise, the
  connection will not produce cost rows in Inform.
</Note>

## Manage your connection

Administrators can **Re-validate** stored credentials or **Disconnect** from the same modal. **Action required** means the token was revoked or no longer has Billing Read — fix the token in Cloudflare, then re-validate or connect again.

## Troubleshooting

* **Invalid token** — confirm there are no typos and that the token is still active in Cloudflare.
* **Missing Billing Read** — edit the token (or create a new one) so it includes **Account → Billing → Read**, then connect again.
* **Wrong account ID** — use the 32-character ID from the dashboard URL or account home. It must match the account the token can read.
* **No data yet** — allow up to **24 hours** after connect. Usage is refreshed once a day, and a new account may have no billable rows yet.
* **Enterprise account** — self-serve usage is the only data this connection can read. Enterprise contracts are not in the billable usage API yet.
* **Rate limits** — wait briefly and use **Re-validate**.

## Security

Treat the API token like a password. Rotate it on a schedule, and keep the token scoped to Billing Read on the account you want nOps to see.
