Is the API only available to Enterprise customers?

I’ve been using Cloudflare for years.

Recently I created a new website, and as I’m still developing, I sometimes want to purge certain files that seem “stickier” than others, usually CSS. (I haven’t set all the correct headers on the server yet)

I thought I’d make things easier for myself and have my internal scripts purge the CSS held in the cache when there’s a change, so that I don’t have to do it manually each time.

But when I tried using the API I got the following messages:

"message": "Only enterprise zones can purge by host."

or

"message": "Only enterprise zones can purge by prefix."

The last message confuses me. I can definitely purge by prefix through the website, so does this mean that I need to be an Enterprise customer to purge via the API?

I haven’t used the API at all so far. Is it only available to Enterpise customers?

Right, those two Custom Purges are Enterprise Only. Same with Tags. Non Enterprise can only Purge by URL, or Purge Everything via Dashboard or API. Yes, all plans can use the API.

3 Likes

So I was using the incorrect option.
The correct option was right above the one I was using.

https://api.cloudflare.com/#zone-purge-files-by-url

Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.