---
title: "Archive a batch"
method: POST
path: "/batches/{id}/archive"
tags: ["Batches"]
---

# Archive a batch

`POST /batches/{id}/archive`

## Request

- Base URL: `https://services.certseal.com/api/v1`
- URL: `https://services.certseal.com/api/v1/batches/{id}/archive`
- Auth: HTTP bearer

Soft-delete the batch. The row is preserved, every issued
certificate's public URL keeps resolving forever, and the rendered
PDF cache stays valid — but the batch is frozen: any future
recipient write (create / update / delete / send) returns
`409 BATCH_ARCHIVED` until you unarchive.

Idempotent: archiving an already-archived batch is a no-op that
returns the current row.

Hard delete is intentionally not exposed by the API. See
[docs/api.md](api.md) "Archiving batches" for the rationale.

## Path parameters

- `id` string, required

## Response `200`

The archived batch.

- object
  - `batch` Batch, required
    - `id` string, required
    - `workspaceId` string, required
    - `title` string, required
    - `description` string, nullable
    - `designId` string, required
    - `emailTemplateId` string, nullable
    - `courseName` string, nullable: Default `{{course_name}}` for recipients in this batch.
    - `issuerName` string, nullable: Default `{{issuer_name}}` for recipients in this batch.
    - `recipientCount` integer, required: Cached count of recipients in the batch.
    - `archivedAt` string, date-time, nullable, required: Soft-delete marker. `null` for active batches; set when the batch has been archived via `POST /batches/{id}/archive`. Archived batches still serve `GET /batches/{id}`, public certificate URLs, and certificate lookups — but every write endpoint (recipient create / update / delete / send) returns `409 BATCH_ARCHIVED` until the batch is unarchived.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `401`: Missing, malformed, expired, or revoked API key.
- `404`: The requested resource was not found in this workspace.
- `429`: Too many requests for this API key. Honour the `Retry-After` response header (seconds) or the `detail.retryAfter` field.

---

[API](https://skmtc.dev/certseal/apis/certseal-com-api.md) · [All operations](https://skmtc.dev/certseal/apis/certseal-com-api/llms.txt) · [OpenAPI document](https://skmtc.dev/certseal/apis/certseal-com-api/revisions/9097f49f49f5?raw)
