post https://api.pandadoc.com/public/v1/documents//send
Using the Sandbox Key
When you use a sandbox API key during the free trial period, the sender and recipient email addresses must be from the same organisation (email domain).
Document State
- You can only send a document in the
document.draft
status. - After creating a new document, it usually retains a
document.uploaded
status for 3-5 seconds while the document syncs across PandaDoc servers. When the document is available for further API calls, it moves to thedocument.draft
state. Use Document Status or Webhooks to check document status. - Moving a document to the
document.sent
status finalizes the document structure, before recipients can complete it. - If a template used for the document creation has an approval workflow turned on, the sent document moves to the
document.waiting_approval
status. Once the document is approved, you need to make the call again to move the document todocument.sent
status.
Send and Silence Notifications
- By default, PandaDoc sends a
document.sent
notification email to the recipient as well as any internal notifications the sender has opted for. This can be bypassed by passingsilent: true
. Using this will suppress sent, viewed, comment and completed document notifications. This is useful when you are using alternative delivery methods such as linking to the document or embedding the document. - The
silent: true
parameter disables sent, viewed, comment and completed document email notifications. "Document Approval" notification won't be affected by this parameter. - When opting to send an email, passing the optional
message
attribute will result in an email like the following. At this time, you cannot customize the email beyond the user avatar. If you wish to perform any additional customization, we recommend generating view session links and using your own email distribution methods.
Select Approver from Group
If you have previously set up an approval workflow with selectable groups on the UI, you can select a particular approver from this group. Learn more about selectable groups.
To set an approver, we recommend to follow these steps:
- Run the Document Details request.
- Copy the
steps
part from theapproval_execution
section of the response into theselected_approvers
field of the Send Document payload. - Modify your payload according to business needs: set
is_selected
to true for one approver.
Note: You can change the selected approver only if you revert your document back to the
document.draft
status.