Download a completed document
This recipe assumes that:
- You have authenticated via OAuth (see Authentication process) or have an API key (see API key authentication process)
Configure your event listener
To create a new Pandadoc webhook:
- Open https://app.pandadoc.com/a/#/api/configuration
- Use the “Create webhook” button in the Webhooks section

Create webhook
- Give your webhook a friendly name that you will remember
- Add your listener URL to the Webhook Endpoint URL field.
- Check “Document state changed” under the “Subscribe to events” section
- Optionally, use other features offered in the webhook configuration that are described outside the scope of this recipe.
- Save your changes when you are finished.

Create webhook
Capture Document ID from “completed” event
When your document changes status, you’ll get a postback from the webhook containing a status
item:
{
"data": {
"id": "tKoqk92d2jiVuxUQH8i9iB",
...
}
...
"status": "document.completed",
...
}
When the status changes to document.completed
, you can proceed to download your document.
It’s important to wait for the document status to change to
completed
rather than use therecipient_completed
event becauserecipient_completed
occurs multiple times for documents with multiple recipients.
Download Document
Using the ID from the webhook above, you can leverage the document download endpoint to retrieve your completed document.
GET https://api.pandadoc.com/public/v1/documents/{id}/download
where {id} is from the webhook.
Updated 4 months ago