Pop-upy
Endpointy „Pop-upy” Zanfia Workspace API — ze schematami i przykładami kodu.
Pop-upy na Twoich stronach: każdy zawiera samodzielny formularz zapisu (bez content.formId powstaje nowy formularz). Pop-up powstaje jako szkic i włączasz go endpointem statusu, gdy ma tytuł, tekst przycisku i formularz; aktywnych może być naraz najwyżej 20. Wyzwalacze ustawiasz osobno na komputer i telefon, do tego gdzie się pokazuje, jak często i opcjonalny harmonogram. Strony na żywo widzą zmiany w ciągu kilku minut. Wymaga funkcji pop-upów w planie (inaczej 403). Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.
Lista pop-upów
/popupsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/popups"{ "count": 0, "popups": [ { "id": "string", "name": "string", "status": "draft", "priority": 0, "language": "pl", "copy": { "title": "string", "text": "string", "buttonText": "string", "imageUrl": "string", "imageWidth": 0, "imageHeight": 0 }, "content": { "kind": "form", "formId": "string", "successTitle": "string", "successText": "string", "redirectPageId": "string" }, "design": { "layout": "modal", "imagePosition": "top", "accentColor": "string" }, "trigger": { "desktop": { "kind": "entry", "delaySeconds": 0 }, "mobile": { "kind": "entry", "delaySeconds": 0 } }, "targeting": { "surfaces": [ "pages" ], "pages": { "mode": "all", "pageIds": [ "string" ] }, "device": "all", "audience": "all", "hideForSubscribers": true }, "frequency": { "kind": "once", "days": 0 }, "schedule": { "startsAt": "string", "endsAt": "string" }, "createdAt": "string", "updatedAt": "string" } ]}{ "error": "string", "message": "string"}Utwórz pop-up
/popupsAuthorization
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.
POST /popups: always created as a draft.
Response Body
application/json
application/json
curl -X POST "https://example.com/popups" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "id": "string", "name": "string", "status": "draft", "priority": 0, "language": "pl", "copy": { "title": "string", "text": "string", "buttonText": "string", "imageUrl": "string", "imageWidth": 0, "imageHeight": 0 }, "content": { "kind": "form", "formId": "string", "successTitle": "string", "successText": "string", "redirectPageId": "string" }, "design": { "layout": "modal", "imagePosition": "top", "accentColor": "string" }, "trigger": { "desktop": { "kind": "entry", "delaySeconds": 0 }, "mobile": { "kind": "entry", "delaySeconds": 0 } }, "targeting": { "surfaces": [ "pages" ], "pages": { "mode": "all", "pageIds": [ "string" ] }, "device": "all", "audience": "all", "hideForSubscribers": true }, "frequency": { "kind": "once", "days": 0 }, "schedule": { "startsAt": "string", "endsAt": "string" }, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Szczegóły pop-upu
/popups/{popupId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/popups/string"{ "id": "string", "name": "string", "status": "draft", "priority": 0, "language": "pl", "copy": { "title": "string", "text": "string", "buttonText": "string", "imageUrl": "string", "imageWidth": 0, "imageHeight": 0 }, "content": { "kind": "form", "formId": "string", "successTitle": "string", "successText": "string", "redirectPageId": "string" }, "design": { "layout": "modal", "imagePosition": "top", "accentColor": "string" }, "trigger": { "desktop": { "kind": "entry", "delaySeconds": 0 }, "mobile": { "kind": "entry", "delaySeconds": 0 } }, "targeting": { "surfaces": [ "pages" ], "pages": { "mode": "all", "pageIds": [ "string" ] }, "device": "all", "audience": "all", "hideForSubscribers": true }, "frequency": { "kind": "once", "days": 0 }, "schedule": { "startsAt": "string", "endsAt": "string" }, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Zmień pop-up
/popups/{popupId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PATCH /popups/:popupId. An active pop-up must stay complete (title, button, form).
Response Body
application/json
application/json
curl -X PATCH "https://example.com/popups/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "status": "draft", "priority": 0, "language": "pl", "copy": { "title": "string", "text": "string", "buttonText": "string", "imageUrl": "string", "imageWidth": 0, "imageHeight": 0 }, "content": { "kind": "form", "formId": "string", "successTitle": "string", "successText": "string", "redirectPageId": "string" }, "design": { "layout": "modal", "imagePosition": "top", "accentColor": "string" }, "trigger": { "desktop": { "kind": "entry", "delaySeconds": 0 }, "mobile": { "kind": "entry", "delaySeconds": 0 } }, "targeting": { "surfaces": [ "pages" ], "pages": { "mode": "all", "pageIds": [ "string" ] }, "device": "all", "audience": "all", "hideForSubscribers": true }, "frequency": { "kind": "once", "days": 0 }, "schedule": { "startsAt": "string", "endsAt": "string" }, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Usuń pop-up
/popups/{popupId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/popups/string"{ "popupId": "string"}{ "error": "string", "message": "string"}Włącz lub wstrzymaj pop-up
/popups/{popupId}/statusAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /popups/:popupId/status: activation checks completeness, the plan and the active cap.
Response Body
application/json
application/json
curl -X POST "https://example.com/popups/string/status" \ -H "Content-Type: application/json" \ -d '{ "status": "active" }'{ "id": "string", "name": "string", "status": "draft", "priority": 0, "language": "pl", "copy": { "title": "string", "text": "string", "buttonText": "string", "imageUrl": "string", "imageWidth": 0, "imageHeight": 0 }, "content": { "kind": "form", "formId": "string", "successTitle": "string", "successText": "string", "redirectPageId": "string" }, "design": { "layout": "modal", "imagePosition": "top", "accentColor": "string" }, "trigger": { "desktop": { "kind": "entry", "delaySeconds": 0 }, "mobile": { "kind": "entry", "delaySeconds": 0 } }, "targeting": { "surfaces": [ "pages" ], "pages": { "mode": "all", "pageIds": [ "string" ] }, "device": "all", "audience": "all", "hideForSubscribers": true }, "frequency": { "kind": "once", "days": 0 }, "schedule": { "startsAt": "string", "endsAt": "string" }, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Czy ten artykuł był pomocny?

