> 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

# Get URL to edit view UI

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

This API method has been replaced by the [EnvelopeViews:createSender](/docs/esign-rest-api/reference/envelopes/envelopeviews/createsender/) API method. The two API methods work exactly the same,

**Migration required**

To solve an application security issue, you must migrate to the new API request format. See the [EnvelopeViews:createSender](/docs/esign-rest-api/reference/envelopes/envelopeviews/createsender/) API method for more information. Backwards compatibility will be provided for a limited time.

Reference: https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createedit

## 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 an envelopeViewRequest.

- `returnUrl` (string, optional) — **Required** Identifies the return point after sending the envelope. Docusign returns to the URL and includes an event parameter that can be used to redirect the recipient to another location. The possible event parameters returned are: - send (user sends the envelope) - save (user saves the envelope) - cancel (user cancels the sending transaction. No envelopeId is returned in this case.) - error (there is an error when performing the send) - sessionEnd (the sending session ends before the user completes another action).
- `settings` (envelopeViewSettings, optional)
- `viewAccess` (string, optional) — **Required** . Set to `envelope`

## 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

### envelopeViewSettings

- `backButtonAction` (string, optional) — Sets the behavior of the back button when clicked. Valid values: - `previousPage`: Navigate to browser's previous page - `redirect`: Redirect to the `returnUrl` specified in the request
- `documentSettings` (envelopeViewDocumentSettings, optional)
- `envelopeCustomFieldSettings` (envelopeViewEnvelopeCustomFieldSettings, optional)
- `lockToken` (string, optional) — If your app will modify the envelope after the user finishes editing the envelope, create and use a [lock token](/docs/esign-rest-api/reference/envelopes/envelopelocks/create/) for this attribute. Remember to delete the lock token after your app has finished its envelope modifications.
- `recipientSettings` (envelopeViewRecipientSettings, optional)
- `sendButtonAction` (string, optional) — Sets the behavior of the send button when clicked. Valid values: - `send`: send the envelope and redirect with query parameter `event=Send` (default) - `redirect`: Change the Tagger page's button text to 'Continue'; when clicked, redirect to the `returnUrl` with query parameter `event=Save`. Set `showBackButton` to `false` and `startingScreen` to `Tagger`.
- `showAdvancedOptions` (string, optional) — Reserved for Docusign.
- `showBackButton` (string, optional) — Determines whether the Tagger's back button is shown. Valid values: - `true`: The back button is shown. This is the default value. - `false`: Prevents access to the Prepare screen by hiding the back button.
- `showDiscardAction` (string, optional) — When **true,** the Discard option is shown in the Actions menu. When **false,** the Discard option is not shown. The default value is **true.**
- `showHeaderActions` (string, optional) — Determines whether the Actions menu displays advanced actions. Valid values: - `true`: The Actions menu shows all options, including editing the message, recipients, documents, and advanced options. This is the default value. - `false`: The Actions menu will only show Save, Close, and Discard. To limit the user to tagging only, use this value and set `startingScreen` to `Tagger` and `showBackButton` to `false`.
- `showSignNow` (string, optional) — When `true` and the sender is the first recipient (and not using bulk send or send later), the sender will be prompted to sign immediately after sending the envelope. Otherwise, the envelope is sent without launching the signing flow for the sender from the envelope sending view.
- `startingScreen` (string, optional) — Determines the starting screen for the sender view. Valid values: - `Prepare` (default) - `Tagger`
- `taggerSettings` (envelopeViewTaggerSettings, optional)
- `templateSettings` (envelopeViewTemplateSettings, optional)

### envelopeViewDocumentSettings

