EnvelopeViews: createEdit

Returns a URL that enables you to embed the edit view of the DocuSign UI in your applications. This is a one-time use login token that allows the user to be placed into the DocuSign editing view.

Upon sending completion, the user is returned to the return URL provided by the API application.

Important: Due to screen space issues, iFrames should not be used for embedded operations on mobile devices. For iOS devices, DocuSign recommends using a WebView.

Note: You can revoke this URL by making the DELETE call to the same URL with no request body.

Information Security notice: This method provides full access to the sending account. When you use this view, the current user has full access to the account. If the account has administrative privileges, then this method also provides administrator access.

If your use case needs to enable a sender to update a draft envelope before it is sent or make other changes, take one of the following steps:

  • Configure each sender to have their own individual user account to use this API method.
  • Enhance your API integration so that this method is not needed. Your integration can create the tabs, recipients, and other envelope settings as needed.

Request

HTTP request

POST /v2.1/accounts/{accountId}/envelopes/{envelopeId}/views/edit

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

envelopeIdstring

The envelope's GUID.

Example: 93be49ab-afa0-4adf-933c-f752070d71ec

Request Body

returnUrlRequest

Responses

CodeDescriptionReference
201

Successful response.

EnvelopeViews
400

Error encountered.

errorDetails

SDK Method

Envelopes::createEditView

Definitions

errorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

returnUrlRequest

The request body for the EnvelopeViews::createSender method.

returnUrlstring

(Optional) The URL to which the user should be redirected after the sending session is complete.

Maximum Length: 500 characters. If the returnUrl exceeds this limit, the user is redirected to a truncated URL.

EnvelopeViews

Embedding Envelope views

urlstring

The view URL to be navigated to.

Examples

Getting an Edit View URL and Setting a Return URL

The response contains the URL of the embeddable edit view for a specified envelope.

The request body contains a returnUrl. This is the URL that the DocuSign platform will redirect the user to when the view is closed.

Request
{
  "returnUrl": "https://dsapp.example.com/return/from/edit/view"
}
Response
{
  "url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=c8dc7c1e-77fb-4ec8-a336-405ba1f7d38b&DocuEnvelope=4b728be4-4417-45c6-b7e8-d63e23f822b6&send=1"
}
Generic JSON Request/Response

Request
{
  "returnUrl": "sample string 1"
}
Response
{
  "url": "sample string 1"
}
Generic XML Request/Response

Request
<returnUrlRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <returnUrl>sample string 1</returnUrl>
</returnUrlRequest> 
Response
<viewUrl xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <url>sample string 1</url>
</viewUrl> 
}} />