EnvelopeViews: createSender

Returns a URL that enables you to embed the sender view of the DocuSign UI in your applications.

The returned URL can only be redirected to immediately after it is generated. It can only be used once. Therefore, request the URL immediately before you redirect your user to it.

For the best user experience, don't use an iFrame. For iOS devices DocuSign recommends using a WebView.

Multiple solutions are available for maintaining your client state. See the Maintaining State section of the Embedded Signing introduction.

After the user has completed the sending view, the browser is redirected to the returnUrl supplied.

By default, if the envelope already contains one or more documents, DocuSign will initially show the document tagging view when you redirect to the URL.

To start with the envelope's recipients and documents view instead, examine the URL in the method's response. Then change the query parameter from send=1 to send=0 to start with the recipients/documents view.

Information Security notice: This method provides full access to the sender's user account. When you use this view, the sender has full access to the user account. If the sender user 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, then either:

  • 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/sender

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

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

envelopeIdstring

The envelope's GUID. (For example, 93be49ab-afa0-4adf-933c-f752070d71ec).

Request Body

returnUrlRequest

Responses

CodeDescriptionReference
201

Successful response.

EnvelopeViews
400

Error encountered.

errorDetails

SDK Method

Envelopes::createSenderView

Definitions

errorDetails

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

errorCodestring

A code associated with the error condition.

messagestring

A brief message describing the error condition.

returnUrlRequest

The request body for the EnvelopeViews: createSender method.

returnUrlstring

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)

EnvelopeViews

Embedding Envelope views

urlstring

The view URL to be navigated to.

Examples

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> 
}} />