# Invalidate CDN cache

`POST /workspaces/:workspace/distributions/:distribution_id/routes/:route_id/cache`

Invalidate CDN cache for a route

**Required Scopes:** `DISTRIBUTION_MANAGE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The ID of the distribution */
  distribution_id: number;
  /** The ID of the route */
  route_id: number;
}
```

## Query Parameters

```typescript
interface QueryParameters {
  /** Project name to filter distributions */
  project_name?: string; // Example: "my-project"
}
```

## Body Parameters

```typescript
interface BodyParameters {
  /** Purge all cached content for this route */
  purge_all?: boolean;
  /** List of paths to invalidate */
  purge_paths?: string[];
}
```

## Request Example

```bash
curl -X POST "https://api.buddy.works/workspaces/:workspace/distributions/:distribution_id/routes/:route_id/cache" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "purge_all": true
}'
```

## Response Example

**Status:** `204 Route cache invalidation triggered`


---
Original source: https://buddy.works/docs/api/distributions/routes/cache