Delete Project
Endpointβ
DELETE https://api.verifik.co/v3/projects/{id}
Permanently delete a project and all its associated project flows. 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 to delete |
Requestβ
- Node.js
- PHP
- Python
- Go
const fetch = require("node-fetch");
async function run() {
const projectId = "64a1b2c3d4e5f6789012345";
const res = await fetch(`https://api.verifik.co/v3/projects/${projectId}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(await res.json());
}
run();
<?php
$projectId = "64a1b2c3d4e5f6789012345";
$ch = curl_init("https://api.verifik.co/v3/projects/" . $projectId);
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
project_id = "64a1b2c3d4e5f6789012345"
url = f"https://api.verifik.co/v3/projects/{project_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() {
projectId := "64a1b2c3d4e5f6789012345"
url := fmt.Sprintf("https://api.verifik.co/v3/projects/%s", projectId)
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": "64a1b2c3d4e5f6789012345",
"name": "Deleted Project",
"status": "deleted"
}
}
{
"message": "Invalid project ID format",
"code": "BadRequest",
"status": 400,
"timestamp": "2023-07-01T10:00:00.000Z"
}
{
"message": "Access forbidden",
"code": "Forbidden",
"status": 401,
"timestamp": "2023-07-01T10:00:00.000Z"
}
or
{
"message": "Access forbidden",
"code": "Forbidden"
}
{
"message": "Project not found",
"code": "NotFound"
}
{
"message": "Cannot delete project with active flows",
"code": "Conflict"
}
Notesβ
- Irreversible Action: Project deletion is permanent and cannot be undone. All associated data will be permanently removed from the system.
- Cascade Deletion: When a project is deleted, the following associated resources are also removed: Project Flows, Webhooks, Project Members, and Configuration Data.
- Pre-deletion Checks: Before deleting, ensure no users are currently going through the KYC process, export any necessary data, check for external system dependencies, and ensure deletion complies with data retention requirements.
- Project Status: Only projects with status
draftorpausedcan be deleted. Active projects must be paused first. - Safe Deletion: Consider setting the project 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 data before deletion, as this action permanently removes all project data.