Step Two: Create a Document Template or Upload a Document

Navigate to our API Reference section ‘Templates’ section

Click the ‘Create a new document template by uploading file' as shown on the image below:

Replace the ‘Token’ text with your API key in the ‘Authorization’ field of 'Headers’

In the 'file' parameter of 'Body Params' paste the URL of your document (.pdf)

Click 'Try it'.
You will notice a 200 OK responce in the console below 'Try it' button, which indicates that your document request was successful.

Upload a Document Template via URL or local disk

Upload a file from your computer:

curl -X "POST" "https://api.pdffiller.com/v2/templates" \
     -H "Authorization: Bearer API_KEY_FROM_STEP1" \
     -F "[email protected]/path/to/file.pdf"

Upload a file via URL:

curl -X "POST" "https://api.pdffiller.com/v2/templates" \
     -H "Authorization: Bearer API_KEY_FROM_STEP1" \
     -H "Content-Type: application/json" \
     -d "{\"file\":\"http://site.com/file.pdf\"}"

A success response from the API will contain information about the created document template:

{
        "id": 1111111,
        "name": "file.pdf",
        "type": "pdf",
        "created": 1457373425,
        "updated": "1457345437",
        "status": "FINISHED",
        "fillable": "false",
        "folder": {
            "folder_id": "0",
            "name": "Unsorted"
        }
    }