---
title: "Delete a batch"
method: DELETE
path: "/batch/{batch_id}"
tags: ["Batches"]
---

# Delete a batch

`DELETE /batch/{batch_id}`

## Request

- Base URL: `https://api.context.dev/v1`
- URL: `https://api.context.dev/v1/batch/{batch_id}`
- Auth: HTTP bearer

Permanently delete a finished batch and its results. Its webhook deliveries can no longer be retried.

## Path parameters

- `batch_id` string, required: Batch ID.

## Response `200`

Batch and its stored results are permanently deleted.

- object
  - `id` string: ID of the deleted batch.
  - `deleted` boolean: Always true on success.
  - `key_metadata` KeyMetadata: Credits this request used and your remaining balance.
    - `credits_consumed` integer, required: Credits charged for this request.
    - `credits_remaining` integer, required: Credits remaining for your organization.
  - `request_id` string, uuid, required: Unique ID of this request, also in `X-Request-Id`. Include it when contacting support.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: API key permissions or organization settings do not allow this request.
- `404`: Not found
- `409`: Batch is active or still settling (`BATCH_NOT_COMPLETED`). Cancel it, wait for a final status, then retry.
- `429`: Rate limit exceeded. Organization concurrency rejections include structured error_data and subscription settings; follow Retry-After before retrying.

## Changes

- **2026-10-21** `61627728926b`: 5 warning
  - added the new `NO_PUBLISHED_MARKDOWN` enum value to the `error_code` response property for the response status `400`
  - added the new `NO_PUBLISHED_MARKDOWN` enum value to the `error_code` response property for the response status `401`
  - added the new `NO_PUBLISHED_MARKDOWN` enum value to the `error_code` response property for the response status `403`
  - added the new `NO_PUBLISHED_MARKDOWN` enum value to the `error_code` response property for the response status `404`
  - …1 more
- **2026-10-19** `4ddcf49b9fe5`: 6 info
  - added the optional property `error_data` to the response with the `400` status
  - added the optional property `error_data` to the response with the `401` status
  - added the optional property `error_data` to the response with the `403` status
  - added the optional property `error_data` to the response with the `404` status
  - …2 more
- **2026-10-16** `2125f3e94e52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context/apis/brand-api/changes/batch/:batch_id/delete.md)

---

[API](https://skmtc.dev/context/apis/brand-api.md) · [All operations](https://skmtc.dev/context/apis/brand-api/llms.txt) · [OpenAPI document](https://skmtc.dev/context/apis/brand-api/revisions/9e2ab7841fb1?raw)
