> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# insertNotePage

> Insert a new page into a note file.

```ts wrap theme={null}
static insertNotePage(params: { notePath: string; page: number; template: string }): Promise<APIResponse<boolean>>;
```

**Parameters**

| Parameter         | Type     | Description                    |
| ----------------- | -------- | ------------------------------ |
| `params.notePath` | `string` | Note file path                 |
| `params.page`     | `number` | Page number (starts from `0`)  |
| `params.template` | `string` | Template name for the new page |

**Returns**

* [`APIResponse<boolean>`](/en/api-reference/supernote-plugin/types/api-response):
  `result === true` indicates the insertion succeeded

## Example

```ts wrap theme={null}
import { PluginFileAPI } from 'sn-plugin-lib';

/**
 * Insert new page example.
 */
export async function exampleInsertNotePage() {
 const res = await PluginFileAPI.insertNotePage({
 notePath: '/storage/emulated/0/Note/demo.note',
 page: 2,
 template: 'style_blank',
 });

 if (!res.success) {
 throw new Error(res.error?.message ?? 'insertNotePage call failed');
 }
 return res.result;
}
```
