Features Pricing Regions Support Start free Log in FR

Validate site ownership

Triggers an ownership check for a site. CacheBoost makes an HTTP request to the site and looks for the validation token.

POST /v1/sites/{id}/validate

Requires scope: sites:write

The check is synchronous — the result is returned immediately. CacheBoost tries two methods, in order, over HTTPS then HTTP:

  1. HTML file — a file named {validation_token}.html must be accessible at the root of the site and return HTTP 200.
  2. Meta tag — the homepage must contain <meta name="cacheboost-token" content="{validation_token}"> in its <head>.

The validation_token is returned when creating a site (POST /v1/sites) and also via GET /v1/sites/{id}.

Path parameters

ParameterTypeDescription
idintegerSite ID.

Example request

curl -X POST https://api.cache-boost.com/v1/sites/42/validate \
  -H "Authorization: Bearer cb_live_YOUR_KEY"

Responses

200 — Validation succeeded

{ "validated": true }

200 — Already validated

{ "validated": true, "already_validated": true }

422 — Token not found

{
  "validated": false,
  "error": "Validation token not found on the site."
}

Errors

CodeDescription
401Missing or invalid API key.
403Insufficient scope (sites:write required).
404Site not found or not accessible with this key.
422Validation token not found on the site.