The DocuSign eSignature REST API can return a completed envelope's signed documents and its Certificate of Completion (CoC) as a single PDF through one endpoint: GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/combined. Because the certificate=true query parameter is the default behavior for that call, the CoC is appended to the end of the combined PDF automatically. If you set certificate=false, the API strips the certificate out and returns only the signed documents. No manual PDF merging is required for the standard archive workflow.
If you need the certificate on its own, call GET .../documents/certificate to download just the CoC, or call GET .../documents/archive to receive a ZIP file containing every envelope document as a separate PDF plus the certificate. The rest of this guide walks through each option, the parameters that change what you get back, and the pitfalls that trip up most teams building compliant archives.
The Three Ways DocuSign Returns Envelope Documents
All three retrieval patterns use the same endpoint, GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}. What changes is the special value you pass as {documentId}. Use this table to pick the right one before writing any code.
Two prerequisites apply to every row in the table. First, the envelope must have reached completed status — the CoC does not exist while any recipient is still outstanding, and the certificate endpoint will fail for in-progress envelopes. Second, you authenticate with an OAuth access token and use the base URI assigned to your account (for example, the demo environment or your production regional data center), which you retrieve from the OAuth userinfo call rather than hard-coding.
Getting the Combined PDF with the Certificate of Completion
This is the pattern most teams want: one HTTP call, one PDF, certificate included. A minimal curl request looks like this:
```bash
curl --request GET \
"{BASE_URL}/v2.1/accounts/{ACCOUNT_ID}/envelopes/{ENVELOPE_ID}/documents/combined" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--output envelope_combined.pdf
```
The equivalent Python snippet with requests:
```python
import requests
url = f"{base_url}/v2.1/accounts/{account_id}/envelopes/{envelope_id}/documents/combined"
headers = {"Authorization": f"Bearer {access_token}"}
response = requests.get(url, headers=headers)
response.raise_for_status()
with open("envelope_combined.pdf", "wb") as f:
f.write(response.content)
```
Because certificate=true is the default, the file you save already contains the signed documents followed by the CoC pages. To exclude the certificate, append the query string explicitly:
```
GET .../documents/combined?certificate=false
```
Before saving the response body, check that the Content-Type header is application/pdf. On errors, DocuSign returns a JSON error object instead of binary data, and writing that JSON to a .pdf file produces a corrupt archive that fails silently downstream. Also confirm response.status_code == 200 and that the body starts with %PDF if you want a cheap integrity check.
Retrieving the Certificate of Completion Separately
Some compliance workflows keep the CoC as a standalone evidence file, stored alongside — but outside — the signed contract. For that, swap the document ID:
```
GET /v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/certificate
```
The certificate is a generated PDF that records the envelope events: who was sent the document, when each recipient viewed and signed, authentication methods used, IP addresses, and timestamps. That event history is what makes the certificate function as an audit trail — if you want a deeper breakdown of what each field on the CoC means and how it holds up as evidence, see our guide to the DocuSign Certificate of Completion and audit trail.
When you fetch the certificate (either standalone or inside the combined PDF), you can control its display language with the language query parameter, using values such as en or zh_CN. This matters for cross-border envelopes where a regulator or counterparty expects the evidence file in a specific language.
The archive option deserves a note here too. It returns a ZIP in which each envelope document is an individual PDF and the CoC ships as its own file. Choose archive over combined when your document management system indexes exhibits separately, or when individual documents are large enough that a single merged PDF becomes unwieldy.
Common Pitfalls When Archiving Signed Envelopes
Requesting before completion. The single most common failure is polling for the certificate while the envelope is still sent or delivered. Gate the retrieval call on envelope status, or better, subscribe to DocuSign Connect webhooks and trigger your download when an envelope-completed event arrives. Webhooks remove the polling loop entirely and give you near-real-time archiving.
Assuming the certificate is always attached. Teams that copy a snippet containing certificate=false — or that switch between combined and archive without checking — end up with archive PDFs missing their evidence pages. Make the parameter explicit in your code, even when you want the default, so the intent survives the next refactor.
Trusting the file extension instead of the payload. Error responses come back as JSON. Validate the Content-Type header and the %PDF magic bytes before persisting anything to long-term storage.
Ignoring downstream tamper evidence. A combined PDF is only useful as evidence if it remains intact after download. Hash the file (SHA-256) at ingestion and store the hash with your archive metadata. If you are unsure what protections a signed PDF carries and whether edits are possible after signing, read whether a signed document can be modified after signing — it explains how signature validation detects post-signing changes. When you later need to prove the file is untouched, knowing how to validate a signature in a PDF closes the loop.
Losing the envelope-to-archive mapping. Store envelopeId, account ID, retrieval timestamp, and the exact endpoint variant you used alongside the file. Six months later, during an audit, that metadata is the difference between a five-minute lookup and a forensic rebuild.
Implementation Checklist for Compliant Archiving
Use this checklist when wiring DocuSign retrieval into a production pipeline:
- [ ] Authenticate with OAuth and resolve the account's base URI dynamically
- [ ] Trigger retrieval on a Connect
envelope-completedwebhook, not a timer - [ ] Verify envelope
statusequalscompletedbefore calling the documents endpoint - [ ] Call
GET .../documents/combinedwithcertificate=truestated explicitly (orarchiveif your records system needs separate files) - [ ] Assert
Content-Type: application/pdf(orapplication/zip) and a 200 status before saving - [ ] Set
languagewhen the certificate must render in a non-default language - [ ] Compute and store a SHA-256 hash of the archived file at ingestion
- [ ] Persist envelope metadata (envelope ID, timestamp, endpoint variant) with the file
- [ ] Apply your retention policy and access controls to the archive store
- [ ] Rehearse retrieval of a random archived envelope quarterly to prove the archive is readable
If your team is evaluating the cost side of this workflow — envelope volumes, API plan tiers, and how retrieval fits your agreement — our breakdown of the cost of DocuSign covers the pricing angles that affect API-heavy integrations.
Automating Signed-Document Archiving at Scale: Nota Sign
If you are building this retrieval-and-archive pipeline because your organization signs at volume across borders, it is worth asking whether the pipeline itself should be someone else's problem. Nota Sign is FaDaDa's global electronic signature platform — FaDaDa has been ranked #1 in China's e-signature software market by IDC for consecutive years — and it covers legal validity in more than 100 countries and regions, with deep APAC compliance support including iAM Smart, Singpass, SES/AES/QES signature levels, and regional data centers. Completed envelopes, certificates, and audit evidence are designed to be retrieved and archived through the platform's electronic signature product, without you hand-maintaining webhook consumers and PDF validators.
On commercial terms, Nota Sign charges no per-seat fees, which keeps it friendly for small teams, while mid-market and enterprise buyers can get customized plans matched to their volume and compliance requirements. If you want to see how retrieval, archiving, and cross-border compliance work in practice, talk to the Nota Sign team.









