---
title: "Discard Batch Endpoint"
method: POST
path: "/api/v1/file-folders/{folder_id}/batches/{batch_key}:discard"
tags: ["file-folders"]
---

# Discard Batch Endpoint

`POST /api/v1/file-folders/{folder_id}/batches/{batch_key}:discard`

Delete every member row of ``batch_key`` (collection parquet untouched).

Takes the same transaction-scoped advisory lock as ``:force-merge`` and the
automatic seal, keyed on the collection id, BEFORE deleting anything — a
concurrent seal that already loaded these members (pre-lock) would
otherwise re-upload them into the collection right after we discard them,
orphaning the write. If the discarded batch is the currently-sealed one,
the folder's ``sealed_batch_key`` done-marker is cleared in the same
transaction so a later delivery resolving to this key isn't silently
skipped as "already sealed".

## Path parameters

- `folder_id` string, uuid, required
- `batch_key` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/netter/apis/dmi-backend.md) · [All operations](https://skmtc.dev/netter/apis/dmi-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netter/dmi-backend/revisions/307ede8c429b/schema)
