---
title: "Creates a CDN cache purge request"
method: POST
path: "/environments/{environmentId}/actions/purge-cdn"
tags: ["CDNs"]
---

# Creates a CDN cache purge request

`POST /environments/{environmentId}/actions/purge-cdn`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/environments/{environmentId}/actions/purge-cdn`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/environments/:environmentId/actions/purge-cdn/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a request to purge cached content from the CDN for the specified environment.

**Resource Types** (specified in the request body):
- `urls` - Purge specific URLs
- `tags` - Purge by cache tags
- `domains` - Purge entire domains
- `everything` - Purge all content in the environment

## Path parameters

- `environmentId` string, required

## Request body

- object
  - `resource_type` 'tags' | 'urls' | 'domains' | 'everything', required: The type of resource to purge.
  - `values` string[]: List of values to purge based on the resource type. Required when `resource_type` is not `everything`.

## Response `202`

Accepted - Purge request submitted

- object
  - `_links` object, required: HAL links for the resource
    - `self` CDNAPIHalLink, required: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
  - `_embedded` object: Embedded resources (optional)
  - `message` 'The purge request has been submitted.', required: Confirmation message

## Other responses

- `400`: Validation Error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api.md) - [All operations](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/revisions/508f8f94456d?raw)
