Skip to main content

Update Project Retention Policy

Endpoint​

PUT https://api.verifik.co/v2/projects/{id}/data-retention

Configures a project-level data retention override. When saved, enrollments and validations conducted under this project will honor these settings instead of account defaults.

[!NOTE] Lower-level overrides cannot loosen strict compliance settings set at the account level (e.g. if an account is configured for none, a project cannot switch back to store).

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Path Parameters​

NameTypeRequiredDescription
idstringYesThe unique identifier of the project

Request Body​

NameTypeRequiredDescription
modestringNoOverride storage mode (store, ephemeral, none)
typesobjectNoGranular settings for documentImages, faceImages, ocrExtraction, and documentLiveness
webhookHoldHoursnumberNoWebhook hold duration (24 to 72 hours)
allowManualDeletebooleanNoWhether manual erasure routes are enabled for this project

Request​

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

async function updateProjectRetention() {
const projectId = "6266193db77ccc8111730c90";
const payload = {
mode: "ephemeral",
types: {
documentImages: { mode: "ephemeral", retentionHours: null },
faceImages: { mode: "ephemeral", retentionHours: null },
ocrExtraction: { mode: "store", retentionHours: null },
documentLiveness: { mode: "none", retentionHours: null }
},
webhookHoldHours: 24,
allowManualDelete: true
};

const res = await fetch(`https://api.verifik.co/v2/projects/${projectId}/data-retention`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload)
});
console.log(await res.json());
}

updateProjectRetention();

Response​

{
"data": {
"mode": "ephemeral",
"types": {
"documentImages": { "mode": "ephemeral", "retentionHours": null },
"faceImages": { "mode": "ephemeral", "retentionHours": null },
"ocrExtraction": { "mode": "store", "retentionHours": null },
"documentLiveness": { "mode": "none", "retentionHours": null }
},
"webhookHoldHours": 24,
"allowManualDelete": true
}
}