Skip to main content

Delete Document Files

Endpoint​

DELETE https://api.verifik.co/v2/document-validations/{id}/files

Permanently removes document front and back image files from storage for a single validation record. The verification metadata, status, and scores are preserved for billing and reporting.

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Path Parameters​

NameTypeRequiredDescription
idstringYesThe unique identifier of the document validation record

Request​

const fetch = require("node-fetch");

async function eraseFiles() {
const docId = "6add0c680b29eb28766c82ce";
const res = await fetch(`https://api.verifik.co/v2/document-validations/${docId}/files`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
"Content-Type": "application/json",
},
});
console.log(await res.json());
}

eraseFiles();

Response​

{
"data": {
"_id": "6add0c680b29eb28766c82ce",
"status": "ACTIVE_BUT_UNVERIFIED",
"documentType": "CC",
"files": [],
"url": null,
"backUrl": null,
"hasFrontImage": false,
"hasBackImage": false,
"retention": {
"purgedAt": "2026-10-26T22:30:00.000Z",
"purgeReason": "manual_delete"
}
}
}