Delete a project
Delete a Clics project with the TypeScript SDK. Immediate when empty; async purge when analytics data exists.
Permanently removes a project and its configuration (goals, funnels). Analytics data is purged according to the response status.
Use with care: this cannot be undone once deletion completes.
Parameters
| Field | Required | Description |
|---|---|---|
projectId |
Yes | Project to delete |
Signature
clics.projects.deleteProject(request, options?)
Example
import { Clics } from "@clicsdev/sdk";
const clics = new Clics({
apiKey: process.env.CLICS_API_KEY!,
});
const result = await clics.projects.deleteProject({
projectId: "proj_xxx",
});
console.log(result.status);
What it returns
| Field | Description |
|---|---|
deleted |
true when Clics accepted the deletion request |
status |
deleted_immediately, purge_scheduled, or already_deleting |
| Status | Meaning |
|---|---|
deleted_immediately |
No events recorded: project removed now |
purge_scheduled |
Has analytics data: async purge started, project status becomes deleting |
already_deleting |
Deletion already in progress |
Notes
While a project is deleting, goals and funnels cannot be created or modified.
API reference
See Delete a project for request and response schemas, status codes, and error types.