# Validate a site — CacheBoost API

> Trigger an ownership check and mark the site as validated.

Source: https://www.cache-boost.com/support/api-reference/sites/validate.md
Language: en

---



Triggers an ownership check for a site. CacheBoost makes an HTTP request to the site and looks for the validation token. The check is synchronous — the result is returned immediately.

**`POST /v1/sites/{id}/validate`** — Scope: `sites:write`

CacheBoost tries two methods (HTTPS then HTTP):
1. **HTML file** — `{validation_token}.html` must be accessible at the site root and return HTTP 200.
2. **Meta tag** — the homepage must contain `<meta name="cacheboost-token" content="{validation_token}">` in `<head>`.

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

## Example request

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

## Responses

`200` — Validation succeeded:
```json
{ "validated": true }
```

`200` — Already validated:
```json
{ "validated": true, "already_validated": true }
```

`422` — Token not found:
```json
{ "validated": false, "error": "Validation token not found on the site." }
```

## Errors

| Code | Description |
|------|-------------|
| `401` | Missing or invalid API key |
| `403` | Insufficient scope (`sites:write` required) |
| `404` | Site not found |
| `422` | Validation token not found on the site |



---

**CacheBoost** — Automatic cache warming for faster websites.

- Website: https://www.cache-boost.com
- Full content (all pages): https://www.cache-boost.com/llms-full.txt
- LLM index: https://www.cache-boost.com/llms.txt
- Documentation: https://www.cache-boost.com/support/getting-started/introduction
- Start free: https://www.cache-boost.com/try
