Create Landing Page
Create a new landing page for the creator, attached to an existing mango.
- The authenticated creator must own the referenced
mango. - Only one non-root landing page is allowed per (creator, mango). A
409 Conflictis returned if one already exists; usePUT /external/landing-pages/:landingPageIdto modify it. editorStateis uploaded to S3 as a JSON file; the document stores the URL.- Root-level landing pages cannot be created through this endpoint.
AI generation: when aiPrompt is provided, editorState and templateData may be omitted. The response returns immediately with aiGeneration.status = "pending"; poll GET /external/landing-pages/:landingPageId until status flips to completed or failed.
Authorization
bearer In: header
Header Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://api-prod-new.tagmango.com/api/v1/external/landing-pages" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "mango": "66c4964c11e7fef26751f3a7" }'{
"_id": "66a1390268a76f2f5c9f39a3",
"creator": "77b2390268a76f2f5c9f39a4",
"mango": "88c3490268a76f2f5c9f39a5",
"editorState": "https://cdn.tagmango.com/websites/editor-state-abc123.json",
"publishedLink": "https://landing.example.com/my-page",
"isPublished": false,
"lastPublishedOn": "2024-08-11T10:20:30Z",
"lastSavedOn": "2024-08-11T10:20:30Z",
"title": "My Landing Page",
"description": "A page to showcase my course",
"customSlug": "my-landing-page",
"templateData": {},
"isAdvanced": false,
"customHeaderTags": "<meta name=\"robots\" content=\"index\" />",
"customBodyTags": "<script>console.log(\"loaded\");</script>",
"customCTALink": "https://example.com/checkout",
"isContentBox": false,
"isRootPage": false,
"host": "example.tagmango.com",
"grapesjsFormatVersion": "v2",
"aiGeneration": {
"status": "pending",
"jobId": "string",
"prompt": "string",
"niche": "string",
"objective": "string",
"brandColor": "string",
"error": "string",
"startedAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"aim": "string",
"theme": {},
"totalSections": 0,
"completedSections": 0,
"sections": [
{
"index": 0,
"element": "string",
"description": "string",
"html": "string",
"status": "pending",
"error": "string",
"completedAt": "2019-08-24T14:15:22Z"
}
],
"failedSections": [
"string"
]
},
"createdAt": "2024-08-11T10:20:30Z",
"updatedAt": "2024-08-11T10:20:30Z"
}{
"code": 400,
"type": "Bad request",
"statusMessage": "BAD_REQUEST",
"message": "Invalid request",
"success": false
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"success": false
}Update App Configurations PATCH
Update app configurations for host. - This endpoint can be used to update app configurations for a host. - It can be used to update allowed mangoes for an app. :::warning - Currently only supports these apps levelup, universe, crm, flute, sparks, tm-ai-cofounder. - These apps must be installed to the dashboard first before accessing this endpoint. - Any custom app added from Dashboard will not be supported. - Passing empty array will remove all allowed mangoes for the app, so update the allowed mangoes carefully. :::
Get Landing Page by ID GET
Fetch a single landing page owned by the authenticated creator. Use this to poll `aiGeneration.status` after a create call with `aiPrompt`. Returns 404 if the page does not exist or is owned by a different creator.