> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# Envelope and Template Documents

> Learn about document objects, how they fit into the eSignature workflow, and about commonly-used document functionality.

## Envelope and Template Documents

A *document* is an object that contains a digital document file and a set of metadata describing that document file. A document file contains content to be reviewed or signed by one or more [recipients](/docs/esign-rest-api/esign101/concepts/recipients). Documents are always defined as part of the `documents` property in an  [envelope](/docs/esign-rest-api/esign101/concepts/envelopes)  or a [template](/docs/esign-rest-api/esign101/concepts/templates), and are always securely encrypted while stored in the system.

> **Note**
>
> For examples of how to work with documents using the API, see [How to add a document to an envelope and request a signature by email](/docs/esign-rest-api/how-to/request-signature-email-remote).

Document files can be supplied through client devices, cloud storage systems, or additional document sources. Docusign accepts almost all document types, including PDF, DOCX, RTF, TXT, and PNG, and you can store multiple documents in a single envelope.

When you add a document file to an envelope, the Docusign platform converts it to PDF and stores it as base64-encoded ASCII.

## Supported document file types

You can use the following types of files as documents in an envelope. File types are ordered by category below for organizational purposes, but are accepted and output by the API in the same way, regardless of category.

| Document category | File type                                                                               |
| ----------------- | --------------------------------------------------------------------------------------- |
| Document          | .doc, .docm, .docx, .dot, .dotm, .dotx, .htm, .html, .msg, .pdf, .rtf, .txt, .wpd, .xps |
| Image             | .bmp, .gif, .jpg, .jpeg, .png, .tif, .tiff                                              |
| Presentation      | .pot, .potx, .pps, .ppt, .pptm, .pptx                                                   |
| Spreadsheet       | .csv, .xls, .xlsm, .xlsx                                                                |

> **Warning**
>
> If HTML document files contain `<img>` elements with the `src` attribute set to a path or URL, those images will not be displayed. Images in HTML files must be encoded in Base64 format, as shown in the example below:

```text
<img src="data:image/gif;base64,R0lGODlhDwAPAKECAAAAzMzM/////
wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4ML
wWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw=="
alt="Base64 encoded image" width="150" height="150"/>
```

## Attaching documents to an envelope

There are two ways to attach documents to envelopes:

* Converting the documents to base64 and attaching them to a single object
* Using multipart form data to send the documents directly, without converting them into base64

The second technique, also known as *binary transfer,* is 33% more efficient than base64 encoding and is recommended for all documents that are larger than 15MB. See [How to attach documents via binary transfer](/docs/esign-rest-api/how-to/send-binary) for a walkthrough of using binary transfer to add documents to an envelope before sending it for signing via email (remote signing).

> **Note:** Binary transfer is not yet supported by any of the Docusign SDKs. It can only be performed via direct API calls.

## Downloading completed documents and tag data

For client applications that are not using Connect to receive events from Docusign, Docusign recommends using  and [getDocuments](/docs/esign-rest-api/reference/envelopes/envelopedocuments/get) calls. When using `getEnvelope`, if you need additional data such as recipient or tab data, you can combine it into a single call using the URL parameter `"Include="`. See the documentation for a full list of items that can be fetched in a single call. When fetching documents, we recommend that you get documents as a ZIP file (using the Archive endpoint `/envelopes/{envelopeId}/documents/archive`), as this is the quickest and most efficient call. Clients should not get document and recipient data one at a time in a recursive loop.

## Next steps

Read about important document features:

* [Document generation](/docs/esign-rest-api/esign101/concepts/documents/document-generation)
* [Purging documents](/docs/esign-rest-api/esign101/concepts/documents/purging)
* [Authoritative copies](/docs/esign-rest-api/esign101/concepts/documents/authoritative-copies)
* [Attachments](/docs/esign-rest-api/esign101/concepts/documents/attachments)
* [Supplemental documents](/docs/esign-rest-api/esign101/concepts/documents/supplemental)

Working with documents? Learn:

* [How to add a document to an envelope and request a signature by email](/docs/esign-rest-api/how-to/request-signature-email-remote)
* [How to request a signature by email with document generation](/docs/esign-rest-api/how-to/request-signature-email-document-generation)
* [How to attach documents via binary transfer](/docs/esign-rest-api/how-to/send-binary)
* [How to download envelope documents](/docs/esign-rest-api/how-to/download-envelope-documents)
* How to work with the [EnvelopeDocuments](/docs/esign-rest-api/reference/envelopes/envelopedocuments) resource