Check out our complete how-to-guides, documentation, and resources below

Empowering developers to build document workflows in minutes.

Create from template

This recipe assumes:

Locate your template ID

In the PandaDoc app navigate to the template you would like to use for this particular document. When you are viewing the template the ID is the final part of the URL. For example, in
https://app.pandadoc.com/a/#/templates/ustHNnVaPCD6MzuoNBbZ8L the template ID is “ustHNnVaPCD6MzuoNBbZ8L”

Structure your Document details

Use the create document endpoint description to decide what metadata and details you need to pass to your document. The simplest possible document schema consists of a name, template ID, and at least one recipient. Include your template ID under “template_uuid”

{ 
 "name": "My minimal document",
 "template_uuid": "ustHNnVaPCD6MzuoNBbZ8L",
 "recipients": [
  {
   "email":"[email protected]"
  }
 ]
}

Create the Document

Using your authentication token or API key, and the content-type application/json
POST https://api.pandadoc.com/public/v1/documents
The response will contain the document ID as the element “id”

{
  "id":"XHjv8z3SfDuTseFSnhprML",
  "name":"My minimal document",
  "Status":"document.uploaded",
  "date_created":"2021-07-05T15:05:27.787341Z",
  "date_modified":"2021-07-05T15:05:27.787341Z",
  "Expiration_date":null,
  "Version":null,
  "uuid":"XHjv8z3SfDuTseFSnhprML"
}

Wait for the Document to enter draft status

See Listening for changes in document status. If you are actively polling your document 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 with a
POST https://api.pandadoc.com/public/v1/documents/{id}/send
Where {id} is the document ID from above. If you want you can include the optional parameters in your POST to set a subject line and body text

{
  "message": "Hello! This document was sent from the PandaDoc API.",
  "subject": "Please check this test API document from PandaDoc"
}

Do not 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”

Updated 2 months ago

Create from template


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.