Lejki
Endpointy „Lejki” Zanfia Workspace API — ze schematami i przykładami kodu.
Lejki marketingowe: nazwane łańcuchy kroków, które odwołują się do istniejących koszyków, stron i automatyzacji — lejek nigdy nie jest ich właścicielem, więc usunięcie lejka ich nie kasuje. Tworzenie odbywa się z przepisu nad istniejącymi zasobami produktu (lead_magnet / tripwire wymagają darmowego koszyka, sell_product — płatnego; webinar nie jest jeszcze dostępny) i dodatkowo tworzy sekwencję e-maili z przepisu jako szkic automatyzacji. Statusy draft / live / archived są w pełni odwracalne przez PATCH. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.
Lista lejków
/funnelsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/funnels"{ "funnels": [ { "id": "string", "name": "string", "recipe": "lead_magnet", "status": "draft", "steps": [ { "stepId": "string", "type": "opt_in_page", "name": "string", "ref": { "pageId": "string", "checkoutId": "string", "formId": "string", "otoOfferId": "string" }, "slug": "string", "status": "ready" } ], "workflowIds": [ "string" ], "productIds": [ "string" ], "createdAt": 0, "updatedAt": 0 } ]}{ "error": "string"}Utwórz lejek z przepisu
/funnelsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create a funnel from a recipe — resolves the product's existing artifacts (free/paid checkouts, OTO chain) into the step list and generates the recipe's email sequence as a DRAFT workflow. See FunnelDocument.
Response Body
application/json
application/json
curl -X POST "https://example.com/funnels" \ -H "Content-Type: application/json" \ -d '{ "recipe": "lead_magnet", "productId": "string", "lang": "en" }'{ "funnelId": "string"}{ "error": "string"}Pobierz lejek
/funnels/{funnelId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Funnel id
Response Body
application/json
application/json
curl -X GET "https://example.com/funnels/string"{ "funnel": { "id": "string", "name": "string", "recipe": "lead_magnet", "status": "draft", "steps": [ { "stepId": "string", "type": "opt_in_page", "name": "string", "ref": { "pageId": "string", "checkoutId": "string", "formId": "string", "otoOfferId": "string" }, "slug": "string", "status": "ready" } ], "workflowIds": [ "string" ], "productIds": [ "string" ], "createdAt": 0, "updatedAt": 0 }}{ "error": "string"}Edytuj lejek
/funnels/{funnelId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Funnel id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Partial funnel update — rename, status transition, step re-wiring.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/funnels/string" \ -H "Content-Type: application/json" \ -d '{}'{ "updated": true}{ "error": "string"}Usuń lejek
/funnels/{funnelId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Funnel id
Response Body
application/json
application/json
curl -X DELETE "https://example.com/funnels/string"{ "deleted": true}{ "error": "string"}Wygeneruj stronę dla kroku lejka
/funnels/{funnelId}/generate-step-pageAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Funnel id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Generate a hosted page for one page-type funnel step (opt-in / sales / thank-you) via the unified page-generation pipeline, grounded in the funnel's product + the step's checkout, then wire the step to the draft (ref.pageId + slug). One step per call — generation takes minutes.
Response Body
application/json
application/json
curl -X POST "https://example.com/funnels/string/generate-step-page" \ -H "Content-Type: application/json" \ -d '{ "stepId": "string", "lang": "en" }'{ "pageId": "string", "slug": "string"}{ "error": "string"}Czy ten artykuł był pomocny?

