Skip to main content

Cloudflare

Manage Cloudflare DNS, Workers, Pages, R2 and cache with a scoped API token.

Connect it with: API key. Cloudflare's own documentation: https://developers.cloudflare.com/fundamentals/api/get-started/create-token/.

What agents can do​

Connect Cloudflare so the agents working your tasks can reach it. With it connected, they can:

  • Add, change or remove DNS records for a zone.
  • Deploy and inspect Workers and Pages projects, and read their logs.
  • Purge the cache for a URL after a release.
  • Read and write R2 buckets and KV namespaces.
  • Read analytics and firewall events to investigate an incident.

Before you start​

  • A Cloudflare account with permission to create API tokens (any member can create their own; account-owned tokens need Super Administrator).
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Cloudflare​

Jaah connects to Cloudflare with an API key, not with a sign-in button.

Connect with an API key​

Find each value first:

  • API token: Cloudflare dashboard > your profile icon > My Profile > API Tokens > Create Token: start from a template (for example Edit zone DNS or Edit Cloudflare Workers) or Create Custom Token, limit it to the accounts and zones agents need, then Continue to summary > Create Token and copy it - Cloudflare shows it once.
  • Account ID (optional): Optional, so agents know which account to use: Cloudflare dashboard > Account home > the account's ... menu > Copy account ID (also shown on any zone's Overview page, right column).

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the Cloudflare card.
  2. Name the secret and choose who can use it.
  3. Fill in API token, Account ID.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to Cloudflare with an API key, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah calls Cloudflare's API once (GET https://api.cloudflare.com/client/v4/user/tokens/verify) with the stored values, and shows whether Cloudflare accepted it, or which value Cloudflare refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: api_token, account_id.

Tell the agent in your task description which secret to use, for example “use the Cloudflare secret org/cloudflare”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Cloudflare once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Cloudflare's side too, revoke or delete the key at Cloudflare.

Limitations​

  • Jaah's Test verifies user API tokens (My Profile > API Tokens). An account-owned token (Manage Account > Account API Tokens) works for agents but its Test is rejected - use a user token.
  • A token can do exactly what its permission groups and zone or account resources allow; agents get 403 elsewhere.
  • The legacy Global API Key is not supported: it cannot be scoped and Cloudflare advises against it.
  • Cloudflare limits API calls to 1,200 per five minutes per user.
  • Agents can do only what the connected Cloudflare account allows.

Troubleshooting​

Test says Cloudflare rejected the API token (400 or 401)

The token was rolled, deleted, expired, or is the Global API Key. Create an API token under My Profile > API Tokens and select Replace.

Test says Cloudflare did not accept the API token

The token exists but is disabled or outside its allowed time window or IP filter. Check its status and Client IP Address Filtering in My Profile > API Tokens.

Agents get 403 Authentication error on a zone

The token's Zone Resources do not include that zone, or it lacks the permission. Edit the token and add them.

Still stuck? Select Test and read the result: it names the value Cloudflare refused and the status it answered.

FAQ​

Which template should I use?

The one closest to what agents should do, for example Edit zone DNS for DNS changes or Edit Cloudflare Workers for deploys. Add only the zones agents need.

Does the token expire?

Only if you set a TTL when creating it. Jaah's Test fails once it has expired.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Cloudflare account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.