Clear website cache
Permanently clears all server-side cache for the website at once.
Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes.
Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldQuery parameters
directorystringOptionalExample:
Directory of the website installation to clear, relative to the website root. Defaults to the website root.
blogResponses
200
Success empty response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
500
Error response
application/json
delete/api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear
DELETE /api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "Request accepted"
}Last updated
Was this helpful?