List funnels
List conversion funnels for a Clics project with the TypeScript SDK, with optional env and pagination.
Returns all funnels for a project. Use this to export funnel definitions, audit step configuration, or find funnel IDs before calling getFunnel or updateFunnel.
Results are paginated when there are many funnels.
Parameters
| Field | Required | Description |
|---|---|---|
projectId |
Yes | Project to list funnels for |
envId |
No | production (default) or development |
cursor |
No | Pagination cursor from a prior response |
limit |
No | Page size (1–100) |
Signature
clics.funnels.listFunnels(request, options?)
Example
import { Clics } from "@clicsdev/sdk";
const clics = new Clics({
apiKey: process.env.CLICS_API_KEY!,
});
const result = await clics.funnels.listFunnels({
projectId: "proj_xxx",
cursor: "eyJwayI6InByb2pfMSJ9",
limit: 20,
});
for (const funnel of result.funnels) {
console.log(funnel.name, funnel.steps.length, "steps");
}
What it returns
Each item in funnels contains the complete saved definition:
| Field | Description |
|---|---|
id |
Stable funnel ID |
projectId |
Parent project ID |
envId |
production or development |
name |
Dashboard label |
conversionWindow |
{ value, unit } completion window |
steps |
Ordered steps; each has a name and filter list |
createdAt |
Creation timestamp |
meta.cursor is the opaque value for the next request and is null when no further page exists. meta.isDone is true on the final page.
API reference
See List funnels for request and response schemas, status codes, and error types.