Skip to main content

Update Project Flow

Endpoint​

PUT https://api.verifik.co/v3/project-flows/{id}

Update the configuration of an existing project flow. This endpoint supports partial updates and focuses on personal target flows.

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params​

NameTypeRequiredDescription
idstringYesThe unique identifier of the project flow to update

Request​

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

async function run() {
const flowId = "64a1b2c3d4e5f6789012346";
const res = await fetch(`https://api.verifik.co/v3/project-flows/${flowId}`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
body: JSON.stringify({
documents: {
attemptLimit: 5,
criminalHistoryVerification: true,
verificationMethods: ["SCAN_PROMPT"],
documentTypes: [
{
country: "United States",
configurations: [
{
active: true,
documentCategory: "government_id"
}
]
}
]
}
}),
});
console.log(await res.json());
}

run();

Response​

{
"data": {
"_id": "64a1b2c3d4e5f6789012346",
"type": "onboarding",
"target": "personal",
"status": "active",
"version": 3,
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"signUpForm": {
"fullName": true,
"fullNameStyle": "separate",
"email": true,
"emailGateway": "mailgun",
"phone": true,
"phoneGateway": "whatsapp",
"showTermsAndConditions": true,
"showPrivacyNotice": true,
"additionalFields": [],
"allowAdditionalFields": false
},
"documents": {
"attemptLimit": 5,
"criminalHistoryVerification": true,
"informationVerification": true,
"screening": true,
"verificationMethods": ["SCAN_PROMPT"],
"documentTypes": [
{
"country": "United States",
"configurations": [
{
"active": true,
"documentCategory": "government_id",
"documentTemplates": []
}
]
}
]
},
"liveness": {
"attemptLimit": 3,
"minScore": 0.7,
"searchMinScore": 0.85,
"searchMode": "ACCURATE"
},
"steps": {
"document": "mandatory",
"liveness": "mandatory"
},
"integrations": {
"redirectUrl": "https://example.com/success",
"webhook": "64a1b2c3d4e5f6789012347",
"source": "API",
"strategy": "blacklist",
"apiUrl": "https://api.example.com/check",
"apiTestType": "email",
"apiTestValue": "test@example.com"
},
"createdAt": "2023-07-01T10:00:00.000Z",
"updatedAt": "2023-07-01T16:45:00.000Z"
}
}

Notes​

  • Partial Updates: You can update any combination of fields. Only the fields you specify will be updated; others will remain unchanged.
  • Updatable Fields: status, target, type, version, signUpForm, documents, liveness, steps, integrations.
  • Document Configuration: verificationMethods required when steps.document is not "skip". attemptLimit must be between 1 and 5.
  • Liveness Configuration: minScore must be between 0.52 and 0.9; searchMinScore between 0.7 and 0.95; attemptLimit between 1 and 5.
  • Integration Configuration: apiUrl, apiTestType, and apiTestValue required when source is "API".
  • Active Flows: Be cautious when updating active project flows, as changes may affect users currently going through the process.
  • Validation: All updates are validated against the complete project flow configuration to ensure consistency and proper functionality.