10

Is there an API endpoint which allows me to retrigger emails to recipients? Sometimes users may not get or lose the DocuSign emails which contain their signing link. I'd like to be able to send those emails again on demand.

Jonathan Mui
  • 2,471
  • 3
  • 19
  • 27

7 Answers7

17

You can use the "modify recipient(s)" request to trigger a re-send of the email notification to specific recipient(s).

PUT /accounts/{accountId}/envelopes/{envelopeId}/recipients?resend_envelope=true

Be sure to include the querystring parameter/value resend_envelope=true in the URL (as shown above).

For example, if a GET Recipients response shows that an Envelope contains the following recipients:

{
    "signers": [
        {
            "name": "Jane Doe",
            "email": "janesemail@outlook.com",
            "recipientId": "3",
            "recipientIdGuid": "13e30b8d-3dd6-48e8-ad12-15237611a463",
            "requireIdLookup": "false",
            "userId": "2c9e06eb-f2c5-4bef-957a-5a3dbd6edd25",
            "routingOrder": "1",
            "status": "sent"
        },
        {
            "name": "John Doe",
            "email": "johnsemail@outlook.com",
            "recipientId": "1",
            "recipientIdGuid": "c2273f0f-1430-484a-886c-45ce2fb5e8a8",
            "requireIdLookup": "false",
            "userId": "03c8a856-c0ae-41bf-943d-ac6e92db66a8",
            "routingOrder": "1",
            "note": "",
            "roleName": "Signer1",
            "status": "sent",
            "templateLocked": "false",
            "templateRequired": "false"
        }
    ],
    "agents": [],
    "editors": [],
    "intermediaries": [],
    "carbonCopies": [],
    "certifiedDeliveries": [],
    "inPersonSigners": [],
    "recipientCount": "2",
    "currentRoutingOrder": "1"
}

Then, I could trigger a re-send of the Signing Invitation Email to the incomplete recipient ("Jane Doe") by using the following request:

PUT https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/recipients?resend_envelope=true

{
  "signers": [
   {
      "recipientId": "3",
      "name": "Jane Doe",
      "email": "janesemail@outlook.com"
    }
  ]
}

Notice that I'm sending the same (original) values for name and email -- so it's not going to actually modify the recipient -- it'll just re-send the email to Jane, since I included ?resend_envelope=true in the URL.

API Documentation

If you want to re-send the email notification to all pending recipients (i.e., anyone who's next in the routing order and hasn't yet completed the envelope), you can do so with the following request:

PUT https://demo.docusign.net/restapi/v2/accounts/<accountID>/envelopes/<envelopeID>?resend_envelope=true
{}
Kim Brandl
  • 13,125
  • 2
  • 16
  • 21
  • The only problem with this approach is that in the subject of the resend a "Corrected" is prepended even when there were no changes. Is there any way to get that removed? – Jonathan Mui Feb 07 '14 at 01:51
  • Hmmmm...I've used this approach several times, and have never seen the word "Corrected" prepended to the email subject. Not sure what to tell you, sorry. – Kim Brandl Feb 07 '14 at 02:27
3

You can use docusign's latest API using nuget package manager "DocuSign.eSign.Api".

I did it using C#:

//Very first prepare Recepients:

    Recipients recpnts = new Recipients
                {
                    //CurrentRoutingOrder = "1", // Optional.
                    Signers = new List<Signer>()
                {
                        new Signer
                        {
                            RecipientId = "1",
                            RoleName = "Prospect",
                            Email = "ert@gmail.com",
                            Name = "Shyam",
                        },
                    }
                };
// Call Envelopes API class which has UpdateRecepient Method

EnvelopesApi epi = new EnvelopesApi();

var envelopeId ="62501f05-4669-4452-ba14-c837a7696e04";

var accountId = GetAccountId();

// The following Line is responsible for Resend Envelopes.

 RecipientsUpdateSummary recSummary = epi.UpdateRecipients(accountId, envelopeId , recpnts);

// Get Status or Error Details.

var summary = recSummary.RecipientUpdateResults.ToList();

var errors = summary.Select(rs => rs.ErrorDetails).ToList();

// Method to get your Docusign Account Details and Authorize it.

private static string GetAccountId()
        {
            string username = "Account Email Address";
            string password = "Account Password;
            string integratorKey = "Your Account Integrator Key";

      // your account Integrator Key (found on Preferences -> API page)                                                                


            ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
            Configuration.Default.ApiClient = apiClient;

            // configure 'X-DocuSign-Authentication' header
            string authHeader = "{\"Username\":\"" + username + "\", \"Password\":\"" + password + "\", \"IntegratorKey\":\"" + integratorKey + "\"}";
            Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", authHeader);

            // we will retrieve this from the login API call
            string accountId = null;

            /////////////////////////////////////////////////////////////////
            // STEP 1: LOGIN API        
            /////////////////////////////////////////////////////////////////

            // login call is available in the authentication api 
            AuthenticationApi authApi = new AuthenticationApi();
            LoginInformation loginInfo = authApi.Login();

            accountId = loginInfo.LoginAccounts[0].AccountId;
            return accountId;
        }
Rohan Khude
  • 4,455
  • 5
  • 49
  • 47
