> ## Documentation Index > Fetch the complete documentation index at: https://bunny.net/docs/llms.txt > Use this file to discover all available pages before exploring further. # Scoped API Keys > Create API keys limited to specific permissions, resources, and IP addresses. A scoped API key gives a script, CI job, or integration access to the [bunny.net API](https://bunny.net/docs/api-reference.md) without handing over your whole account. You choose what the key can do, which resources it can touch, which IP addresses can use it, and when it expires. You can manage your scoped API keys at [Account > Scoped API keys](https://dash.bunny.net/account/scoped-api-keys). ![Scoped API keys](https://mintcdn.com/bunnynet-cb9733c2/Zv2Q61q4JL5ytQxo/images/accounts-and-billing/scoped-api-keys/scoped-api-keys.png?fit=max\&auto=format\&n=Zv2Q61q4JL5ytQxo\&q=85\&s=cbe69bd7725f850682c735af7eafa65c) ## Create a scoped API key **1. Start a new key** Go to [Account > Scoped API keys](https://dash.bunny.net/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. ![Scoped API key name, expiry, and allowed IPs](https://mintcdn.com/bunnynet-cb9733c2/Zv2Q61q4JL5ytQxo/images/accounts-and-billing/scoped-api-keys/scoped-api-key-name-expiry-ips.png?fit=max\&auto=format\&n=Zv2Q61q4JL5ytQxo\&q=85\&s=e691fb77da01fa16be8e54fd5cfc54c2) **3. Choose permissions** Under **Permissions**, add each product the key needs and select its permissions. Click a [preset](#use-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. ![Scoped API key permissions](https://mintcdn.com/bunnynet-cb9733c2/Zv2Q61q4JL5ytQxo/images/accounts-and-billing/scoped-api-keys/scoped-api-key-permissions.png?fit=max\&auto=format\&n=Zv2Q61q4JL5ytQxo\&q=85\&s=6ba86c4a3c4ae90dfac77f05b9361b37) 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. > [!WARNING] > > The key is shown only once. If you lose it, delete the key and create a new one. ## Permissions Each permission pairs a product with an action, such as `PullZone.Purge` or `DnsZone.Read`. The dashboard shows every product and action you can grant. The [API reference](https://bunny.net/docs/api-reference/scoped-api-keys.md#find-the-permission-an-endpoint-needs) 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](https://bunny.net/docs/api-reference/core/pull-zone/list-pull-zones.md), 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](https://bunny.net/docs/account/api-keys.md) on every endpoint that accepts scoped API keys. It still expires, and it still only works from the IP addresses you allow. > [!WARNING] > > Anyone with this key can manage and delete your resources. Use it only when the permissions above can't cover your use case. ## Manage your keys Click the menu next to a key to manage it. ![Scoped API key actions](https://mintcdn.com/bunnynet-cb9733c2/Zv2Q61q4JL5ytQxo/images/accounts-and-billing/scoped-api-keys/scoped-api-key-actions.png?fit=max\&auto=format\&n=Zv2Q61q4JL5ytQxo\&q=85\&s=6a8535c300f986971b6b4087f527a8e7) * **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. You can't change a key after you create it. To change what a key can do, create a new key and delete the old one. We email you when a key is created, when it's about to expire, and when it has expired. ## Team members [Team members](https://bunny.net/docs/account/team-management.md) can create scoped API keys too. A team member can only grant permissions for the products their own [team permissions](https://bunny.net/docs/account/team-management/permissions.md) cover, and can't turn on **Grant all permissions and resources**. ## Keep your keys safe Give each script or integration its own key with only the permissions it needs, and set the shortest expiry that works for you. Never share a key publicly or commit it to version control. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.