Cloudflare API

To get started using Cloudflare's products and services via the API, refer to how to interact with Cloudflare, which covers using tools like Terraform and the official SDKs to maintain your Cloudflare resources.

Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with API keys, but these keys have several limitations that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API.

To create an API token, from the Cloudflare dashboard, go to My Profile → API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our API fundamentals.

Totally new to Cloudflare? Start here.