
Create a scoped API key
1
Start a new key
Go to Account > Scoped API keys and click Create API Key.
2
Name the key and set its limits
- API key name: A name that tells you where the key is used, such as
purge-from-ci. - Expires: Pick 30 d, 90 d, or 1 y, or choose a custom date. The key stops working after this date.
- Allowed IPs: Add the IPv4 or IPv6 addresses or CIDR blocks that can use the key. Leave the list empty to allow any IP address.

3
Choose permissions
Under Permissions, add each product the key needs and select its permissions. Click a preset to fill in a common combination.For each product, choose All to allow every resource, or Selected to limit the key to specific resources.
The key can’t reach products you don’t add, or products with no permission selected.

4
Copy your key
Click Create API Key, then copy the key and store it somewhere safe.
Permissions
Each permission pairs a product with an action, such asPullZone.Purge or DnsZone.Read. The dashboard shows every product and action you can grant. The API reference lists the permissions each endpoint accepts.
Use a preset
Presets select the permissions for common uses, such as purging the cache or deploying a static site from CI. Click a preset to fill in its permissions, then review the products and permissions it selected under Permissions, and add or remove any before you create the key. A preset replaces any permissions you’ve already selected, and it doesn’t limit the key to specific resources by default.Limit a key to specific resources
Choose Selected for a product to limit the key to the resources you pick, such as a single pull zone. Leave the list empty to allow all resources of that product. Some actions always apply to all resources of a product, such as creating a resource or listing every resource. A key limited to selected pull zones can’t call List Pull Zones, but it can still fetch each of those pull zones by ID.Grant all permissions and resources
Turn on Grant all permissions and resources to skip permission and resource checks. The key then works like your account API key on every endpoint that accepts scoped API keys. It still expires, and it still only works from the IP addresses you allow.Manage your keys
Click the menu next to a key to manage it.
- Details: See the key’s permissions, resources, allowed IPs, and expiry date.
- Clone: Create a new key with the same permissions, resources, and allowed IPs. You choose a new name and expiry date.
- Delete: Revoke the key. Any application using it stops working immediately.