# insertpdfpages: Insert Pages into PDF

> insertpdfpages (Insert Pages into PDF) is a 1001fx API function in the group Files & PDF: POST https://api.1001fx.com/files/insertpdfpages, 3 credits per call. It works as a ready-made module in Make or as a plain HTTP call.

Inserts all or selected pages of a second PDF into a PDF at any position (beginning, after a page, end). Returns the PDF.

- Group: Files & PDF
- Endpoint: `POST https://api.1001fx.com/files/insertpdfpages`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: multipart/form-data
- Credits: 3 credits per call
- Ready-made in: Make
- Docs: https://1001fx.com/functions/insertpdfpages

## Parameters

- `file` (file, optional) – File: The PDF to insert into. Either file or fileUrl.
- `fileUrl` (string, optional) – File URL: Public URL of the PDF to insert into. Either file or fileUrl.
- `insertFile` (file, optional) – File: The PDF whose pages are inserted. Either insertFile or insertFileUrl.
- `insertFileUrl` (string, optional) – File URL: Public URL of the PDF whose pages are inserted. Either insertFile or insertFileUrl.
- `insertPages` (string, optional) – Pages: Pages of the inserted PDF, e.g. 1-2 (first page = 1). Empty: all pages.
- `afterPage` (number, optional) – After page: Insert after this page; 0 = at the beginning. Empty: at the end.

## Example: Insert Pages into PDF

```bash
curl -X POST 'https://api.1001fx.com/files/insertpdfpages' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'
```
