{"openapi":"3.1.0","info":{"title":"LanderLab API","version":"2.0.0","description":"LanderLab public API. Authenticate with an API key using the X-API-Key header."},"servers":[{"url":"https://api.landerlab.dev","description":"Production"}],"tags":[{"name":"Account","description":"Discover the organization and workspaces your API key can access. Start here."},{"name":"Workspaces","description":"List and manage workspaces."},{"name":"Landers","description":"Create, update, publish and manage landers."},{"name":"A/B Testing","description":"Manage variants and split-test weights."},{"name":"Editor","description":"Load and save lander content and settings."},{"name":"Analytics","description":"Query unified analytics across workspaces, landers and variants."},{"name":"Leads","description":"Retrieve captured leads."},{"name":"Integrations","description":"Manage account-level integrations."},{"name":"Lander Integrations","description":"Attach and toggle integrations on landers."},{"name":"Domains","description":"Manage custom domains."},{"name":"Folders","description":"Organize landers into folders."}],"paths":{"/api/v2/me":{"get":{"summary":"Get current context","description":"Returns the organization and workspaces this API key can access. Call this first to discover the organizationId and workspaceIds required by the other endpoints.","tags":["Account"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Current API key context","content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"number"},"organization":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["organizationId","organization","workspaces"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/workspaces/get":{"get":{"summary":"List workspaces","description":"Returns all workspaces the API key has access to within the organization.","tags":["Workspaces"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"organizationId":{"type":"number"},"default":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","organizationId","default","createdAt","updatedAt"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/workspaces/create":{"post":{"summary":"Create workspace","description":"Create a new workspace within the organization. Fails if the workspace name is already taken or the plan limit is reached.","tags":["Workspaces"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Created workspace","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"organizationId":{"type":"number"},"default":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","organizationId","default","createdAt","updatedAt"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/workspaces/{workspaceId}/update":{"post":{"summary":"Rename workspace","description":"Rename an existing workspace. Fails if another workspace in the organization already uses that name.","tags":["Workspaces"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated workspace","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"organizationId":{"type":"number"},"default":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","organizationId","default","createdAt","updatedAt"],"additionalProperties":false}}},"required":["workspaces"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/logs/landerIntegrations/get":{"get":{"summary":"List lander integration delivery logs","description":"Paginated request/response logs for lead deliveries to integrations across the organization. Filter by `landerIds` (JSON array string, empty = all owned landers), integration `type`, date range, and free-text `q` (searches request/response). Use this to verify leads are reaching an integration and to debug failures.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"landerIds","in":"query","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"orderBy","in":"query","required":false,"schema":{"type":"string","enum":["desc","asc"]}}],"responses":{"200":{"description":"Integration delivery logs","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/get":{"get":{"summary":"List integrations","description":"Returns all integrations in the organization (credentials excluded).","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of integrations","content":{"application/json":{"schema":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"typeName":{"type":"string"},"userId":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","typeName","userId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["integrations"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/catalog":{"get":{"summary":"List integration type catalog","description":"Static catalog of available integration types (credential-free metadata). Pass `full=true` for complete entries with per-action config schemas and data resources.","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"full","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Integration type catalog","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/connect-config":{"get":{"summary":"List lander-integration connect configs","description":"Declarative per-type configs describing how a lander integration is configured (resource selects, tags, field-mapping semantics, payload assembly). Consumed by the mobile app so the connect flows stay server-defined.","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Connect configs","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/cloudflare/oauth/authorize-url":{"get":{"summary":"Get Cloudflare OAuth authorize URL","description":"Returns the Cloudflare consent-screen URL for connecting a Cloudflare account as an integration. The OAuth state is server-minted; the callback creates or updates the integration and redirects back to the dashboard.","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Authorize URL","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/catalog/{provider}":{"get":{"summary":"Get integration type catalog entry","description":"Full catalog entry for one integration type (by provider id or typeName): per-action config schemas and selectable data resources with their param dependencies.","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Catalog entry","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/{integrationId}/delete":{"delete":{"summary":"Delete integration","description":"Delete an organization integration. It is also detached from every lander that used it (their previews and published integrations are refreshed).","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"integrationId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/integrations/create":{"post":{"summary":"Create integration","description":"Create a new organization integration. The body shape depends on the integration type (e.g. RedTrack, ClickFlare, Brevo, Klaviyo, MetaPixel, GoogleTagManager). OAuth-based types (MailChimp, HubSpot, Gmail, Sheets, AWeber) require an OAuth `code` from the interactive flow and are not practical to call directly via API.","tags":["Integrations"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Integration type identifier (e.g. \"redtrack\", \"clickflare\", \"brevo\", \"metapixel\")"},"data":{"type":"object","additionalProperties":true,"description":"Type-specific config (e.g. { name, apiKey } for credential-based types)"}},"required":["type","data"]}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/domains/get":{"get":{"summary":"List organization domains","description":"Returns all domains across the organization with published lander counts and workspace info.","tags":["Domains"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of domains","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"root_domain":{"type":"string"},"subdomain":{"type":"string"},"status":{"type":"string"},"default":{"type":"boolean"},"workspaceId":{"type":["number","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"landers":{"type":"number"}},"required":["landers"],"additionalProperties":false},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","name","root_domain","subdomain","status","default","workspaceId","createdAt","updatedAt","_count","workspaces"],"additionalProperties":false}}},"required":["domains"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/leads/get":{"get":{"summary":"List organization leads","description":"Returns paginated leads across the entire organization with lander and workspace context, each with the integrations it was sent to and its phone / email verification and OTP status.","tags":["Leads"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string","enum":["partial","complete"]}},{"name":"orderBy","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"landerIds","in":"query","schema":{"type":"string"},"description":"JSON array of lander IDs"},{"name":"workspaceIds","in":"query","schema":{"type":"string"},"description":"JSON array of workspace IDs"}],"responses":{"200":{"description":"Paginated leads","content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"landerId":{"type":"number"},"variantId":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","label","value"],"additionalProperties":false}},"status":{"type":"string","enum":["complete","partial"]},"source":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"landerIntegrationId":{"type":["number","null"]},"name":{"type":["string","null"]},"typeName":{"type":["string","null"]},"success":{"type":"boolean"}},"required":["landerIntegrationId","name","typeName","success"],"additionalProperties":false}},"integrationsCount":{"type":"number"},"verification":{"type":"object","properties":{"phone":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"checkedAt":{"type":"string"}},"required":["input","verified","checkedAt"],"additionalProperties":false},{"type":"null"}]},"email":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"checkedAt":{"type":"string"}},"required":["input","verified","checkedAt"],"additionalProperties":false},{"type":"null"}]},"phoneOtp":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"sentCount":{"type":"number"},"attemptCount":{"type":"number"},"lastSentAt":{"type":["string","null"]},"lastAttemptAt":{"type":["string","null"]}},"required":["input","verified","sentCount","attemptCount","lastSentAt","lastAttemptAt"],"additionalProperties":false},{"type":"null"}]},"emailOtp":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"sentCount":{"type":"number"},"attemptCount":{"type":"number"},"lastSentAt":{"type":["string","null"]},"lastAttemptAt":{"type":["string","null"]}},"required":["input","verified","sentCount","attemptCount","lastSentAt","lastAttemptAt"],"additionalProperties":false},{"type":"null"}]}},"required":["phone","email","phoneOtp","emailOtp"],"additionalProperties":false},"lander":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]}},"required":["id","userId","landerId","variantId","data","status","source","createdAt","updatedAt","integrations","integrationsCount","verification","lander","workspace"],"additionalProperties":false}},"totalCount":{"type":"number"},"totalPages":{"type":"number"},"hitsPerPage":{"type":"number"},"query":{"type":"string"}},"required":["leads","totalCount","totalPages","hitsPerPage","query"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/organizations/{organizationId}/analytics/get":{"post":{"summary":"Get unified analytics","description":"Flexible analytics endpoint scoped to the organization. Filter by any combination of workspaceIds, landerIds, or variantIds. The most-specific filter wins (variantIds > landerIds > workspaceIds). Returns aggregate totals plus a breakdown grouped by date / lander / variant / workspace.","tags":["Analytics"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"type":"string","description":"ISO 8601 date (YYYY-MM-DD). Full ISO timestamps are accepted and truncated to the day in the given timezone."},"endDate":{"type":"string","description":"ISO 8601 date (YYYY-MM-DD). Full ISO timestamps are accepted and truncated to the day in the given timezone."},"timezone":{"type":"string","description":"IANA timezone (e.g. America/New_York)"},"workspaceIds":{"type":"array","items":{"type":"integer"}},"landerIds":{"type":"array","items":{"type":"integer"}},"variantIds":{"type":"array","items":{"type":"integer"}},"groupBy":{"type":"string","enum":["date","lander","variant","workspace"],"default":"date"}},"required":["startDate","endDate","timezone"]}}}},"responses":{"200":{"description":"Analytics data","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"object","properties":{"workspaceIds":{"type":"array","items":{"type":"number"}},"landerIds":{"type":"array","items":{"type":"number"}},"variantIds":{"type":"array","items":{"type":"number"}}},"required":["workspaceIds","landerIds","variantIds"],"additionalProperties":false},"groupBy":{"type":"string","enum":["date","lander","variant","workspace"]},"totals":{"type":"object","properties":{"visits":{"type":"number"},"uniqueVisits":{"type":"number"},"conversions":{"type":"number"},"clicks":{"type":"number"},"leads":{"type":"number"},"ctr":{"type":"number"},"cvr":{"type":"number"}},"required":["visits","uniqueVisits","conversions","clicks","leads","ctr","cvr"],"additionalProperties":false},"breakdown":{"type":"array","items":{"type":"object","properties":{"key":{"type":["string","number"]},"label":{"type":"string"},"visits":{"type":"number"},"uniqueVisits":{"type":"number"},"conversions":{"type":"number"},"clicks":{"type":"number"},"leads":{"type":"number"}},"required":["key","label","visits","uniqueVisits","conversions","clicks","leads"],"additionalProperties":false}}},"required":["scope","totals","breakdown"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/folders/get":{"get":{"summary":"List folders","description":"Returns all folders in the workspace owned by the authenticated principal.","tags":["Folders"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of folders","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"userId":{"type":"number"},"workspaceId":{"type":["number","null"]},"parentId":{"type":["number","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","userId","workspaceId","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["folders"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/folders/create":{"post":{"summary":"Create folder","description":"Create a new folder in the workspace, optionally nested inside a parent folder. Fails if a sibling folder with the same name already exists.","tags":["Folders"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parentId":{"type":["number","null"]}},"required":["name"]}}}},"responses":{"200":{"description":"Created folder","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/folders/{folderId}/update":{"post":{"summary":"Rename folder","description":"Rename an existing folder. Fails if a sibling folder already uses the new name.","tags":["Folders"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated folder","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/folders/{folderId}/move-to-folder":{"post":{"summary":"Move folder into another folder","description":"Move a folder inside another folder, or to the workspace root by passing a null parentId. Fails when moving a folder into itself or one of its subfolders, or when the destination already contains a folder with the same name.","tags":["Folders"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"type":["number","null"]}},"required":["parentId"]}}}},"responses":{"200":{"description":"Moved folder","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/get":{"get":{"summary":"List components","description":"Returns all global components in the workspace, newest first, including content and css.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of components","content":{"application/json":{"schema":{"type":"object","properties":{"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"media":{"type":"string"},"usageCount":{"type":"number"},"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"published":{"type":"boolean"}},"required":["id","name","published"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","css","media","usageCount","landers","createdAt","updatedAt"],"additionalProperties":false}}},"required":["components"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/get":{"get":{"summary":"Get component","description":"Returns a single global component by id.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"media":{"type":"string"},"usageCount":{"type":"number"},"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"published":{"type":"boolean"}},"required":["id","name","published"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","css","media","usageCount","landers","createdAt","updatedAt"],"additionalProperties":false}},"required":["component"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/create":{"post":{"summary":"Create component","description":"Create a new global component in the workspace.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Created component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"media":{"type":"string"},"usageCount":{"type":"number"},"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"published":{"type":"boolean"}},"required":["id","name","published"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","css","media","usageCount","landers","createdAt","updatedAt"],"additionalProperties":false}},"required":["component"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/update":{"patch":{"summary":"Update component","description":"Partially update a global component. Only the provided fields are applied.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"versionSource":{"type":"string","enum":["manual","ai"]},"versionSummary":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"media":{"type":"string"},"usageCount":{"type":"number"},"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"published":{"type":"boolean"}},"required":["id","name","published"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","css","media","usageCount","landers","createdAt","updatedAt"],"additionalProperties":false}},"required":["component"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/delete":{"delete":{"summary":"Delete component","description":"Soft delete a global component. Existing instances keep their last snapshot and stop receiving updates.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/clone":{"post":{"summary":"Clone component","description":"Duplicate a global component. The clone gets a fresh id and its scoped CSS is re-scoped to it.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Cloned component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"media":{"type":"string"},"usageCount":{"type":"number"},"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"published":{"type":"boolean"}},"required":["id","name","published"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","css","media","usageCount","landers","createdAt","updatedAt"],"additionalProperties":false}},"required":["component"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/versions/get":{"get":{"summary":"List component versions","description":"Returns the version history of a global component, newest first, without content.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of versions","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"summary":{"type":["string","null"]},"source":{"type":"string"},"authorId":{"type":["number","null"]},"createdAt":{"type":"string"}},"required":["id","version","summary","source","authorId","createdAt"],"additionalProperties":false}}},"required":["versions"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/versions/{versionId}/get":{"get":{"summary":"Get component version","description":"Returns a single component version including its content and css.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Component version","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"number"},"summary":{"type":["string","null"]},"source":{"type":"string"},"authorId":{"type":["number","null"]},"createdAt":{"type":"string"},"componentId":{"type":"number"},"content":{"type":"string"},"css":{"type":"string"}},"required":["id","version","summary","source","authorId","createdAt","componentId","content","css"],"additionalProperties":false}},"required":["version"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/versions/{versionId}/restore":{"post":{"summary":"Restore component version","description":"Restore the content and css of a global component from a version. The restored state is saved as a new version.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Restored component","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"content":{"type":"string"},"css":{"type":"string"},"media":{"type":"string"},"usageCount":{"type":"number"},"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"published":{"type":"boolean"}},"required":["id","name","published"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","css","media","usageCount","landers","createdAt","updatedAt"],"additionalProperties":false}},"required":["component"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/components/{componentId}/move-to-workspace":{"post":{"summary":"Move component to another workspace","description":"Move a global component to another workspace in the same organization. Only allowed when the component is not used on any lander.","tags":["Components"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"integer"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Moved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/get":{"get":{"summary":"List variants","description":"Returns all variants for a lander.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Variants list","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/create":{"post":{"summary":"Clone a variant (create new A/B test variant)","description":"Create a new variant by cloning an existing one. The new variant is a copy of the source `variantId` with a new name. Use this to create variants for A/B testing.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variantId":{"type":"integer","description":"Source variant ID to clone from"},"name":{"type":"string","maxLength":250,"description":"Name for the new variant"}},"required":["variantId","name"]}}}},"responses":{"200":{"description":"Created variant","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/{variantId}/delete":{"delete":{"summary":"Delete variant","description":"Delete a variant. Fails if the variant is the master variant — promote a different variant to master first via setMaster.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Variant deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/{variantId}/setMaster":{"post":{"summary":"Set master variant","description":"Promote this variant to be the master variant of its lander. If A/B testing is disabled, weights collapse to 100% on the new master.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Master variant updated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/setWeights":{"post":{"summary":"Set variant weights (A/B traffic split)","description":"Set the traffic distribution weights across variants. Weights must sum sensibly (typically to 100).","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weights":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Variant ID"},"weight":{"type":"number","minimum":0}},"required":["id","weight"]}}},"required":["weights"]}}}},"responses":{"200":{"description":"Weights updated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/enable":{"post":{"summary":"Enable A/B testing","description":"Turn on multi-variant traffic splitting for the lander.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Enabled","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/disable":{"post":{"summary":"Disable A/B testing","description":"Turn off multi-variant traffic splitting; only the master variant will receive traffic.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Disabled","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/variants/{variantId}/settings":{"get":{"summary":"Get variant settings","description":"Returns the settings for a single variant. Fetched on demand when the settings panel is opened, rather than shipped with the full lander list.","tags":["A/B Testing"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Variant settings","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/get":{"get":{"summary":"List lander integrations","description":"Returns all integrations attached to a lander.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of lander integrations","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/getIntegrationData":{"get":{"summary":"Get integration data for lander setup","description":"Fetch provider-side resources (audiences, lists, fields, spreadsheets, etc.) plus the lander's local lead fields, used to build a lander integration config. Pass `source` (integration type), `required` (resource key) and, for credential-based providers, `integrationId`.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"source","in":"query","required":true,"schema":{"type":"string"}},{"name":"required","in":"query","required":true,"schema":{"type":"string"}},{"name":"integrationId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Integration data","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/create":{"post":{"summary":"Attach integration to lander","description":"Create a lander integration. For page integrations (pixels, tag managers) pass `{ integrationId, variantIds? }`. For lead integrations pass `{ type, name, data, integrationId? }` where `data` is the type-specific config (field mappings, audience/list selection, etc.).","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/{landerIntegrationId}/delete":{"delete":{"summary":"Detach integration from lander","description":"Remove a lander integration link.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"landerIntegrationId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/{landerIntegrationId}/update":{"put":{"summary":"Update lander integration","description":"Update a lander integration. Same body shape as create: `{ integrationId, variantIds? }` for page integrations, `{ type, name, data, integrationId? }` for lead integrations.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"landerIntegrationId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/{landerIntegrationId}/enable":{"post":{"summary":"Enable lander integration","description":"Activate a lander integration so it processes leads/events.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"landerIntegrationId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Enabled","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/integrations/{landerIntegrationId}/disable":{"post":{"summary":"Disable lander integration","description":"Deactivate a lander integration.","tags":["Lander Integrations"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"landerIntegrationId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Disabled","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/analytics/reset":{"post":{"summary":"Reset lander analytics","description":"Sets the analytics reset point for a lander and all of its variants. Visits, clicks, conversions and lead counts recorded before this moment are excluded from analytics. Leads remain visible in the leads list.","tags":["Analytics"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Analytics reset","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"statsResetAt":{"type":"string"}},"required":["message","statsResetAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/load":{"get":{"summary":"Load editor HTML","description":"Load the HTML content, settings, forms, and metadata for a variant in the editor.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Editor state","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"forms":{},"type":{"type":"string"},"lander":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["html","settings","forms","type","lander"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/files":{"get":{"summary":"List variant files","description":"List the relative paths of all files stored for a variant (the variants/unpublished R2 scope). Use loadFile to fetch a specific file's content.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of file paths","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string"}}},"required":["files"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/loadFile":{"get":{"summary":"Read a variant file","description":"Return the text content of a single file stored for the variant (the variants/unpublished R2 scope).","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"fileName","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File content","content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"fileContent":{"type":"string"}},"required":["fileName","fileContent"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/changes":{"get":{"summary":"Unpublished changes diff","description":"Compare the variant's draft state (files, settings, quizzes, A/B traffic weights) against its live published state and return a git-like diff: added, modified and deleted entries, with unified hunks and per-line changes for text content. Returns 400 if the lander is not published or has no changes to be published.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"File changes between draft and published","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"added":{"type":"number"},"modified":{"type":"number"},"deleted":{"type":"number"},"additions":{"type":"number"},"deletions":{"type":"number"},"settingsChanged":{"type":"boolean"},"quizzesChanged":{"type":"number"},"abTestChanged":{"type":"number"}},"required":["added","modified","deleted","additions","deletions","settingsChanged","quizzesChanged","abTestChanged"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"status":{"type":"string","enum":["added","modified","deleted"]},"binary":{"type":"boolean"},"additions":{"type":"number"},"deletions":{"type":"number"},"diffTooLarge":{"type":"boolean"},"hunks":{"type":"array","items":{"type":"object","properties":{"oldStart":{"type":"number"},"oldLines":{"type":"number"},"newStart":{"type":"number"},"newLines":{"type":"number"},"lines":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["context","add","del"]},"content":{"type":"string"},"oldLine":{"type":["number","null"]},"newLine":{"type":["number","null"]},"ranges":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2}}},"required":["type","content","oldLine","newLine"],"additionalProperties":false}}},"required":["oldStart","oldLines","newStart","newLines","lines"],"additionalProperties":false}}},"required":["path","status","binary","additions","deletions","diffTooLarge","hunks"],"additionalProperties":false}},"settings":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["added","modified"]},"additions":{"type":"number"},"deletions":{"type":"number"},"diffTooLarge":{"type":"boolean"},"hunks":{"type":"array","items":{"type":"object","properties":{"oldStart":{"type":"number"},"oldLines":{"type":"number"},"newStart":{"type":"number"},"newLines":{"type":"number"},"lines":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["context","add","del"]},"content":{"type":"string"},"oldLine":{"type":["number","null"]},"newLine":{"type":["number","null"]},"ranges":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2}}},"required":["type","content","oldLine","newLine"],"additionalProperties":false}}},"required":["oldStart","oldLines","newStart","newLines","lines"],"additionalProperties":false}}},"required":["status","additions","deletions","diffTooLarge","hunks"],"additionalProperties":false},{"type":"null"}]},"quizzes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["added","modified","deleted"]},"additions":{"type":"number"},"deletions":{"type":"number"},"diffTooLarge":{"type":"boolean"},"hunks":{"type":"array","items":{"type":"object","properties":{"oldStart":{"type":"number"},"oldLines":{"type":"number"},"newStart":{"type":"number"},"newLines":{"type":"number"},"lines":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["context","add","del"]},"content":{"type":"string"},"oldLine":{"type":["number","null"]},"newLine":{"type":["number","null"]},"ranges":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}],"items":false,"minItems":2,"maxItems":2}}},"required":["type","content","oldLine","newLine"],"additionalProperties":false}}},"required":["oldStart","oldLines","newStart","newLines","lines"],"additionalProperties":false}}},"required":["id","name","status","additions","deletions","diffTooLarge","hunks"],"additionalProperties":false}},"abTest":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":["number","null"]},"name":{"type":["string","null"]},"encryptedId":{"type":"string"},"liveWeight":{"type":["number","null"]},"draftWeight":{"type":["number","null"]},"status":{"type":"string","enum":["added","modified","deleted"]}},"required":["variantId","name","encryptedId","liveWeight","draftWeight","status"],"additionalProperties":false}}},"required":["summary","files","settings","quizzes","abTest"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/discardChanges":{"post":{"summary":"Discard unpublished changes","description":"Overwrite the variant's draft state (files, settings, quizzes) with its live published state, discarding all unpublished changes. Returns 400 if the lander is not published or has no published files for this variant.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Changes discarded","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/save":{"post":{"summary":"Save editor HTML","description":"Save HTML content for a variant. Handles base64 image extraction, gallery cloning, and versioning automatically.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"html":{"type":"string"},"fileName":{"type":"string"},"forms":{"type":"string","description":"JSON forms data"}},"required":["html","fileName"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/saveSettings":{"post":{"summary":"Save variant settings","description":"Save settings (integrations, tracking, SEO, etc.) for a variant.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","additionalProperties":true}},"required":["settings"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/saveFile":{"post":{"summary":"Write a variant file","description":"Create or overwrite a single text file (HTML/CSS/JS) for the variant. For the main page HTML prefer the /save endpoint, which also handles base64 image extraction, search indexing and preview sync.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"fileContent":{"type":"string"}},"required":["fileName","fileContent"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/uploadFile":{"post":{"summary":"Upload a variant file","description":"Upload a single binary or text file for the variant as multipart/form-data. Best option for large files (up to 20 MB).","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"path":{"type":"string"}},"required":["file","path"]}}}},"responses":{"200":{"description":"Uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/uploadFileFromUrl":{"post":{"summary":"Upload a variant file from a URL","description":"Download a file from a public http(s) URL server-side and store it under the given path in the variant (up to 20 MB). Returns the stored file path and its CDN URL.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"filePath":{"type":"string"}},"required":["url","filePath"]}}}},"responses":{"200":{"description":"Uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"filePath":{"type":"string"},"url":{"type":"string"}},"required":["message","filePath","url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/uploadFileBase64":{"post":{"summary":"Upload a variant file as base64","description":"Store a base64-encoded file under the given path in the variant. Intended for small files (up to 5 MB decoded); for larger files use uploadFileFromUrl or the multipart uploadFile endpoint. Returns the stored file path and its CDN URL.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filePath":{"type":"string"},"fileContentBase64":{"type":"string","description":"Base64 content, with or without a data: URI prefix"},"contentType":{"type":"string"}},"required":["filePath","fileContentBase64"]}}}},"responses":{"200":{"description":"Uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"filePath":{"type":"string"},"url":{"type":"string"}},"required":["message","filePath","url"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/deleteFile":{"post":{"summary":"Delete a variant file","description":"Delete a single file from the variant (the variants/unpublished R2 scope).","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"fileName":{"type":"string"}},"required":["fileName"]}}}},"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/renameFile":{"post":{"summary":"Rename a variant file","description":"Rename/move a single file within the variant (the variants/unpublished R2 scope). Updates the index file reference when the entry file is renamed.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"filePath":{"type":"string"},"newFileName":{"type":"string"}},"required":["filePath","newFileName"]}}}},"responses":{"200":{"description":"Renamed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/translate/page":{"post":{"summary":"Translate a whole page with AI","description":"Start a durable AI translation job for the variant's saved draft. The agent rewrites every user-visible string in the page files into the target language and updates the page language, title and SEO settings. `destination` picks where the translation lands: `this_variant` edits the variant in place, `new_variant` clones it into a new variant of the same lander first, `new_lander` clones the whole lander and translates the matching variant there; `name` names the new variant or lander. Returns 202 with a `jobId` and the id of the variant being translated; the job runs to completion regardless of the client and cannot be cancelled. Poll translate/jobs/{jobId} on that variant until its status is success or failed, then reload the variant.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_lang":{"type":"string"},"model":{"type":"string"},"destination":{"type":"string","enum":["this_variant","new_variant","new_lander"],"default":"this_variant"},"name":{"type":"string","maxLength":250}},"required":["target_lang"]}}}},"responses":{"202":{"description":"Translation job started","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"variantId":{"type":"number"},"landerId":{"type":"number"},"destination":{"type":"string","enum":["this_variant","new_variant","new_lander"]},"status":{"type":"string","const":"pending"}},"required":["jobId","variantId","landerId","destination","status"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/translate/jobs/{jobId}":{"get":{"summary":"Get AI translation job status","description":"Status of a translation job started with translate/page. `variantId` is the id of the variant being translated (returned by translate/page). `pending` while the job runs, then `success` with the agent's summary and the version it produced, or `failed` with an error reason.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Translation job status","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["pending","success","failed"]},"workflowStatus":{"type":"string"},"variantId":{"type":"number"},"landerId":{"type":"number"},"messageId":{"type":"string"},"summary":{"type":["string","null"]},"version":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string"},"url":{"type":["string","null"]}},"required":["id","status","url"],"additionalProperties":false},{"type":"null"}]},"error":{"type":["string","null"]}},"required":["jobId","status","workflowStatus","variantId","landerId","messageId","summary","version","error"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/editors/{variantId}/translate/status":{"get":{"summary":"Get AI translation status","description":"Status of the most recent AI translation started for this variant: generating, finished or canceled, the agent's closing summary, and the version it produced.","tags":["Editor"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"variantId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Translation status","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"string"},"status":{"type":"string"},"targetLanguage":{"type":["string","null"]},"finishReason":{"type":["string","null"]},"summary":{"type":["string","null"]},"version":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"status":{"type":"string"},"url":{"type":["string","null"]}},"required":["id","status","url"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["messageId","status","targetLanguage","finishReason","summary","version","createdAt"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/get":{"get":{"summary":"List workspace landers","description":"Returns all landers in the workspace with computed preview URL and status.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of landers","content":{"application/json":{"schema":{"type":"object","properties":{"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"workspaceId":{"type":"number"},"published":{"type":"boolean"},"domainId":{"type":["number","null"]},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"previewURL":{"type":"string"},"status":{"type":"string"}},"required":["id","name","workspaceId","published","domainId","publishedAt","createdAt","updatedAt","previewURL","status"],"additionalProperties":false}}},"required":["landers"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/list":{"get":{"summary":"List workspace landers (slim)","description":"Lightweight lander listing: id, name, live/preview URLs and publish status.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Slim list of landers","content":{"application/json":{"schema":{"type":"object","properties":{"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"workspaceId":{"type":["number","null"]},"folderId":{"type":["number","null"]},"websiteId":{"type":["number","null"]},"published":{"type":"boolean"},"changesToBePublished":{"type":"boolean"},"status":{"type":"string"},"url":{"type":["string","null"]},"previewURL":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","workspaceId","folderId","websiteId","published","changesToBePublished","status","url","previewURL","publishedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["landers"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/lead-schema":{"get":{"summary":"Get lead JSON Schema for a lander","description":"Returns a Draft-07 JSON Schema describing all fields a lead from this lander can contain, including form fields, quiz answers, system fields, and active integration fields.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Lead JSON Schema","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/lead-schemas":{"get":{"summary":"Get lead JSON Schema for multiple landers","description":"Returns a Draft-07 JSON Schema for the leads collected across multiple landers. By default all fields are merged into a single object schema (later landers override earlier ones on key collision). Pass `union=true` to instead return a `oneOf` of per-lander schemas, each labeled by lander name.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated lander IDs"}},{"name":"union","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Lead JSON Schema","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/create":{"post":{"summary":"Create lander","description":"Create a new lander. If `templateId` is omitted, a default template is used. Optionally place the lander in a folder or attach it to a website.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":250},"templateId":{"type":"integer","description":"Optional — defaults to a built-in template"},"folderId":{"type":"integer"},"websiteId":{"type":"integer"}},"required":["name"]}}}},"responses":{"200":{"description":"Created lander","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/create/url":{"post":{"summary":"Create lander from URL","description":"Import an existing web page by URL and create a new editable lander from it. Rate limited to 25 imports per day per organization when called with an API key. Optionally place the lander in a folder","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the web page to import"},"name":{"type":"string","maxLength":250},"folderId":{"type":"integer"},"websiteId":{"type":"integer"}},"required":["url","name"]}}}},"responses":{"200":{"description":"Created lander","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Daily URL import limit reached (max 25 per day)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/update":{"put":{"summary":"Rename lander","description":"Rename an existing lander.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Updated lander","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/delete":{"delete":{"summary":"Delete lander","description":"Delete a lander and all of its variants, files, and integrations. If the lander is a website master, master is reassigned to another lander in the website when possible.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Lander deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/publish":{"post":{"summary":"Publish lander","description":"Publish a lander on the given domain and path. Returns 400 if plan limits are exceeded or the path is taken.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domainId":{"type":"integer"},"path":{"type":"string"}},"required":["domainId","path"]}}}},"responses":{"200":{"description":"Published","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/unpublish":{"post":{"summary":"Unpublish lander","description":"Unpublish a lander, removing it from its current domain.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Unpublished","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/clone":{"post":{"summary":"Clone lander","description":"Duplicate a lander as a new, separate page in the same workspace/folder. All of each variant's files (HTML, images, CSS, JS, fonts, videos, and any other assets) are copied into the new variant; URLs inside HTML files are rewritten to point at the copy, other files are copied as-is (relative references keep working). The clone is unpublished and auto-named. Ideal for creating a new page based on an existing one, e.g. translations.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Cloned lander","content":{"application/json":{"schema":{"type":"object","properties":{"lander":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"message":{"type":"string"}},"required":["lander","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/move-to-folder":{"post":{"summary":"Move landers to folder","description":"Move one or more landers into a folder. Fails if any lander belongs to a website. Returns a single `lander` when one id is passed, otherwise the full `landers` list.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"integer"},"landerIds":{"type":"array","items":{"type":"integer"}}},"required":["folderId","landerIds"]}}}},"responses":{"200":{"description":"Updated lander (single id) or full lander list (multiple ids)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"lander":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["lander"],"additionalProperties":false},{"type":"object","properties":{"landers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"workspaceId":{"type":"number"},"published":{"type":"boolean"},"domainId":{"type":["number","null"]},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"previewURL":{"type":"string"},"status":{"type":"string"}},"required":["id","name","workspaceId","published","domainId","publishedAt","createdAt","updatedAt","previewURL","status"],"additionalProperties":false}}},"required":["landers"],"additionalProperties":false}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/landers/{landerId}/remove-from-folder":{"post":{"summary":"Remove lander from folder","description":"Detach a lander from its folder (sets folderId to null). Returns 404 if the lander is not currently in a folder.","tags":["Landers"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"landerId","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Updated lander","content":{"application/json":{"schema":{"type":"object","properties":{"lander":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["lander"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/leads/get":{"get":{"summary":"List workspace leads","description":"Returns paginated leads for the workspace, each with the integrations it was sent to and its phone / email verification and OTP status. Supports filtering and search.","tags":["Leads"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"timezone","in":"query","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search query"},{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"},"description":"Max 1000"},{"name":"status","in":"query","schema":{"type":"string","enum":["partial","complete"]}},{"name":"orderBy","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"landerIds","in":"query","schema":{"type":"string"},"description":"JSON array of lander IDs"},{"name":"quizIds","in":"query","schema":{"type":"string"},"description":"JSON array of quiz IDs"}],"responses":{"200":{"description":"Paginated leads","content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"landerId":{"type":"number"},"variantId":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","label","value"],"additionalProperties":false}},"status":{"type":"string","enum":["complete","partial"]},"source":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"landerIntegrationId":{"type":["number","null"]},"name":{"type":["string","null"]},"typeName":{"type":["string","null"]},"success":{"type":"boolean"}},"required":["landerIntegrationId","name","typeName","success"],"additionalProperties":false}},"integrationsCount":{"type":"number"},"verification":{"type":"object","properties":{"phone":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"checkedAt":{"type":"string"}},"required":["input","verified","checkedAt"],"additionalProperties":false},{"type":"null"}]},"email":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"checkedAt":{"type":"string"}},"required":["input","verified","checkedAt"],"additionalProperties":false},{"type":"null"}]},"phoneOtp":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"sentCount":{"type":"number"},"attemptCount":{"type":"number"},"lastSentAt":{"type":["string","null"]},"lastAttemptAt":{"type":["string","null"]}},"required":["input","verified","sentCount","attemptCount","lastSentAt","lastAttemptAt"],"additionalProperties":false},{"type":"null"}]},"emailOtp":{"anyOf":[{"type":"object","properties":{"input":{"type":"string"},"verified":{"type":"boolean"},"sentCount":{"type":"number"},"attemptCount":{"type":"number"},"lastSentAt":{"type":["string","null"]},"lastAttemptAt":{"type":["string","null"]}},"required":["input","verified","sentCount","attemptCount","lastSentAt","lastAttemptAt"],"additionalProperties":false},{"type":"null"}]}},"required":["phone","email","phoneOtp","emailOtp"],"additionalProperties":false}},"required":["id","userId","landerId","variantId","data","status","source","createdAt","updatedAt","integrations","integrationsCount","verification"],"additionalProperties":false}},"totalCount":{"type":"number"},"totalPages":{"type":"number"},"hitsPerPage":{"type":"number"},"query":{"type":"string"}},"required":["leads","totalCount","totalPages","hitsPerPage","query"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v2/workspaces/{workspaceId}/domains/get":{"get":{"summary":"List workspace domains","description":"Returns all domains assigned to the workspace.","tags":["Domains"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"List of domains","content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"root_domain":{"type":"string"},"subdomain":{"type":"string"},"status":{"type":"string"},"default":{"type":"boolean"},"workspaceId":{"type":["number","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","root_domain","subdomain","status","default","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["domains"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key with ll_live_ prefix"}}}}