With the Cloudflare integration, you can send a request to a Cloudflare zone to invalidate asset caches before or after a deployment.

To set up a new integration, click the **Integration** link on the left hand side of your project, then the **New Integration** button to get started.

{screenshot: 193}

Choose Cloudflare in the service picker, then enter the appropriate **Zone ID** and **Asset URL Prefix** - the URL that should be prefixed to any asset paths from the source repository (such as www.example.org). 

For authentication, you have two options:

**Option 1 (Recommended): API Token**
Enter your **API Token** - this is the more secure method as tokens can be scoped to specific zones and permissions. You can create an API token in the Cloudflare dashboard under "My Profile" > "API Tokens".

**Option 2 (Legacy): Global API Key**
Enter your **Email Address** and **Global API Key**. Note: This method is less secure as it provides full account access.

Then check the **Purge Everything** option if you want to clear the cache for the zone on every deployment. Otherwise, DeployHQ will just send a request to invalidate only the files that we changed in the deployment.

{screenshot: 275}

Choose when to trigger the integration, and choose any servers you wish to trigger it for for, or keep the **Trigger integration when any server or group deployed?** option checked if you want to trigger for all servers.

{screenshot: 277}

Finally, click **Create Integration** to finish.