Using Identity Verification with templates

One of the API tasks that we’ve recently seen a bit of buzz around is adding Identity Verification to an envelope created via a DocuSign template. There are a few steps required to add Identity Verification to an envelope created via a template, but first let’s discuss what Identity Verification is and why you should be using it.

What is Identity Verification?

Sometimes when you send an envelope, you need more security than just having the signer open the envelope through their email address. With Identity Verification, you can add various forms of verification that provide greater security to your customers and your business. There are a number of authentication methods available to choose from when using Identity Verification, including:

Each of the above authentication methods adds an important layer of trust to your digital transaction and has its own varying levels of security to ensure that there’s an option that’s right for your needs. I won’t cover how each of these verification methods are different from one another here, but you can read up about them in ID Verification on DocuSign Support.

Overview and code example:

The workflow for adding Identity Verification to your template will require three different API calls to complete the process. First, you’ll want to make a GET request to get a list of all of the identity workflows available on your account and the workflowId associated with the one that you’d like to use. For these examples, I’ll be using the demo server.

Step 1:

Request:

GET https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/identify_verification
Headers: 
Authorization: Bearer {code}

Response:

{
    "identityVerification": [
        {
            "workflowId": "{workflowID}",
            "workflowLabel": null,
            "defaultName": "DocuSign ID Verification",
            "defaultDescription": "The signer will need to identify themselves with a valid government ID.",
            "workflowResourceKey": "ds_identify_default",
            "steps": [
                {
                    "name": "identify",
                    "type": "EnvelopeAccess"
                }
            ],
            "signatureProvider": null,
            "inputOptions": []
        },
        {
            "workflowId": "{workflowID}",
            "workflowLabel": "Phone Auth",
            "defaultName": "Phone Authentication",
            "defaultDescription": "Recipient will need to authenticate with their phone number via SMS or a phone call",
            "workflowResourceKey": "",
            "steps": [
                {
                    "type": "EnvelopeAccess"
                }
            ],
            "signatureProvider": null,
            "inputOptions": [
                {
                    "optionName": "phone_number_list",
                    "isRequired": true,
                    "valueType": "PhoneNumberList"
                }
            ]
        }
    ]
}

Step 2:

After obtaining the workflowId for the Identity Verification type that you’d like to use, you will next want to create an envelope from the template of your choice as a draft. You will create it as a draft so that it’s not sent to the recipient yet without the Identity Verification added.

POST https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes
{
  "status":"created",
  "emailBlurb":"Test Email Body (Template)",
  "emailSubject": "Test Email Subject (Template)",
  "templateId":"{templateId}",
  "templateRoles":[
    {
      "email":"jdoe@email.com",
      "name":"John Doe",
      "roleName":"Signer 1"      
    }
  ]
}

Step 3:

After creating the draft envelope from the template of your choice, you can then update the envelope to add the Identity Verification from the first step and send the envelope to your signer using the advanced_update query parameter.

PUT https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}?advanced_update=true
{
    "recipients":{
        "signers":[
        {
            "email":"jdoe@email.com",
            "name":"John Doe",
            "roleName":"Signer 1",
            "recipientId": "1",
            "identityVerification": {
		"workflowId": "{workflowId}",
		"steps": null,
		"inputOptions": null
	}  
        }
    ]
    },    
    "status": "sent"
}

Getting Identity Verification for your account

If you would like to have the Identity Verification option enabled for your account, please reach out to the DocuSign support team through DocuSign Support and request access on your demo account.

Additional resources

Jonathon Sammons
Author
Jonathan Sammons
Developer Support Engineer
Published