DocuSign: Gets the Original HTML Definition used to generate the Responsive HTML for the envelope
DocuSign esignature.esignatureResponsiveHtmlGetEnvelopeHtmlDefinitions: arguments, response, policy and SDK examples.
← Esignature operations · Get started
Operation docusign.esignature_responsivehtml_getenvelopehtmldefinitions
Provider route: GET /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/html_definitions. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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"]["esignatureResponsiveHtmlGetEnvelopeHtmlDefinitions"]>[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.esignatureResponsiveHtmlGetEnvelopeHtmlDefinitions(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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_html_definitions(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.accountId | string | Required within parent | |
path.envelopeId | string | Required within parent |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand 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
Schemas
Section titled “Schemas”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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
htmlDefinitions | array | Optional | Holds the properties that define how to generate the responsive-formatted HTML for the document. |
htmlDefinitions[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
documentId | string | Optional | Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute. |
documentIdGuid | string | Optional | The GUID of the document. |
htmlDefinition | Model | Optional | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Holds 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/). |
displayAnchorPrefix | string | Optional | Contains text that all display anchors must start with. Using at least four characters will improve anchor processing performance. |
displayAnchors | array | Optional | An 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[] | Model | Each item | Expand Gets a specific template associated with a specified account — response body — documents item html Definition display Anchors item |
displayOrder | string | Optional | The position on the page where the display section appears. |
displayPageNumber | string | Optional | The number of the page on which the display section appears. |
documentGuid | string | Optional | The GUID of the document. |
documentId | string | Optional | Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute. |
headerLabel | string | Optional | Header text or an HTML tag to place above the responsive HTML block. |
maxScreenWidth | string | Optional | If 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. |
removeEmptyTags | string | Optional | Holds a comma-separated list of HTML tags to remove if they have no text within their node (including child nodes). |
showMobileOptimizedToggle | string | Optional | When **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. |
source | string | Optional | Specifies 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
caseSensitive | boolean | Optional | When **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. |
displaySettings | Model | Optional | Expand 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. |
endAnchor | string | Optional | Specifies 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. |
removeEndAnchor | boolean | Optional | When **true,** removes the end anchor string for the Smart Section from the HTML, preventing it from displaying. |
removeStartAnchor | boolean | Optional | When **true,** removes the start anchor string for the Smart Section from the HTML, preventing it from displaying. |
startAnchor | string | Optional | Specifies 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Display settings for collapsible section. |
arrowClosed | string | Optional | Indicates 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. |
arrowColor | string | Optional | A CSS color value (such as `#DCF851`) that indicates the color of the arrow. |
arrowLocation | string | Optional | The location of the arrow relative to the collapsible section's label. Possible values are: - `right` (default) - `left` |
arrowOpen | string | Optional | Indicates 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. |
arrowSize | string | Optional | Indicates the size of the collapsible arrows. Possible values are: - `small` - `large` (default) |
arrowStyle | string | Optional | The name of the CSS style to be used on collapsible arrow section. |
containerStyle | string | Optional | The name of the CSS style to be used for the collapsible container. |
labelStyle | string | Optional | The name of the CSS style to be used for the collapsible container's label. |
onlyArrowIsClickable | boolean | Optional | When **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. |
outerLabelAndArrowStyle | string | Optional | The name of the CSS style to be used for the collapsible container's outer label and arrow style. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: docusign.esignature_responsivehtml_getenvelopehtmldefinitions. Catalog operation: esignature:ResponsiveHtml_GetEnvelopeHtmlDefinitions. 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.