Availability: Enterprise*
* Additional volume charge will be applied for document generation via production API.
These instructions assume:
You have authenticated via OAuth (see Authentication process) or have an API key (see API key authentication process)
Create the original PDF
If you want to include PandaDoc native elements such as signature or text fields in your PDF-derived document, you’ll need to use either the PDF native form fields structure or add manual field tags to the PDF.
An example of form fields or field tags is available here.
You can read more about the structure and respective benefits of form fields versus field tags in the Create document from PDF documentation. If you choose to use form fields, make sure you set "parse_form_fields": true; otherwise set "parse_form_fields": false.
Once you’ve finalized your PDF, you’re ready for the next step.
POST the document to PandaDoc
To inform PandaDoc to ingest and parse your PDF, use the following with content type multipart/form-data:
You should have two sections within your POST. First, the encoded content of your PDF file itself:
Second, a JSON block to identify the document:
The response will contain the document ID as the element “id”:
Wait for the document to enter draft status
See Listening for changes in document status. If you’re actively polling your document, the ID is “id” from the previous step.
Send the document
Once you’ve determined that the document has entered “document.draft” status, you can send it by adding the following ({id} is the document ID from above):
You can also include these optional parameters in your POST to set a subject line and body text:
Don’t set the “silent” parameter to “true” unless you don’t want an email to go out with the document link. For more information about why you might want to send silently, see “Create a document and share it in real-time.”
Note: When sending documents via API, the sender is the person who generated the API key, even if the document was created on another member’s behalf. You can set up a different document sender by adding an email address or membership_id to the "Send document" body request.