Official Omarchy plugin · Super+Shift+L
⌘
← all posts
cloudflare account idwhere is cloudflare account idcloudflare zone idwhere to find cloudflare zone idcloudflare api tokencloudflare global api keycloudflare account api tokenwrangler account id

Where is the Cloudflare Account ID? Zone ID and API token too

Account ID: ⌘K → "Copy account ID" in the dashboard. Zone ID: domain Overview → API section. API tokens: dash.cloudflare.com/profile/api-tokens. The three values Wrangler, Terraform and CI ask for.

by team·Nov 19, 2026·3 min read

Short answers:

  • Account ID: in the Cloudflare dashboard, press ⌘K / Ctrl+K, type Copy account ID, and hit Enter.
  • Zone ID: Domains → your domain → Overview → API section → copy Zone ID.
  • API token: dash.cloudflare.com/profile/api-tokens for your own tokens, or Manage Account → API Tokens for account-owned ones.

That's usually all you need. The rest of this post covers which value goes where, so you don't paste the wrong one.

Account ID or Zone ID: which one does your tool want?

Cloudflare has two levels, and most setup errors come from mixing them up.

  • Account ID = your whole Cloudflare account. Wrangler, Workers, Pages, R2, D1, KV and most account-level API calls want this.
  • Zone ID = one domain on that account. DNS records, cache purges, zone settings and Terraform's cloudflare_record want this.

Both are 32-character hex strings, so they look the same at a glance. If you get a "not found" or auth error for something you know exists, check that you didn't swap them.

Other places to find the Account ID

Per Cloudflare's docs, besides ⌘K:

  • Any domain's Overview page, in the API section (it shows both IDs).
  • Workers & Pages → Account details.

If you belong to more than one Cloudflare account, check the account switcher before copying. Each account has its own ID.

Finding the Zone ID

  1. Go to Domains.
  2. Click your domain.
  3. On Overview, scroll to API.
  4. Copy Zone ID.

Every domain has its own Zone ID. Two domains on one account means two Zone IDs and one Account ID.

Which kind of API token to create

Cloudflare has two kinds:

  • User tokens (My Profile → API Tokens) belong to you. If you lose access to the account, they can stop working.
  • Account tokens (Manage Account → API Tokens) belong to the account, not a person. They're a good fit for CI/CD and shared infrastructure, where the endpoints you need support them.

Token checklist

  • Start from a template, like "Edit Cloudflare Workers" or "Edit zone DNS"
  • Limit it to the specific account and zones it needs
  • Optionally restrict client IPs and set an expiry date
  • Copy it right away, because Cloudflare only shows it once
  • Store it as a secret, never in your repo

Then use it as a Bearer token:

curl "https://api.cloudflare.com/client/v4/zones?account.id=$CLOUDFLARE_ACCOUNT_ID" \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

What about the Global API Key?

Lower on the same My Profile → API Tokens page is the Global API Key. It's the old-style credential: one key with full access to everything your user can do, used with your account email. Some old tutorials and plugins still ask for it. Use a scoped token for anything new. If a tool insists on the Global API Key, ask yourself whether you'd trust it with your entire account.

Where each value goes

  • Wrangler: account_id = "<Account ID>" in wrangler.toml or wrangler.jsonc. In CI, set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID as environment variables.
  • Terraform: a token for auth, plus the Account ID and Zone ID on the resources that need them.
  • GitHub Actions: the token as a secret, the Account ID as a secret or variable.
  • Third-party tools (DNS updaters, deploy tools): usually a scoped token plus the Zone ID of the domain they manage.

Skip the hunt next time

The Cloudflare dashboard is huge, and the page you need is always a few clicks deep. That's the problem devlinkspad exists for. It keeps the direct links (API Tokens, Workers, R2, Pages, docs and status) one keystroke away, alongside the same pages for Stripe, Vercel, Supabase and 140+ other tools.

Open Cloudflare in devlinkspad → Free in the browser, as a Chrome extension, and as an Omarchy plugin.

Press ⌘K. Every dashboard, one keystroke away.