EnvelopeViews: createEdit

Returns a URL that allows 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: iFrames should not be used for embedded operations on mobile devices due to screen space issues. For iOS devices DocuSign recommends using a WebView.

Request

HTTP request

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

Parameters

Parameter name Value Description
Path parameters
accountId string

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

envelopeId string

The envelope's GUID. Eg 93be49ab-afa0-4adf-933c-f752070d71ec

Request Body

Responses

Code Description Reference
201 Created Successful response.
400 Bad Request Error encountered.

SDK Method

Envelopes::createEditView

Definitions Expand All | Collapse All

EnvelopeViews

Embedding Envelope views

url string

The view URL to be navigated to.

errorDetails

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

errorCode string

An error code associated with the error.

message string

A short error message.

returnUrlRequest

The request body for the EnvelopeViews: createSender method.

returnUrl string

Your app's return url that the user will be redirected to after sending the envelope or completing the sending/tagging view. Query parameters envelopeId and event will be added to the URL. The event parameter values:

  • Send (the user sent the envelope)
  • Save (the user saved the envelope, it is still a draft)
  • Cancel (the user canceled the sending transaction)
  • Error (there was an error during the send operation)
  • SessionEnd (the sending session ended before the user completed a different action)

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>