TagMangoTagMango Docs
Landing Page

Update Landing Page

PUT
/api/v1/external/landing-pages/{landingPageId}

Update an existing landing page owned by the authenticated creator.

  • Only the page owner can update; otherwise returns 404.
  • When editorState is provided, it is re-uploaded to S3 and the stored URL is updated.
  • customSlug must be unique within the host. A 400 Bad Request is returned on conflict.
  • The mango binding is immutable via this endpoint — delete and recreate if it must change.
AuthorizationBearer <token>

In: header

Path Parameters

landingPageId*string

Landing page id

Header Parameters

x-whitelabel-host*string

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 PUT "https://api-prod-new.tagmango.com/api/v1/external/landing-pages/66c4964c11e7fef26751f3a7" \  -H "x-whitelabel-host: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "_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
}