Skip to content

DocuSign: Retrieves the HTML definition used to generate a dynamically sized responsive document

DocuSign esignature.esignatureResponsiveHtmlGetEnvelopeDocumentHtmlDefinitions: arguments, response, policy and SDK examples.

← Esignature operations · Get started

Operation docusign.esignature_responsivehtml_getenvelopedocumenthtmldefinitions

Provider route: GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/html_definitions. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/docusign with npm, or alter-sdk-docusign with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { DocuSignIntegration } from "@alter-ai/docusign";
async function execute(input: Parameters<DocuSignIntegration["esignature"]["esignatureResponsiveHtmlGetEnvelopeDocumentHtmlDefinitions"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new DocuSignIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.esignature.esignatureResponsiveHtmlGetEnvelopeDocumentHtmlDefinitions(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_docusign import DocuSignIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = DocuSignIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.esignature.esignature_responsive_html_get_envelope_document_html_definitions(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.accountIdstringRequired within parent
path.documentIdstringRequired within parent
path.envelopeIdstringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieves the HTML definition used to generate a dynamically sized responsive document — response body

Referenced models: Retrieves the HTML definition used to generate a dynamically sized responsive document — response body

1 more schema is linked from the tables above, on the schema pages.

Retrieves the HTML definition used to generate a dynamically sized responsive document — response body
FieldTypePresenceDescription and constraints
$objectRoot
htmlDefinitionsarrayOptionalHolds the properties that define how to generate the responsive-formatted HTML for the document.
htmlDefinitions[]ModelEach itemExpand Retrieves the HTML definition used to generate a dynamically sized responsive document — response body — html Definitions item

Referenced models: Retrieves the HTML definition used to generate a dynamically sized responsive document — response body — html Definitions item

Retrieves the HTML definition used to generate a dynamically sized responsive document — response body — html Definitions item
FieldTypePresenceDescription and constraints
$objectRoot
documentIdstringOptionalSpecifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
documentIdGuidstringOptionalThe GUID of the document.
htmlDefinitionModelOptionalExpand Gets a specific template associated with a specified account — response body — documents item html Definition
Defines how to generate the responsive-formatted HTML for the document.

Referenced models: Gets a specific template associated with a specified account — response body — documents item html Definition

Gets a specific template associated with a specified account — response body — documents item html Definition
FieldTypePresenceDescription and constraints
$objectRootHolds the properties that define how to generate the responsive-formatted HTML for the document.
See [Responsive signing](/docs/esign-rest-api/esign101/concepts/responsive/)
in the [eSignature concepts guide](/docs/esign-rest-api/esign101/concepts/).
displayAnchorPrefixstringOptionalContains text that all display anchors must start with. Using at least four characters will improve anchor processing performance.
displayAnchorsarrayOptionalAn object that defines how to handle a section of the HTML in signing. This property enables an incoming request to make a section of the HTML collapsible and expandable or hidden from view.

A start anchor, end anchor, or both are required.
If the anchors are not found, the display anchor will be ignored.

For a list of the available types, see the
[`display` property](/docs/esign-rest-api/reference/envelopes/envelopes/create/#schema__envelopedefinition_documents_htmldefinition_displayanchors_displaysettings_display)
of the
[`displaySettings` object.](/docs/esign-rest-api/reference/envelopes/envelopes/create/#schema__envelopedefinition_documents_htmldefinition_displayanchors_displaysettings)
displayAnchors[]ModelEach itemExpand Gets a specific template associated with a specified account — response body — documents item html Definition display Anchors item
displayOrderstringOptionalThe position on the page where the display section appears.
displayPageNumberstringOptionalThe number of the page on which the display section appears.
documentGuidstringOptionalThe GUID of the document.
documentIdstringOptionalSpecifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
headerLabelstringOptionalHeader text or an HTML tag to place above the responsive HTML block.
maxScreenWidthstringOptionalIf set, the responsive HTML version of the signing document will only display on screens with the specified pixel width or less. If the screen is larger than the value that you specify, the default PDF version of the content displays instead.

This setting can also be configured at the account level.
removeEmptyTagsstringOptionalHolds a comma-separated list of HTML tags to remove if they have no text within their node (including child nodes).
showMobileOptimizedTogglestringOptionalWhen **true** (the default), the **Mobile-Friendly** toggle displays at the top of the screen on the user's mobile device. When **false,** the toggle will not be displayed.

the **Mobile-Friendly** toggle lets the user switch between the mobile-friendly and the PDF versions of a document. For example, the recipient can use this toggle to review the document using the PDF view before they finish signing.
sourcestringOptionalSpecifies the type of responsive signing that will be used with the document.

If the value of this property is valid HTML,
and the [smart sections feature][] is enabled,
the HTML code is used to display the signing page:

```
source: "<html> ... <body><p>hello world</p></body></html>"
```

If the value of this property is the string `document`,
the HTML signing page is generated from the provided document.

```
source: "document"
```

**Related topics**

- [How to create a signable HTML document](/docs/esign-rest-api/how-to/creating-signable-html/)
- [How to convert a PDF file into a signable HTML document](/docs/esign-rest-api/how-to/converting-pdf/)
- [Responsive signing](/docs/esign-rest-api/esign101/concepts/responsive/)


[smart sections feature]: https://support.docusign.com/s/document-item?bundleId=gbo1643332197980&topicId=qlx1578456478178.html

Referenced models: Gets a specific template associated with a specified account — response body — documents item html Definition display Anchors item

Gets a specific template associated with a specified account — response body — documents item html Definition display Anchors item
FieldTypePresenceDescription and constraints
$objectRoot
caseSensitivebooleanOptionalWhen **true,** the start or end anchor strings must match the strings specified by the start and end anchor settings in case as well as in content.
displaySettingsModelOptionalExpand Gets a specific template associated with a specified account — response body — documents item html Definition display Anchors item display Settings
This object defines how the HTML section inside the `startAnchor` and `endAnchor` displays.
endAnchorstringOptionalSpecifies the end of the area in the HTML where the display settings will be applied. If you do not specify an end anchor, the end of the document will be used by default.

**Note:** A start anchor, an end anchor, or both are required.
removeEndAnchorbooleanOptionalWhen **true,** removes the end anchor string for the Smart Section from the HTML, preventing it from displaying.
removeStartAnchorbooleanOptionalWhen **true,** removes the start anchor string for the Smart Section from the HTML, preventing it from displaying.
startAnchorstringOptionalSpecifies the beginning of the area in the HTML where the display settings will be applied. If you do not specify a start anchor, the beginning of the document will be used by default.

**Note:** A start anchor, an end anchor, or both are required.

Referenced models: Gets a specific template associated with a specified account — response body — documents item html Definition display Anchors item display Settings

Creates a preview of the responsive version of a document — request body — body display Anchors item display Settings collapsible Settings
FieldTypePresenceDescription and constraints
$objectRootDisplay settings for collapsible section.
arrowClosedstringOptionalIndicates the direction of the disclosure arrow
when the collapsible section is in the closed state.

One of the following:

- `up`: In the closed state, the disclosure arrow points up.
- `down`: In the closed state, the disclosure arrow points down.
- `left`: In the closed state, the disclosure arrow points left.
- `right`: In the closed state, the disclosure arrow points right.
arrowColorstringOptionalA CSS color value (such as `#DCF851`) that indicates the color of the arrow.
arrowLocationstringOptionalThe location of the arrow relative to the collapsible section's label. Possible values are:

- `right` (default)
- `left`
arrowOpenstringOptionalIndicates the direction of the disclosure arrow
when the collapsible section is in the open state.

One of the following:

- `up`: In the open state, the disclosure arrow points up.
- `down`: In the open state, the disclosure arrow points down.
- `left`: In the open state, the disclosure arrow points left.
- `right`: In the open state, the disclosure arrow points right.
arrowSizestringOptionalIndicates the size of the collapsible arrows. Possible values are:

- `small`
- `large` (default)
arrowStylestringOptionalThe name of the CSS style to be used on collapsible arrow section.
containerStylestringOptionalThe name of the CSS style to be used for the collapsible container.
labelStylestringOptionalThe name of the CSS style to be used for the collapsible container's label.
onlyArrowIsClickablebooleanOptionalWhen **true,** only the arrow is clickable to expand or collapse the section.
When **false** (the default), both the label and the arrow are clickable.

If no arrow is used, this setting is ignored.
outerLabelAndArrowStylestringOptionalThe name of the CSS style to be used for the collapsible container's outer label and arrow style.

SDK function policy ID: docusign.esignature_responsivehtml_getenvelopedocumenthtmldefinitions. Catalog operation: esignature:ResponsiveHtml_GetEnvelopeDocumentHtmlDefinitions. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.