Skip to main content

Update Project

Endpoint​

PUT https://api.verifik.co/v3/projects/{id}

Update project configuration using a step-by-step approach that matches the SmartEnroll frontend wizard. This endpoint supports partial updates, allowing you to modify specific sections without affecting others.

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params​

NameTypeRequiredDescription
idstringYesThe unique identifier of the project

Request​

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

async function run() {
const projectId = "64a1b2c3d4e5f6789012345";
const res = await fetch(`https://api.verifik.co/v3/projects/${projectId}`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
name: "Updated Project Name",
allowedCountries: ["United States", "Canada"],
dataProtection: {
name: "Updated DPO",
email: "updated-dpo@example.com",
address: "789 New St",
city: "Toronto",
country: "Canada",
postalCode: "M5H 2N2"
}
}),
});
console.log(await res.json());
}

run();

Response​

{
"data": {
"_id": "64a1b2c3d4e5f6789012345",
"name": "Updated Project Name",
"identifier": null,
"contactEmail": "new-admin@example.com",
"privacyUrl": "https://example.com/privacy",
"termsAndConditionsUrl": "https://example.com/terms",
"status": "draft",
"currentStep": 6,
"lastStep": 6,
"demoMode": false,
"demoOTP": null,
"allowedCountries": ["United States", "Canada", "Mexico"],
"dataProtection": {
"name": "Updated DPO",
"email": "updated-dpo@example.com",
"address": "789 New St",
"address2": "",
"city": "Toronto",
"country": "Canada",
"postalCode": "M5H 2N2"
},
"branding": {
"bgColor": "#1a365d",
"tabColor": "#01236D",
"borderColor": "#B2BDD3",
"buttonColor": "#3182ce",
"buttonTxtColor": "#ffffff",
"secondaryButtonColor": "#B2BDD3",
"secondaryButtonTextColor": "#FFFFFF",
"txtColor": "#8091B6",
"titleColor": "#1a202c",
"logo": "https://example.com/logo.png",
"rightImage": null,
"rightImagePosition": "center center",
"rightBackgroundColor": "white"
},
"projectFlows": "64a1b2c3d4e5f6789012346",
"version": 2,
"createdAt": "2023-07-01T10:00:00.000Z",
"updatedAt": "2023-07-01T16:45:00.000Z"
},
"status": "completed"
}

Notes​

  • Step-by-Step Updates: The endpoint supports the same 6-step configuration process used in the SmartEnroll frontend wizard (Data Protection, Sign-up Form, Documents, Liveness, Integration, Branding).
  • Partial Updates: You can update any combination of fields. Only the fields you specify will be updated; others remain unchanged.
  • Project Flow Creation: If you update projectFlow fields on a project that doesn't have a projectFlow, a new one will be created automatically.
  • Demo Mode: Can be enabled/updated with demoMode: true. The system will auto-generate a 6-digit OTP if not provided, or you can set a custom demoOTP.
  • Validation: When updating a project with projectFlow configuration, all fields are validated against the complete configuration to ensure consistency.
  • Step Values: steps.document and steps.liveness can be mandatory, optional, or skip.
  • Verification Methods: Required when steps.document is not "skip". Options: SCAN_ZERO, SCAN_PROMPT, SCAN_STUDIO.