- `showEditDocuments` (string, optional) — When `false,` prevents the app user from adding, replacing, or deleting documents. The default value is `true`. **Note:** An existing document in the envelope can also be deleted by deleting all of the document’s pages via the document’s thumbnail images. To prohibit this, see the `ShowEditPages` attribute.
- `showEditDocumentVisibility` (string, optional) — When `false`, prevents the user from modifying document visibility settings. The default value is `true`.
- `showEditPages` (string, optional) — When `false`, prevents the user from deleting or rotating individual document pages via the document’s thumbnail images. The default value is `true`.
- `showSaveAsDocumentCustomField` (string, optional) — Reserved for Docusign.

### envelopeViewEnvelopeCustomFieldSettings

- `showEnvelopeCustomFields` (string, optional) — Reserved for Docusign.

### envelopeViewRecipientSettings

- `showBulkSend` (string, optional) — Reserved for Docusign.
- `showContactsList` (string, optional) — When `false`, the user will not be able to use the contacts list when selecting recipients for this envelope. The default value is `true`.
- `showEditMessage` (string, optional) — Reserved for Docusign.
- `showEditRecipients` (string, optional) — When `false`, prevents the user from changing the recipients from the **Tagger** page. The default value is `true`.

### envelopeViewTaggerSettings

- `paletteDefault` (string, optional) — When `paletteSections` is set to `custom`, this property selects the default tagger palette. Valid values: - `custom` - `merge` - `notary` - `seals` - `smartContracts` - `annotations` - `smartSections`
- `paletteSections` (string, optional) — Valid values: - `default` (default): The default tagger palette UX - `none`: No tagger palette - `custom`: Set by `paletteDefault`
- `paletteSettings` (paletteSettings, optional) — Reserved for Docusign.

### envelopeViewTemplateSettings

- `showMatchingTemplatesPrompt` (string, optional) — When **true,** the auto-match template modal dialog will appear when the prepare page is loaded in the embedded sending experience. When **false,** the auto-match template modal dialog will not be shown.

### paletteSettings

Reserved for Docusign.

- `annotations` (paletteItemSettings, optional)
- `custom` (paletteItemSettings, optional)
- `merge` (paletteItemSettings, optional)
- `notary` (paletteItemSettings, optional)
- `seals` (paletteItemSettings, optional)
- `smartContracts` (paletteItemSettings, optional)
- `smartSections` (paletteItemSettings, optional)

### paletteItemSettings

- `show` (string, optional) — Reserved for Docusign.

## Examples

### Getting an Edit View URL and Setting a Return URL

**Request**

```json
{
  "returnUrl": "https://dsapp.example.com/return/from/edit/view"
}
```

**Response**

```json
{
  "url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=c8dc7c1e-xxxx-xxxx-xxxx-405ba1f7d38b&DocuEnvelope=4b728be4-xxxx-xxxx-xxxx-d63e23f822b6&send=1"
}
```

### Generic JSON Request/Response

**Request**

```json
{
  "returnUrl": "sample string 1",
  "settings": {
    "backButtonAction": "sample string 1",
    "documentSettings": {
      "showEditDocuments": "sample string 1",
      "showEditDocumentVisibility": "sample string 2",
      "showEditPages": "sample string 3",
      "showSaveAsDocumentCustomField": "sample string 4"
    },
    "envelopeCustomFieldSettings": {
      "showEnvelopeCustomFields": "sample string 1"
    },
    "lockToken": "sample string 2",
    "recipientSettings": {
      "showBulkSend": "sample string 1",
      "showContactsList": "sample string 2",
      "showEditMessage": "sample string 3",
      "showEditRecipients": "sample string 4"
    },
    "sendButtonAction": "sample string 3",
    "showAdvancedOptions": "sample string 4",
    "showBackButton": "sample string 5",
    "showDiscardAction": "sample string 6",
    "showHeaderActions": "sample string 7",
    "showSignNow": "sample string 8",
    "startingScreen": "sample string 9",
    "taggerSettings": {
      "paletteDefault": "sample string 1",
      "paletteSections": "sample string 2"
    },
    "templateSettings": {
      "showMatchingTemplatesPrompt": "sample string 1"
    }
  },
  "viewAccess": "sample string 2"
}
```

**Response**

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