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

# Upload PDF

> Upload a PDF file as a new contract with the Sendforsign API, then place placeholders and send it for signing.

Before uploading a PDF, you need to create an empty contract and obtain its Contract Key.
To do this, use the [Create Contract](https://sendforsign.com/docs/api-reference/contract/create.md)
request with the parameter `"contractType": "pdf"`.

Here's an example:

```bash cURL theme={null}
{
    "data": {
        "action": "create",
        "clientKey": "YOUR_CLIENT_KEY",
        "contract": {
            "name": "Your PDF name",
            "contractType": "pdf"
        }
    }
}
```

As a response, you'll receive a ContractKey for the contract you created.
Use this key to upload your PDF to Sendforsign's infrastructure.

Additionally, you will need to include FormData in the body of the request.

For example:

```bash cURL theme={null}
-F 'pdf=@/path/to/yourfile.pdf;type=application/pdf'
```

Or in typescript:

```bash ts theme={null}
formData.append('pdf', new Blob([pdfFile as BlobPart], {type: 'application/pdf'})) 
```

Where `pdfFile` is the ArrayBuffer of your document.

### Query parameters

**clientKey** `string` *required*

Key of the client.

**contractKey** `string` *required*

Key of the contract.

```bash cURL theme={null}
curl -X POST 'https://api.sendforsign.com/api/upload_pdf?clientKey=658599d9-bbbe&contractKey=5cb-49c6-4f62-9b77-5c304' \
     -H 'X-Sendforsign-Key: YOUR_API_KEY' \
     -H 'Content-Type: multipart/form-data' \
     -F 'pdf=@/path/to/yourfile.pdf;type=application/pdf'
```


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