---
title: "Cancel an AI tracking run"
method: POST
path: "/projects/{project_id}/ai-tracking/runs/{run_id}/cancel"
tags: ["ai-tracking"]
---

# Cancel an AI tracking run

`POST /projects/{project_id}/ai-tracking/runs/{run_id}/cancel`

## Request

- Base URL: `https://eu.bisibility.com/api/v1`
- URL: `https://eu.bisibility.com/api/v1/projects/{project_id}/ai-tracking/runs/{run_id}/cancel`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `/api/auth/oauth2/authorize`, token URL `/api/auth/oauth2/token`, scopes: `api:write`)

## Path parameters

- `project_id` string, required: Public project ID; membership and token scope are enforced.
- `run_id` string, required: Public tracking run ID scoped to this project.

## Headers

- `Bisibility-API-Version` 'v1'
- `Idempotency-Key` string
- `X-Bisibility-Source` 'sdk' | 'cli' | 'mcp'

## Request body

- object

## Response `200`

Project-scoped tracking data with retained provenance and explicit unknown measurements.

- object
  - `data` AiTrackingRun, required
    - `id` string, required
    - `state` 'planned' | 'running' | 'completed' | 'partial' | 'blocked' | 'failed' | 'cancelled' | 'skipped', required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `finished_at` string, date-time, nullable, required
    - `planned_at` string, date-time, nullable, required
    - `sample_count` integer, nullable, required

## Other responses

- `400`: Invalid input or cursor
- `401`: Authentication required
- `403`: Project membership or credential scope denied
- `404`: Project-scoped resource not found
- `409`: Idempotency key payload or state conflict; Unsupported API version
- `422`: Unsupported source, model, consent or cost policy
- `423`: Project is read-only
- `429`: Rate limited

## Changes

- **2026-10-19** `a6e1ec0dec82`: 1 breaking, 8 info
  - removed the media type `application/json` for the response with the status `409`
  - the endpoint scheme security `AppOAuth` was added to the API
  - media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `400`
  - media type `application/json` was changed to a more specific media type `application/problem+json` for the response status `401`
  - …5 more

[Operation history](https://skmtc.dev/bisibility/apis/bisibility-public-api/changes/projects/:project_id/ai-tracking/runs/:run_id/cancel/post.md)

---

[API](https://skmtc.dev/bisibility/apis/bisibility-public-api.md) · [All operations](https://skmtc.dev/bisibility/apis/bisibility-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bisibility/apis/bisibility-public-api/revisions/a6e1ec0dec82?raw)
