# Build or rebuild the context's index from its sources

`POST /contexts/{slug}/curate`

:::code-group
```bash title="cURL"
curl --request POST \
  --url https://{host}/api/contexts/{slug}/curate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "force": true,
  "batch_size": 123,
  "scope": "<string>",
  "trigger": "<string>",
  "model": "<string>",
  "pinecone_api_key": "<string>"
}'
```

```json title="200"
{
  "task_id": "<string>",
  "state": "<string>",
  "exploring": true,
  "profiling": true,
  "importing": true
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Path Parameters

- `slug` (path, string, required) — Context slug or UUID.

## Headers

- `X-Pinecone-Api-Version` (header, string) — Date-based contract version, echoed back on the same header. Omit for the default (`2026-07`); send `unstable` for the in-development surface. An unrecognized value is rejected with `400 unsupported_api_version`.

## Body

- `force` (body, boolean) — Full rebuild rather than incremental
- `batch_size` (body, integer) — How many sources curate reads per pass.
- `scope` (body, string) — Curate scope recorded on the task input
- `trigger` (body, string) — Provenance label recorded on the task input
- `model` (body, string) — Model-id override for the curate runtime
- `pinecone_api_key` (body, string) — Task-token override; normally not needed

## Response

- `200` — Curate enqueued (`state: importing`)
- `400` — Context is a work context
- `404` — Not found
- `409` — Context has no sources, is optimizing, or hit the preview task cap

## Related pages

- [Get the curation ledger](./data-plane-curation-get-the-curation-ledger.md)
- [Drop named sources from the index + ledger](./data-plane-curation-drop-named-sources-from-the-index-ledger.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
