> 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 envelope recipient preview

POST https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/recipient_preview
Content-Type: application/json

Returns a URL to preview the recipients' view of a draft envelope or template. You can embed this view in your application to enable the sender to preview the recipients' experience.

You must specify a `returnUrl` value in the request body.

For more information, see [Preview and Send](https://support.docusign.com/s/document-item?bundleId=ulp1643236876813&topicId=oeg1578456408976.html).

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/enveloperecipients/createenveloperecipientpreview

## Authentication

- `Authorization` header (required) (prefixed with ` Bearer  `) — OAuth 2.0 access token (JWT or auth-code grant). Sent as `Authorization: Bearer <token>` on every request except `GET /v2.1` and `GET /service_information`, which are public discovery endpoints.

## 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.
- `envelopeId` (string, required) — The envelope's GUID. Example: `93be49ab-xxxx-xxxx-xxxx-f752070d71ec`

### Body (application/json)

This endpoint expects a recipientPreviewRequest.

- `assertionId` (string, optional) — A unique identifier of the authentication event executed by the client application.
- `authenticationInstant` (string, optional) — A sender-generated value that indicates the date and time that the signer was authenticated.
- `authenticationMethod` (string, optional) — Required. Choose a value that most closely matches the technique your application used to authenticate the recipient / signer. Choose a value from this list: - Biometric - Email - HTTPBasicAuth - Kerberos - KnowledgeBasedAuth - None - PaperDocuments - Password - RSASecureID - SingleSignOn_CASiteminder - SingleSignOn_InfoCard - SingleSignOn_MicrosoftActiveDirectory - SingleSignOn_Other - SingleSignOn_Passport - SingleSignOn_SAML - Smartcard - SSLMutualAuth - X509Certificate This information is included in the Certificate of Completion.
- `clientURLs` (recipientTokenClientURLs, optional)
- `pingFrequency` (string, optional) — Only used if `pingUrl` is specified. This is the interval, in seconds, between pings on the `pingUrl`. The default is `300` seconds. Valid values are 60-1200 seconds.
- `pingUrl` (string, optional) — The client URL that the Docusign Signing experience should ping to indicate to the client that Signing is active. An HTTP GET call is executed against the client. The response from the client is ignored. The intent is for the client to reset its session timer when the request is received.
- `recipientId` (string, optional) — Unique for the recipient. It is used by the tab element to indicate which recipient is to sign the Document.
- `returnUrl` (string, optional) — The URL to which the user will be redirected in an exit scenario. For example, if the link has expired, the user will be redirected to the URL provided here. This value must be an absolute URL. This property is required.
- `securityDomain` (string, optional) — The domain in which the user authenticated.
- `xFrameOptions` (string, optional) — Specifies whether a browser should be allowed to render a page in a frame or IFrame. Setting this property ensures that your content is not embedded into unauthorized pages or frames. Valid values are: - `deny`: The page cannot be displayed in a frame. - `same_origin`: The page can only be displayed in a frame on the same origin as the page itself. - `allow_from`: The page can only be displayed in a frame on the origin specified by the `xFrameOptionsAllowFromUrl` property.
- `xFrameOptionsAllowFromUrl` (string, optional) — When the value of `xFrameOptions` is `allow_from`, this property specifies the origin on which the page is allowed to display in a frame. If the value of `xFrameOptions` is `allow_from`, you must include a value for this property.

## Response

### 201

Successful response.

- `url` (string, optional) — URL for the template edit view.

## Errors

### 400 Bad Request Error

Error encountered.

- `errorCode` (string, optional) — The code associated with the error condition.
- `message` (string, optional) — A brief message describing the error condition.

## Types

### recipientTokenClientURLs

- `onAccessCodeFailed` (string, optional)
- `onCancel` (string, optional)
- `onDecline` (string, optional)
- `onException` (string, optional)
- `onFaxPending` (string, optional)
- `onIdCheckFailed` (string, optional)
- `onSessionTimeout` (string, optional)
- `onSigningComplete` (string, optional)
- `onTTLExpired` (string, optional)
- `onViewingComplete` (string, optional)

## Examples

**Request**

```json
{
  "assertionId": "sample string 1",
  "authenticationInstant": "sample string 2",
  "authenticationMethod": "sample string 3",
  "clientURLs": {
    "onAccessCodeFailed": "sample string 1",
    "onCancel": "sample string 2",
    "onDecline": "sample string 3",
    "onException": "sample string 4",
    "onFaxPending": "sample string 5",
    "onIdCheckFailed": "sample string 6",
    "onSessionTimeout": "sample string 7",
    "onSigningComplete": "sample string 8",
    "onTTLExpired": "sample string 9",
    "onViewingComplete": "sample string 10"
  },
  "pingFrequency": "sample string 4",
  "pingUrl": "sample string 5",
  "recipientId": "sample string 6",
  "returnUrl": "sample string 7",
  "securityDomain": "sample string 8",
  "xFrameOptions": "sample string 9",
  "xFrameOptionsAllowFromUrl": "sample string 10"
}
```

**Response**

```json
{
  "url": "sample string 1"
}
```