> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.kinsta.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress CDN

[Kinsta's premium CDN](https://kinsta.com/docs/wordpress-hosting/wordpress-cdn/kinsta-cdn) powered by Cloudflare helps to maximize the performance of your site. With the `cdn` endpoint you can:

* Clear the CDN cache for your sites.
* Change the [image optimization settings](https://kinsta.com/docs/wordpress-hosting/wordpress-cdn/kinsta-cdn/#image-optimization-1).

You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) endpoint.

The `environment_id` is also shown after the `site_id` in the URL in MyKinsta when you access the environment, for example in the URL `https://my.kinsta.com/sites/details/fbab4927-e354-4044-b226-29ac0fbd20ca/c84ce214-69b9-4a32-8e67-880672cf1d38?idCompany=bdd25d71-5706-4890-870f-1adda17c505d`:

* The `site_id` is `fbab4927-e354-4044-b226-29ac0fbd20ca`
* The `environment_id` is `c84ce214-69b9-4a32-8e67-880672cf1d38`
* The `company_id` is `bdd25d71-5706-4890-870f-1adda17c505d`

You can obtain the `cdn_cache_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) endpoint.

The CDN endpoints may trigger **longer tasks** (from a few seconds to around a minute) on your environments. This is why they provide `202 Accepted` response, with an [`operation_id`](https://api-docs.kinsta.com/tag/Operations) in the body. To check the progress, you can use the `/operations` endpoint.
