---
title: "Delete a batch"
method: DELETE
path: "/api/batches"
tags: ["Batches"]
---

# Delete a batch

`DELETE /api/batches`

## Request

- Base URL: `https://api.imagelato.com`
- URL: `https://api.imagelato.com/api/batches`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`

Deletes a batch and every S3 object it produced. Identify it with either `?url=<encoded>` or `?_id=<batchId>`. Emits the `batch.deleted` webhook event. Requires the `batches:write` scope.

## Query parameters

- `_id` string
- `url` string

## Response `200`

The deleted batch

## Other responses

- `401`: Missing or invalid credentials
- `403`: API key is missing the `batches:write` scope
- `404`: Not found (or not owned by your organization)
- `429`: API key rate limit exceeded

---

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