Retrieve Retention Policy
Endpoint
GET https://api.verifik.co/v2/data-retention/policy
Resolves the hierarchical data retention policy for the authenticated client, with optional project and project flow overrides.
Headers
| Name | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
projectId | string | No | Optional project ID to resolve project-specific retention overrides |
projectFlowId | string | No | Optional project flow ID to resolve flow-specific retention overrides |
Request
- Node.js
- Python
const fetch = require("node-fetch");
async function getPolicy() {
const res = await fetch("https://api.verifik.co/v2/data-retention/policy?projectId=6266193db77ccc8111730c90", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
"Content-Type": "application/json",
},
});
console.log(await res.json());
}
getPolicy();
import os, requests
url = "https://api.verifik.co/v2/data-retention/policy?projectId=6266193db77ccc8111730c90"
headers = {
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
Response
- 200
- 401
{
"data": {
"mode": "store",
"types": {
"documentImages": {
"mode": "store",
"retentionHours": 720
},
"faceImages": {
"mode": "ephemeral",
"retentionHours": null
},
"ocrExtraction": {
"mode": "store",
"retentionHours": null
},
"documentLiveness": {
"mode": "none",
"retentionHours": null
}
},
"webhookHoldHours": 24,
"allowManualDelete": true
}
}
{
"message": "Access forbidden",
"code": "Forbidden"
}