> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Deletion Certificate

> Retrieve one deletion certificate with its signed XML document and signature

*Rate limit tier: **general**, 600 requests/min. See [Rate limits](https://docs.anyformat.ai/api-reference-v3/introduction.md#rate-limits).*

> [!NOTE]
>
> Available to organizations with **zero data retention** only. Any other organization gets `403` with `error_code: ZERO_DATA_RETENTION_REQUIRED`.

Returns one [deletion certificate](https://docs.anyformat.ai/api-reference-v3/deletion-certificates/overview.md) with its signed XML document. The document and its detached signature are base64, so the bytes the signature covers arrive unchanged; see [Verifying a certificate](https://docs.anyformat.ai/api-reference-v3/deletion-certificates/overview.md#verifying-a-certificate). All four signature fields are `null` until the certificate is signed.

Take the id from [List Deletion Certificates](https://docs.anyformat.ai/api-reference-v3/deletion-certificates/list.md). An unknown id, or another organization's certificate, answers `404` with `error_code: NOT_FOUND`.

```bash curl theme={null}
curl -X GET 'https://api.anyformat.ai/v3/deletion-certificates/069dcc2c-e14c-7606-8000-2ee4fb17b4f0/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

```python Python (SDK) theme={null}
from pathlib import Path

from anyformat.sdk import Client

client = Client(api_key="YOUR_API_KEY")

certificate = client.get_deletion_certificate("069dcc2c-e14c-7606-8000-2ee4fb17b4f0")
if certificate.document is not None:
    Path("certificate.xml").write_bytes(certificate.document)
    Path("certificate.sig").write_bytes(certificate.signature)
```

```typescript TypeScript (SDK) theme={null}
import { writeFileSync } from "node:fs";
import { Anyformat } from "@anyformat/sdk";

const af = new Anyformat({ apiKey: "YOUR_API_KEY" });

const certificate = await af.getDeletionCertificate("069dcc2c-e14c-7606-8000-2ee4fb17b4f0");
if (certificate.document_base64 && certificate.signature_base64) {
  writeFileSync("certificate.xml", Buffer.from(certificate.document_base64, "base64"));
  writeFileSync("certificate.sig", Buffer.from(certificate.signature_base64, "base64"));
}
```

```json Response (200 OK) theme={null}
{
  "id": "069dcc2c-e14c-7606-8000-2ee4fb17b4f0",
  "workflow_id": "0686bb97-8c30-70f0-8000-97669e000eb8",
  "document_packet_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
  "deletion_kind": "packet",
  "status": "final",
  "assurance": "destroyed",
  "files": [
    { "id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e2", "filename": "invoice-0042.pdf", "created_at": "2026-10-01T09:00:00Z" }
  ],
  "requested_at": "2026-10-02T09:00:00Z",
  "forgotten_at": "2026-10-03T09:00:00Z",
  "issued_at": "2026-10-03T09:00:00Z",
  "finalized_at": "2026-10-03T09:05:00Z",
  "signed_at": "2026-10-03T09:10:00Z",
  "document_base64": "PD94bWwgdmVyc2lvbj0iMS4wIj8+...",
  "signature_base64": "MEUCIQDx...",
  "document_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "signing_key_id": "arn:aws:kms:eu-west-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.