Before uploading a PDF, you need to create an empty contract and obtain its Contract Key. To do this, use the Create Contract request with the parameter "contractType": "pdf".

Here’s an example:

cURL
{
    "data": {
        "action": "create",
        "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:

cURL
formData.append('pdf', new Blob([pdfFile as BlobPart], {type: 'application/pdf'})) 

Where pdfFile is the ArrayBuffer of your document.

Body parameters

contractKey
string
required

ID of the contract.