---
title: "Stop a bulk change between batches"
method: POST
path: "/api/v1/agent/tasks/{id}/cancel"
tags: ["Agent"]
---

# Stop a bulk change between batches

`POST /api/v1/agent/tasks/{id}/cancel`

## Request

- Base URL: `https://api.flexiple.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flexiple.com/api/v1/agent/tasks/{id}/cancel`
- Auth: HTTP bearer

The batch in flight finishes; the run then reports what it did. A finished run is left as it is.

## Response `200`

The run, stopped

- object
  - `data` AgentTask, required
    - `id` integer, required
    - `operation` 'reject' | 'move' | 'shortlist' | 'restore' | 'add_tag' | 'remove_tag' | 'rescore', required
    - `status` 'queued' | 'running' | 'done' | 'failed' | 'cancelled', required
    - `total` integer, required
    - `job_post_id` integer, required
    - `finished_at` string, nullable, required
    - `done` integer, required
    - `failed` integer, required
    - `skipped` integer, required
    - `failures` object[], required
      - `name` string, required
      - `error` string, required
  - `meta` object, nullable

---

[API](https://skmtc.dev/flexiple/apis/flexiple-platform-api-v1.md) - [All operations](https://skmtc.dev/flexiple/apis/flexiple-platform-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/flexiple/apis/flexiple-platform-api-v1/revisions/27e7987859f2?raw)
