# Créer un boost — API CacheBoost

> Créer une nouvelle campagne de préchauffage de cache.

Source: https://www.cache-boost.com/fr/support/api-reference/boosts/create.md
Language: fr

---



Create a new cache warming campaign.

**`POST /v1/boosts`** — Scope: `boosts:write`

## Body parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Required | Display name for the boost. |
| `site_id` | integer | Required | ID of the site to warm. |
| `source_type` | string | Required | `sitemap` or `csv`. |
| `region` | array | Required | Target regions: `fr`, `us`, `eu`, `as`. |
| `sitemap_ids` | array | Optional | IDs of sitemaps to warm (required when `source_type` is `sitemap`). |
| `source_url` | string | Optional | CSV file URL (required when `source_type` is `csv`). |
| `url_root` | string | Optional | Only warm URLs starting with this path. Default: `/`. |
| `exclude_ext` | array | Optional | File extensions to skip (e.g. `jpg`, `png`, `css`, `js`). |
| `variations` | object | Optional | `user_agents` (mobile, desktop, bot, ai_crawler) and `languages`. Each combination counts as one call per URL. |
| `schedule` | string | Optional | Cron expression (UTC) for automatic scheduling. |
| `call_limit` | integer | Optional | Maximum number of calls for this boost. |
| `ignore_errors` | boolean | Optional | If `true`, the boost will not auto-pause on high error rates. Default: `false`. |
| `report_email_enabled` | boolean | Optional | Send an email report when a run completes. Default: `true`. |

## Example request

```bash
curl -X POST https://api.cache-boost.com/v1/boosts \
  -H "Authorization: Bearer cb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Daily warm", "site_id": 42, "source_type": "sitemap", "region": ["fr"], "sitemap_ids": [7], "schedule": "0 1 * * *"}'
```

## Response

`201 Created` — full boost object.

```json
{
  "id": 15,
  "site_id": 42,
  "name": "Daily warm",
  "status": "pending",
  "source_type": "sitemap",
  "region": ["fr"],
  "sitemap_ids": [7],
  "schedule": "0 1 * * *",
  "next_run_at": "2025-01-16T01:00:00Z",
  "created_at": "2025-01-15T10:30:00Z"
}
```

## Errors

| Code | Description |
|------|-------------|
| `401` | Missing or invalid API key |
| `403` | Insufficient scope or access denied |
| `404` | Site or sitemap not found |
| `422` | Validation error — missing or invalid fields |



---

**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
