# Cancel Enrichment `POST https://api.getprospect.com/v2/enrichments/{id}/cancel` Cancels an enrichment that is not finished; credits already spent stay spent. A job already `completed`, `failed` or `cancelled` answers 409 `invalid_state`. Free; a `poll` (0 rate-limit units, per-second window only). ## Authentication Pass your API key in the `x-api-key` header. ## Path parameters - `id` (string, required): The enrichment id: the `id` that a create answers and `GET /v2/enrichments` lists. ## Example request ```bash curl --request POST \ --url https://api.getprospect.com/v2/enrichments/{id}/cancel \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Response 200 The job, `cancelled`. ```json { "success": true, "data": { "id": "6703f1c2a9e4b5d6c7f80931", "type": "people", "name": "Q4 webinar leads", "source": "api", "status": "cancelled", "stopped_reason": null, "options": { "enrich_email": true, "enrich_phone": false }, "progress": { "percent": 42, "done": 4200, "total": 10000 }, "counts": { "rows": 10000, "matched": 6100, "not_matched": 3700, "invalid": 200, "emails_found": 4300, "phones_found": 0 }, "credits_used": { "email": 3900, "phone": 0 }, "created_at": "2026-10-17T10:00:00.000Z", "started_at": "2026-10-17T10:00:00.000Z", "finished_at": "2026-10-17T10:04:00.000Z", "results_expires_at": "2026-11-16T10:04:00.000Z", "links": { "self": "/v2/enrichments/6703f1c2a9e4b5d6c7f80931", "job": "/v2/jobs/6703f1c2a9e4b5d6c7f80931", "results": null, "csv": null, "jsonl": null } }, "metadata": { "timestamp": "2026-10-05T09:00:00.000Z" } } ``` ## Response 400 Malformed id (`VALIDATION_ERROR`). ```json { "success": false, "data": null, "metadata": { "timestamp": "2026-10-05T09:00:00.000Z" }, "errors": [ { "name": "VALIDATION_ERROR", "message": "\"42\" is not a valid id." } ] } ``` ## Response 401 Missing, unknown or inactive credentials (`UNAUTHORIZED`). ## Response 404 No enrichment with this id in the workspace (`NOT_FOUND`). ## Response 409 The job is already finished (`CONFLICT`, `invalid_state`; `payload.status` names its state). ```json { "success": false, "data": null, "metadata": { "timestamp": "2026-10-05T09:00:00.000Z" }, "errors": [ { "name": "CONFLICT", "message": "The job is already completed.", "payload": { "code": "invalid_state", "status": "completed" } } ] } ``` ## Response 429 Over the `poll` rate limit (`RATE_LIMIT`); wait `Retry-After` seconds. Sent only where rate limits are enforced for the caller channel. ## Response 500 Unexpected server error.