> 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

# Create template document responsive HTML preview

POST https://demo.docusign.net/restapi/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview
Content-Type: application/json



Reference: https://developers.docusign.com/docs/esign-rest-api/v2/reference/templates/templatedocumentresponsivehtmlpreview/create

## Authentication

- `Authorization` header (required) — OAuth 2.0 access token (JWT or auth-code grant). Sent as Authorization: Bearer \<token>.

## Servers

- `https://demo.docusign.net/restapi` (Demo, default)
- `https://www.docusign.net/restapi` (Production)

## Request

### Path parameters

- `accountId` (string, required) — The external account number (int) or account id GUID.
- `documentId` (string, required) — The ID of the document being accessed.
- `templateId` (string, required) — The ID of the template being accessed.

### Body (application/json)

This endpoint expects a documentHtmlDefinition.

- `displayAnchorPrefix` (string, optional)
- `displayAnchors` (list of documentHtmlDisplayAnchor, optional)
- `displayOrder` (string, optional)
- `displayPageNumber` (string, optional)
- `documentGuid` (string, optional)
- `documentId` (string, optional) — The ID of the document being accessed.
- `headerLabel` (string, optional)
- `maxScreenWidth` (string, optional)
- `removeEmptyTags` (string, optional)
- `showMobileOptimizedToggle` (string, optional)
- `source` (string, optional)

## Response

### 201

Successful response.

- `htmlDefinitions` (list of string, optional)

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — An error code associated with the error.
- `message` (string, optional) — A short error message.

## Types

### documentHtmlDisplayAnchor

- `caseSensitive` (boolean, optional)
- `displaySettings` (documentHtmlDisplaySettings, optional)
- `endAnchor` (string, optional)
- `removeEndAnchor` (boolean, optional)
- `removeStartAnchor` (boolean, optional)
- `startAnchor` (string, optional)

### documentHtmlDisplaySettings

- `cellStyle` (string, optional)
- `collapsibleSettings` (documentHtmlCollapsibleDisplaySettings, optional)
- `display` (string, optional) — This string sets the display and behavior properties of the document during signing. The possible values are: * `modal` The document is shown as a supplement action strip and can be viewed, downloaded, or printed in a modal window. This is the recommended value for supplemental documents. * `download` The document is shown as a supplement action strip and can be viewed, downloaded, or printed in a new browser window. * `inline` The document is shown in the normal signing window. This value is not used with supplemental documents, but is the default value for all other documents.
- `displayLabel` (string, optional)
- `displayOrder` (integer, optional)
- `displayPageNumber` (integer, optional)
- `hideLabelWhenOpened` (boolean, optional)
- `inlineOuterStyle` (string, optional)
- `labelWhenOpened` (string, optional)
- `preLabel` (string, optional)
- `scrollToTopWhenOpened` (boolean, optional)
- `tableStyle` (string, optional)

### documentHtmlCollapsibleDisplaySettings

- `arrowClosed` (string, optional)
- `arrowColor` (string, optional)
- `arrowLocation` (string, optional)
- `arrowOpen` (string, optional)
- `arrowSize` (string, optional)
- `arrowStyle` (string, optional)
- `containerStyle` (string, optional)
- `labelStyle` (string, optional)
- `onlyArrowIsClickable` (boolean, optional)
- `outerLabelAndArrowStyle` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "htmlDefinitions": [
    "string"
  ]
}
```