Invalidate CDN cache

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

Invalidate CDN cache for a route

Request

REQUIRED SCOPES
DISTRIBUTION_MANAGE
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

distribution_idrequiredinteger
The ID of the distribution
route_idrequiredinteger
The ID of the route
GET PARAMETERS
project_namestring
Project name to filter distributions

Example: "my-project"

BODY PARAMETERS
purge_allboolean
Purge all cached content for this route
purge_pathsstring[]
List of paths to invalidate

Last modified on Jul 7, 2026

Examples

Example: Purge entire route cache

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 }'

Example: Purge specific paths

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": false, "purge_paths": [ "/index.html", "/assets/*" ] }'
STATUS
204 Route cache invalidation triggered