Skip to main content
Blog
Home/

From the Trenches: Can I get a witness?

Author Geoff Pfander
Geoff PfanderSenior Developer Support Engineer
Summary3 min read

Find out how you can programmatically add a witness to your envelope using the Docusign eSignature REST API.

Recently developers using our eSignature SDKs have been contacting Developer Support about using the eSignature REST API to assign a witness type recipient to an envelope. Docusign is still working on completing this feature in our SDKs. We still need to add the signWithWitness property to the Signer object. This has left some of customers feeling a little like Marvin Gaye.

It is possible to work around this issue by making a raw CreateEnvelope API call, using the eSignature REST API. The signer must have the attribute "signWithWitness": true. The API can also suggest names and emails for the witness(es). The signer has the ultimate decision over who to ask to witness the envelope. Something to note about witnesses is that they do not have their own place in the routing order. They belong to the signer and take on the signer’s routing order. Below is a JSON body of a CreateEnvelope API call that sends an envelope with a signer that requires a witness and suggests a witness name and email.

{
  "documents": [
      {
          "documentBase64": "BASE_64_OMITTED",
          "documentId": "1",
          "fileExtension": "pdf",
          "name": "Test.pdf"
      }
  ],
  "emailSubject": "Witness Example",
  "recipients": {
      "signers": [
          {
              "email": "gxxxx@example.com",
              "name": "Geoff Tester",
              "signWithWitness": true,
              "recipientId": "1",
              "requireIdLookup": "false",
              "routingOrder": "1",
              "tabs": {
                  "signHereTabs": [
                      {
                          "documentId": "1",
                          "pageNumber": "1",
                          "recipientId": "1",
                          "xPosition": "100",
                          "yPosition": "150"
                      }
                  ],
              }
          }
      ],
          "witnesses": [
      {
          "name": "Jane",
          "email": "janexxxxx@example.com",
          "roleName": "Witness 1 for Geoff",
          "note": "",
          "routingOrder": "1",
          "status": "created",
          "deliveryMethod": "email",
          "witnessFor": "1",
          "recipientId": "2",
              "tabs": {
                  "signHereTabs": [
                      {
                          "documentId": "1",
                          "pageNumber": "1",
                          "recipientId": "2",
                          "xPosition": "200",
                          "yPosition": "150"
                      }
                  ]
              }
      }
      ]
  },
  "status": "sent"
}

Additional resources

Author Geoff Pfander
Geoff PfanderSenior Developer Support Engineer

Beginning in the 1990s, Geoff's engineering career has followed the evolution of COM, Java and .NET on the machine and SOAP and REST in the cloud. Currently the Developer Support team's subject matter expert for the Apex Toolkit, Geoff has extensive experience as an engineer in support, test, and sales. You can find him on LinkedIn.

More posts from this author

Related posts

  • From the Trenches: Automating JWT OAuth in Insomnia
    Developer Support Articles

    From the Trenches: Automating JWT OAuth in Insomnia

    Author Robert Schendle
    Robert Schendle
  • From the Trenches: Testing Docusign Connect with ngrok

    From the Trenches: Testing Docusign Connect with ngrok

    Author Ivan Dinkov
    Ivan Dinkov
From the Trenches: Automating JWT OAuth in Insomnia

From the Trenches: Automating JWT OAuth in Insomnia

Author Robert Schendle
Robert Schendle
From the Trenches: Testing Docusign Connect with ngrok

From the Trenches: Testing Docusign Connect with ngrok

Author Ivan Dinkov
Ivan Dinkov

Discover what's new with Docusign IAM or start with eSignature for free

Explore Docusign IAMTry eSignature for Free
Person smiling while presenting