DocuSign icon

DocuSign

Interact with the DocuSign eSignature REST API v2.1 — complete enterprise coverage

Actions341

Envelope HTML Definition → Get Document

AI-generated

Summary

Retrieves the HTML definition of a specific document within an envelope.

Inputs

  • authentication — OAuth2 or JWT authentication method to use for the request.
  • accountId (required) — DocuSign Account ID (GUID) where the envelope resides.
  • envelopeId (required) — ID (GUID) of the envelope containing the document.
  • documentId (required) — Numeric ID of the document to retrieve; defaults to "1".

Output shape

a single document object representing the HTML definition of the specified document.

The response includes document metadata such as documentId, name, and HTML content; fields may be omitted if not set.

Examples

Example 1: Fetch the HTML for document 2 in envelope 12345 using OAuth2.

authentication: OAuth2, accountId: 12345678-90ab-cdef-1234-567890abcdef, envelopeId: 12345678-90ab-cdef-1234-567890abcdef, documentId: 2

Example 2: Get the HTML definition of the first document in an envelope using JWT authentication.

authentication: JWT, accountId: 87654321-9876-5432-1098-7654321fedcb, envelopeId: 87654321-9876-5432-1098-7654321fedcb, documentId: 1

Example 3: Retrieve document 3's HTML definition from a envelope in the 'templates' category.

authentication: OAuth2, accountId: abcdef12-3456-7890-abcd-ef1234567890, envelopeId: abcdef12-3456-7890-abcd-ef1234567890, documentId: 3

Links

Discussion