---
title: "Purge Documents With External Id"
method: DELETE
path: "/api/v1/documents/external/{target_document_external_id}"
tags: ["Document"]
---

# Purge Documents With External Id

`DELETE /api/v1/documents/external/{target_document_external_id}`

## Request

- Base URL: `https://api.gemina.co` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gemina.co/api/v1/documents/external/{target_document_external_id}`
- Auth: API key in header `X-API-Key`

## Path parameters

- `target_document_external_id` string, required

## Response `200`

Successful Response

- DocumentPurgingResultOutDTO
  - `servedAt` string, date-time
  - `servedAtTimestamp` number
  - `createdAt` string, date-time, nullable
  - `createdAtTimestamp` number, nullable
  - `status` 'pending' | 'in_process' | 'failed' | 'success' | 'partial' | 'empty', required
  - `meta` DocumentMetaOutDTO, required
    - `externalId` string, nullable
    - `documentId` string, uuid, nullable
    - `userId` string, uuid, nullable
    - `endUserId` string, nullable
    - `apiKeyId` string, uuid, nullable
    - `filename` string, nullable
    - `fileSize` integer, nullable
    - `contentType` string, nullable
    - `documentFileType` 'pdf' | 'image' | 'other'
    - `numberOfPages` integer, nullable
    - `normalizedWidth` integer, nullable
    - `normalizedHeight` integer, nullable
    - `normalizedMegapixels` number, nullable
    - `storageLocation` 'israel' | 'europe' | 'united_states' | 'asia'
    - `imageUrl` string, uri, nullable
    - `thumbnailUrl` string, uri, nullable
    - `originalDocumentUrl` string, uri, nullable
  - `data` PurgedDocumentsDataOutDTO, required
    - `purgedIds` string[], required: List of IDs of the purged documents
  - `errors` object[]

## Other responses

- `404`: The resource does not exist, or is not visible to the caller. Ownership failures are deliberately indistinguishable from a missing resource.
- `422`: Request validation failed (`HTTPValidationError`), or the request was understood but cannot be applied — e.g. the extraction is under legal hold or did not complete successfully (`FoundationDTO`).

---

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