Blog
Home/

Common API Tasks🐈: Add a Connect Webhook to your Envelopes

Inbar Gazit

Inbar Gazit

Sr. Manager, Developer Content

Summary3 min read

Learn how to add a Connect webhook to your envelopes using the eSignature REST API with useful code examples

    • What is Docusign Connect?
    • Two ways to set up Docusign Connect
    • Code please!
    • Additional resources
    Table of contents
    en-US

    Greetings, everyone! If you are reading this and wondering, what are "common API asks," I encourage you to take a look at the first two posts in the series. In the first post, I showed you how to set a custom email message for your envelope recipients, and in the second, I explained how to get the tab information from your envelopes. In this third post in the series I’m going to show you how to set a custom webhook using Docusign's webhook technology, Docusign Connect.

    What is Docusign Connect?

    As developers, you write integrations that typically make API requests to Docusign and either retrieve information or tell Docusign to perform a certain action. In this model, your code initiates the call and Docusign responds to your request upon receiving it: this method is called polling. There’s another model where Docusign initiates a request to your app to indicate some event occured in the system. In that model, the developer sets up a dedicated URL that Docusign calls into when objects were updated in the system: this method is called a webhook. For example, Docusign Connect will let you know when there has been a change of status for an envelope in your account.

    Two ways to set up Docusign Connect

    Docusign Connect can be set in two different ways. Both ways require developers to make Docusign eSignature API calls (there's no way to do that from the web tool). The first way is to set a global Docusign Connect webhook for the account. That means a Docusign account user with administrative privileges can create a Connect Configuration. The Connect Configuration would apply for all users and envelopes in the account. This blog post is focused on the second approach, which allows a developer to request that a specific envelope be set to call the specified webhook using Docusign Connect. The envelope must be created via the Docusign eSignature API and the call, as I’m going to show you here, would include the information needed to register Docusign Connect for this envelope. This approach has the advantage of being flexible, since you don’t have to process events for all the envelopes in the account. It also skirts the maximum number of Connect Configurations, which is limited to 100.

    Code please!

    Happy to oblige. For the snippets below, I assume you have other parts of the code that add recipients and documents to the envelope. Here is how to add a custom Docusign Connect webhook notification for your envelope in our six SDK languages:

    C#

    Java

    Node.js

    PHP

    Python

    Ruby

    So there you have it. Now you know how to add your custom Docusign Connect webhook for the envelopes you create in your app. If you have any questions on this or any other Docusign API related topic, feel free to email me. Look forward to my next blog post in the series next month!

    Additional resources

    Inbar Gazit

    Inbar Gazit

    Sr. Manager, Developer Content

    More posts from this author

    Related posts