---
title: "Cancel every active investigation of an agent"
method: POST
path: "/v1/agents/{id}/investigations/cancel-all"
tags: ["Agents"]
---

# Cancel every active investigation of an agent

`POST /v1/agents/{id}/investigations/cancel-all`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/agents/{id}/investigations/cancel-all`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Marks every queued, running, and paused investigation of the agent as CANCELLING in one request. Cancellation is completed asynchronously. With pause=true, the agent is paused in the same transaction so it starts no new investigations.

## Path parameters

- `id` string, required

## Query parameters

- `pause` boolean

## Response `202`

Cancellation requests recorded

- CancelAllInvestigationsResponse
  - `cancelling` integer, required
  - `paused` integer, required

## Other responses

- `401`: Unauthorized
- `404`: Agent not found

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
