---
title: "Purge cache"
method: POST
path: "/v1/files/purge"
tags: ["Caching"]
---

# Purge cache

`POST /v1/files/purge`

This API will purge CDN cache and ImageKit.io's internal cache for a file.  Note: Purge cache is an asynchronous process and it may take some time to reflect the changes.

## Request body

- object
  - `url` string, uri, required — The full URL of the file to be purged.

## Response `201`

Purge request submitted successfully. A `requestId` will be returned.

- object
  - `requestId` string — Unique identifier of the purge request. This can be used to check the status of the purge request.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized request.
- `403` — Forbidden.
- `429` — The request exceeded the rate limit. Contains headers indicating the limits and a message detailing the error.

---

[API](https://skmtc.dev/imagekit-developer/apis/imagekit-api.md) · [All operations](https://skmtc.dev/imagekit-developer/apis/imagekit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imagekit-developer/imagekit-api/revisions/bb3e9ff84b3e/schema)
