---
title: Clear the web cache corresponding to the Environment.
url: https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/operations/apps_clearcache/
image: https://developers.wpengine.com/og/docs/headless-platform/reference/api/endpoints/operations/apps_clearcache.png
---

# Clear the web cache corresponding to the Environment.

POST

/v1/accounts/{account}/apps/{app}/environments/{environment}:clearCache

Select code sample

```sh
curl --request POST \
  --url https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example:clearCache \
  --header 'Authorization: Basic <credentials>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

-

## Authorizations

- **[basicAuth](https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/#basicauth)**

## Parameters

### Path Parameters

**account**

required

string

Name of your WP Engine Headless Platform account

**app**

required

string

Name of your Headless Platform application

**environment**

required

string

ID of your environment

## Request Body

Media typeapplication/json

Request to purge the cache of an Environment.

object

### Example generated

```json
{}
```

## Responses

### 200

A successful response.

Media typeapplication/json

Response acknowledging a request to purge cache of an Environment.

object

#### Example generated

```json
{}
```

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