Shyam
  • 182
  • 1
  • 14
  • Not sure if the API changed since 2016 or if it's something else but I had to pass a 4th parameter to the UpdateRecipients method. `var recSummary = envelopesApi.UpdateRecipients(apiToken.Account.AccountId, envelopeID.ToString(), recipient, new UpdateRecipientsOptions() { resendEnvelope = "true"});` – Gabe May 02 '22 at 10:48
  • There is Resend API using C# SDK. I have recently used it – Shyam May 03 '22 at 12:33
1

I'm not sure if a separate api call exists just to resend the envelope (notification), however you might be able to get away with it by using the Modify or Correct and Resend Recipient Info api call.

That call is normally used to correct information about your recipients- for instance, if you created an envelope with an incorrect email address or perhaps have the wrong name for someone you could use this call to modify the email address and resend the envelope. And when you make the call there is an optional query parameter called

?resend_envelope={true or false}

Try making this call but instead of altering any recipient information, simple append the URL parameter and that might resend the envelope.

Documentation

Praveen Reddy
  • 7,295
  • 2
  • 21
  • 43
Ergin
  • 9,254
  • 1
  • 19
  • 28
  • Thanks Ergin, can you please view my comment on the above post? – Jonathan Mui Feb 07 '14 at 01:52
  • @JonathanMui That's probably coming from your resource file. Try logging in and going to Preferences -> Branding page, then Edit the brand profile you are using or create a new one. Once on a brand profile go to the `Resources` tab and see the email resource file. Remove the reference to "Corrected" text that you are referring to. – Ergin Feb 07 '14 at 05:29
  • I'm not using a branding profile at all. The "Corrected" string only appears when I resend emails. It does not appear the first time. – Jonathan Mui Feb 07 '14 at 08:51
  • Yes but it still might be stemming from there. If you are not using a brand profile then that means you are using the default brand profile. Try creating a new one, then look at your email resource file (there will be a button to download it) and look for the email string you want to remove. There's probably a case for a resend... I haven't had time to test yet. – Ergin Feb 07 '14 at 21:13
1

Here it is for SOAP without changing the recipients info:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.docusign.net/API/3.0">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>[integratorKey]UserName</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns:CorrectAndResendEnvelope>
        <ns:Correction>
            <ns:EnvelopeID>1234</ns:EnvelopeID>
            <ns:RecipientCorrections>
               <ns:RecipientCorrection>
                  <ns:PreviousUserName>userName</ns:PreviousUserName>
                  <ns:PreviousEmail>user@email.com</ns:PreviousEmail>
                  <ns:PreviousRoutingOrder>1</ns:PreviousRoutingOrder>                  
                  <ns:Resend>true</ns:Resend>
               </ns:RecipientCorrection>
            </ns:RecipientCorrections>
        </ns:Correction>
      </ns:CorrectAndResendEnvelope>
   </soapenv:Body>
</soapenv:Envelope>
Frank Tsai
  • 41
  • 2
1

I know this is extremely old but I wanted to post how I did it using the latest SDK (DocuSign.eSign.dll 5.12.0).

var account = ...;
var accessToken = ...;
var apiClient = new ApiClient($"{account.BasePath}/restapi");
apiClient.Configuration.DefaultHeader.Add("Authorization", $"Bearer {accessToken}");

var envelopesApi = new EnvelopesApi(apiClient);
var envelope = new Envelope
{
    EnvelopeId = envelopeId
};

await envelopesApi.UpdateAsync(account.Id, envelopeId, envelope, new EnvelopesApi.UpdateOptions { resendEnvelope = "true" });
jtrose22
  • 11
  • 2
  • Thank you! Was looking for the answer to this (we're also on a newer version of the C# library) and you literally posted 6 hours ago. Is never too late to give an updated answer. – ShawnFumo Aug 30 '22 at 23:11
  • The only change I'd make is that it doesn't look like the new Envelope object is needed. So you can just do something like `envApi.Update(_info.AccountId, envelopeId, options:updateOptions);` – ShawnFumo Aug 30 '22 at 23:27
  • @ShawnFumo What values are you putting in the updateOptions? I keep getting the 400 error when I try it without the envelope obj. – jtrose22 Sep 01 '22 at 17:32
0

To replicate the behavior of the "Resend" button in the UI

pick the next person in the order, and send them an email of what to do

you can use API Explorer to just filling out the account ID, envelope ID, and Oauth Token, then setting resend-envelope to true

Like this curl:

curl --request PUT \
  --url 'https://demo.docusign.net/restapi/v2/accounts/{accountId}/envelopes/{envelopeId}?resend_envelope=true' \
  --header 'accept: application/json' \
  --header 'accept-encoding: gzip,deflate,sdch' \
  --header 'accept-language: en-US,en;q=0.8,fa;q=0.6,sv;q=0.4' \
  --header 'authorization: {bearerToken}' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --data '{}'

note: this in the body is required, or it will 400 you

{}
Lost Odinson
  • 418
  • 1
  • 5
  • 14
0

These days, if you're having problems with signers not noticing the DocuSign signing request email in their overloaded in-boxes, I recommend send the message via email + SMS.

Here's a live API Request Builder example that sends via email and SMS.

You can also send SMS only if you wish. Live example

Larry K
  • 47,808
  • 15
  • 87
  • 140