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

# Adding Pages Programmatically

> Fire the clone-page event with a page index or page ID to duplicate a page in the editor from your own code

To add a page programmatically we make use of the *clone-page* event.

app.events.fire('clone-page', pageNum);

PageNum is actually the index of the page that should be cloned, a page ID can also be used instead of page index.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.