> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Switch to a page

## `webflow.switchPage(page)`

Switch the Designer to a specified page.

### Syntax

```typescript
webflow.switchPage(page: Page): Promise<null>
```

### Parameters

**`page`** :   *Page* - The page to switch to.

### Returns

**Promise\<`null`>**

A Promise that resolves to `null` when the page switch is complete.

### Example

```typescript
// Get All Pages and Folders
const pagesAndFolders = await webflow.getAllPagesAndFolders()
const pages = pagesAndFolders?.filter((i): i is Page => i.type === "Page")

// Switch Page
const newPage = pages[2]
await webflow.switchPage(newPage)
```

[Try this example](https://webflow.com/oauth/authorize?response_type=code\&client_id=19511de1ec410f9228d8dcbc9420e67916dea80d86d18f0c9a533eb475ea0f62)

### Switching to a branch page

Branch pages are regular pages internally, so you can pass a branch page to `switchPage()` to navigate to a branch.
Use [`page.listBranches()`](/designer/reference/list-branches) to discover available branches and [`page.getParentPageId()`](/designer/reference/get-parent-page-id) to navigate back to the main page.

### Designer Ability

Checks for authorization only

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | Any    | Any    | Any      | Any      |