For the complete documentation index, see llms.txt. This page is also available as Markdown.

Clear website cache

Permanently clears all server-side cache for the website at once.

Clear website cache

delete

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: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Query parameters
directorystringOptional

Directory of the website installation to clear, relative to the website root. Defaults to the website root.

Example: blog
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
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?