REST API Recipe: Tag and Send from Your App
This recipe enables your app’s user to “tag and send” a specific envelope’s document(s) from within your app.
Use this technique when your app users want to use the DocuSign graphical user interface to place tags on the envelope’s document or documents.
You’ll need a DocuSign account email and password. You’ll also need an integration key. See Generate Your Integrator Key.
How to do it
Step 1: use the login_information API end point to obtain the base url for use in subsequent API calls, and the user’s account ID. See the recipe Request a Signature via Email for an example of this step.
Step 2: We need an envelope that has not been sent yet, and its ID. In this recipe, we’ll create the envelope from scratch. We set the envelope status to created, so the envelope will remain in the draft state after the method completes.
Step 3: We use the EnvelopeViews::createSender method to retrieve the “tag and send” UI url. Then we re-direct the user’s browser to the url. After the user is done, their browser will be re-directed back to our app.
How it works
This recipe most applies when your app is used to send ad hoc documents. If your app is sending documents of one or more set types, eg the different forms that a new employee signs, then it is much better if your app prepares and tags the documents on behalf of your app’s users — don’t make your users tag documents when your app can do it for them, perhaps by using a template.
When you re-direct the user’s browser to DocuSign to tag and send the envelope’s documents, do not use an iFrame if any of your senders may be using a mobile device. The extra “chrome” of your app will materially degrade the user experience. Instead of an iFrame, use a regular re-direct. Remember that you can brand the DocuSign user experience to use your organization’s logo, color palette, etc.
For mobile native applications, please do not frame or embed the DocuSign UX within your app’s chrome. Instead, provide the entire screen to the DocuSign UX to prevent a degradation of the sender’s user experience.
A related, but quite different goal, is to have your web app’s users sign documents. Please see the Sign via App recipe.