Skip to content
Latchkey

Bunny.net pull zone not found (404) in CI

Bunny.net could not find the pull zone: a 404 on a pull-zone operation means the zone id does not exist for the account the API key belongs to, usually a stale id, a typo, or a key for a different account.

What this error means

A GET/POST to /pullzone/{id} (or a per-zone purge) returns HTTP 404 Not Found. Account-wide calls with the same key succeed, so the key is valid but the id is wrong.

Bunny.net API
HTTP/1.1 404 Not Found
# request: POST https://api.bunny.net/pullzone/999999/purgeCache
# the pull zone id 999999 does not exist for this account

Common causes

The pull zone id is stale or misspelled

A hard-coded id no longer matches an existing zone (deleted, recreated, or a typo), so the endpoint returns 404.

The key belongs to a different account

The zone exists under one account, but the API key is for another, so it is not visible.

How to fix it

Resolve the id from the pull-zone list

  1. List pull zones and read the id for the zone name you deploy.
  2. Store that id as a secret or config value.
  3. Use it in the purge or update call.
Terminal
curl -sS "https://api.bunny.net/pullzone" -H "AccessKey: ${BUNNY_API_KEY}" \
  | jq '.[] | {Id, Name}'

Confirm the key and account match the zone

Ensure the API key belongs to the account that owns the zone before retrying.

Terminal
curl -s -o /dev/null -w '%{http_code}\n' \
  "https://api.bunny.net/pullzone/${ZONE_ID}" -H "AccessKey: ${BUNNY_API_KEY}"

How to prevent it

  • Source the pull zone id from the API or config, not a literal.
  • Keep the API key and zone in the same account.
  • Validate the id with a list call in a preflight step.

Frequently asked questions

What causes "Bunny.net pull zone not found"?
A hard-coded id no longer matches an existing zone (deleted, recreated, or a typo), so the endpoint returns 404.
How do I fix Bunny.net pull zone not found?
Resolve the id from the pull-zone list

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card