# Cancel a search under way

Ends a searching run as cancelled and asks its browser run to stop. Matches it already found stay. Only a run that is searching can be cancelled. Requires authentication.

```http
POST https://hiresweep.com/api/openapi/discovery/runs/{id}/cancel
x-api-key: YOUR_API_KEY
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes |  |

## Request body

```json
{
  "type": "object",
  "properties": {
    "clientId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "description": "The client whose data this is, for an operator applying on behalf of clients. Omit for your own."
    }
  }
}
```

## Responses

- `200`: The run, cancelled.
