Delete Project Flow
Endpointβ
DELETE https://api.verifik.co/v3/project-flows/{id}
Permanently delete a project flow and all its associated configuration. This action cannot be undone.
Headersβ
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Paramsβ
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the project flow to delete |
Requestβ
- Node.js
- PHP
- Python
- Go
const fetch = require("node-fetch");
async function run() {
const flowId = "64a1b2c3d4e5f6789012346";
const res = await fetch(`https://api.verifik.co/v3/project-flows/${flowId}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(await res.json());
}
run();
<?php
$flowId = "64a1b2c3d4e5f6789012346";
$ch = curl_init("https://api.verifik.co/v3/project-flows/" . $flowId);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_TOKEN")
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os, requests
flow_id = "64a1b2c3d4e5f6789012346"
url = f"https://api.verifik.co/v3/project-flows/{flow_id}"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}"
}
r = requests.delete(url, headers=headers)
print(r.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
flowId := "64a1b2c3d4e5f6789012346"
url := fmt.Sprintf("https://api.verifik.co/v3/project-flows/%s", flowId)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_TOKEN"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
Responseβ
- 200
- 400
- 401/403
- 404
- 409
{
"data": {
"_id": "64a1b2c3d4e5f6789012346",
"type": "onboarding",
"target": "personal",
"status": "deleted"
}
}
{
"message": "Invalid project flow ID format",
"code": "BadRequest"
}
{
"message": "Access forbidden",
"code": "Forbidden"
}
{
"message": "Project flow not found",
"code": "NotFound"
}
{
"message": "Cannot delete project flow with active users",
"code": "Conflict"
}
Notesβ
- Irreversible Action: Project flow deletion is permanent and cannot be undone. All associated configuration data will be permanently removed from the system.
- Soft Delete Behavior: In development environments, project flows are soft-deleted (marked as deleted but remain in database). In production, they are permanently removed.
- Cascade Deletion: When a project flow is deleted, the following associated resources are also removed: Configuration Data, Webhook References, Integration Settings, and Document Templates.
- Impact on Parent Project: Deleting a project flow will remove it from the parent project's
projectFlowsarray and may affect the project's overall configuration status. - Pre-deletion Checks: Before deleting, ensure no users are currently going through the verification process, check if the parent project depends on this flow, export any necessary configuration data, and verify no external systems depend on this flow.
- Safe Deletion: Consider setting the project flow status to "paused" first to prevent new users from starting the process while you prepare for deletion.
- Data Retention: Ensure you have exported any necessary configuration data before deletion, as this action permanently removes all flow-specific settings.