# Update Landing Page — HubSpot

> Update a landing page in HubSpot. See the documentation

- Key: `hubspot-update-landing-page`
- Type: Action (Write)
- Version: 0.0.17
- App: HubSpot (`hubspot`) — https://pipedream.com/apps/hubspot.md
- This page (HTML): https://pipedream.com/apps/hubspot/actions/update-landing-page
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/hubspot/actions/update-landing-page/update-landing-page.mjs

## Description

Update a landing page in HubSpot. [See the documentation](https://developers.hubspot.com/docs/reference/api/cms/pages#patch-%2Fcms%2Fv3%2Fpages%2Flanding-pages%2F%7Bobjectid%7D)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `pageId` | `string` | Yes | The ID of the page to update. Options are loaded from the connected account. |
| `pageName` | `string` | No | The name of the page. |
| `landingFolderId` | `string` | No | The ID of the folder to create the landing page in. Options are loaded from the connected account. |
| `language` | `string` | No | The language of the page. |
| `enableLayoutStylesheets` | `boolean` | No | Whether to enable layout stylesheets. |
| `metaDescription` | `string` | No | The meta description of the page. |
| `attachedStylesheets` | `string[]` | No | The stylesheets attached to the page. |
| `password` | `string` | No | The password of the page. |
| `publishImmediately` | `boolean` | No | Whether to publish the page immediately. |
| `htmlTitle` | `string` | No | The HTML title of the page. |
| `translations` | `object` | No | The translations of the page. |
| `layoutSections` | `object` | No | The layout sections of the page. |
| `footerHtml` | `string` | No | The footer HTML of the page. |
| `headHtml` | `string` | No | The head HTML of the page. |
| `templatePath` | `string` | No | The template path of the page. Options are loaded from the connected account. |
| `widgetContainers` | `object` | No | A data structure containing the data for all the modules inside the containers for this page |
| `widgets` | `object` | No | A data structure containing the data for all the modules for this page |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "hubspot",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "hubspot-update-landing-page",
  arguments: {
    pageId: "Landing Page ID",
    pageName: "Page Name",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "hubspot-update-landing-page",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    hubspot: { authProvisionId: "apn_xxxxxxx" },
    pageId: "Landing Page ID",
    pageName: "Page Name",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "hubspot-update-landing-page",
    "configured_props": {
      "hubspot": { "authProvisionId": "apn_xxxxxxx" },
      "pageId": "Landing Page ID",
      "pageName": "Page Name"
    }
  }'
```

---

- App: https://pipedream.com/apps/hubspot.md · All apps: https://pipedream.com/apps
