Use this flow for W3 Total Cache and custom integrations. Send authenticated JSON POST requests instead of direct PHP bridge calls.
X-Help4-Api-Key + X-Help4-Api-Secret
Authorization: Bearer <token>
For the full domain, plugin, credential, and deployment workflow, read the Enterprise CDN setup guide.
Endpoint: POST /wp-json/help4-cdn/v1/cache/refresh
curl -sS -X POST "https://example.com/wp-json/help4-cdn/v1/cache/refresh" \
-H "Content-Type: application/json" \
-H "X-Help4-Api-Key: YOUR_HELP4_KEY" \
-H "X-Help4-Api-Secret: YOUR_HELP4_SECRET" \
-d '{
"scope": "paths",
"paths": ["/", "/wp-content/uploads/logo.png"],
"reason": "deploy",
"source": "w3tc-webhook"
}'
Domain-wide clear:
{
"scope": "domain",
"clearAll": true,
"reason": "theme-update",
"source": "custom-deploy"
}
Endpoint: POST /v1/sites/{siteId}/purge
curl -sS -X POST "https://control.help4.net/v1/sites/site_abc123/purge" \
-H "Content-Type: application/json" \
-H "X-Help4-Api-Key: YOUR_HELP4_KEY" \
-H "X-Help4-Api-Secret: YOUR_HELP4_SECRET" \
-d '{
"scope": "paths",
"paths": ["/blog/"],
"reason": "content-update",
"requestContext": { "source": "w3tc-integration" }
}'