Skip to content
Proud to collaborate with Microsoft for Startups

docusign.responsive-html-preview.post-responsive-html-preview ​

Creates a preview of the responsive, HTML versions of all of the documents in an envelope. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.

Creates a preview of the responsive versions of all of the documents in an envelope.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-docusign
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
envelopeidstringYes—The envelope's GUID. Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec
displayanchorprefixstringNo—Contains text that all display anchors must start with. Using at least four characters will improve anchor processing performance.
displayanchorslistNo—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 of the displaySettings object.
displayorderstringNo—The position on the page where the display section appears.
displaypagenumberstringNo—The number of the page on which the display section appears.
documentguidstringNo—The GUID of the document.
documentidstringNo—Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
headerlabelstringNo—Header text or an HTML tag to place above the responsive HTML block.
maxscreenwidthstringNo—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.
removeemptytagsstringNo—Holds a comma-separated list of HTML tags to remove if they have no text within their node (including child nodes).
showmobileoptimizedtogglestringNo—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.
sourcestringNo—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 - How to convert a PDF file into a signable HTML document - Responsive signing [smart sections feature]: https://support.docusign.com/s/document-item?bundleId=gbo1643332197980&topicId=qlx1578456478178.html

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
envelopeidstringYes—The envelope's GUID. Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec
displayanchorprefixstringNo—Contains text that all display anchors must start with. Using at least four characters will improve anchor processing performance.
displayanchorslistNo—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 of the displaySettings object.
displayorderstringNo—The position on the page where the display section appears.
displaypagenumberstringNo—The number of the page on which the display section appears.
documentguidstringNo—The GUID of the document.
documentidstringNo—Specifies the document ID number that the tab is placed on. This must refer to an existing Document's ID attribute.
headerlabelstringNo—Header text or an HTML tag to place above the responsive HTML block.
maxscreenwidthstringNo—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.
removeemptytagsstringNo—Holds a comma-separated list of HTML tags to remove if they have no text within their node (including child nodes).
showmobileoptimizedtogglestringNo—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.
sourcestringNo—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 - How to convert a PDF file into a signable HTML document - Responsive signing [smart sections feature]: https://support.docusign.com/s/document-item?bundleId=gbo1643332197980&topicId=qlx1578456478178.html
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/responsive_html_preview
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "docusign.responsive-html-preview.post-responsive-html-preview",
  "initial_data": {
    "base_url": "value",
    "accountid": "value",
    "envelopeid": "value"
  }
}