This tutorial shows how eSignAnyWhere can be implemented. This guide is intended to get to know the basics of a signature request workflow. After this guide you will be able to upload documents, create envelopes and send envelopes. For more information about the REST API you can also start with the Postman Tutorial.
eSignAnyWhere can be easily implemented. This tutorial shows you how to send your first envelope via REST api service of eSignAnyWhere. If you are using Postman for your REST calls please also have a look at the following Tutorial: Visit postman tutorial.
Please also see the developer mode: Developer mode
For this tutorial you can use your desired programming language (with REST support) or any REST tool (e. g. Postman). Moreover you will need an active eSignAnyWhere account for the authorization. (Even a trial account will work).
Some other interesting documentation links:
For this tutorial please use the following endpoint and the following api documentation link:
What the tutorial is about
The tutorial will show you the following basic use-case:
Before starting with the first request please note the following:
All api calls need an authorization. You authorize with the
The API token is a user specific secret which should not be shared with other users. We recommend to create different API keys for different application integrations, to avoid configuring the same key in various integration systems. This allows, e.g. in case of sharing a key by mistake, to disable one key while keeping other integrations working with their existing configuration.
If you authorize with the apiToken just add the apiToken in the header of the api call. Please see the next sample authorization (Bearer token):
Please see the next sample authorization (api token):
First we will try the connection with a version request. You can find the endpoints in the next table:
First we have to upload a document. This will return a documentId, to use the document for creating an envelope. Therefore, we will use the following endpoint:
For this tutorial we just use a simple PDF document. You can download it here or use your own document.
You need the documentId for creating your first envelope. After uploading the file it is just temporary on the server. After 10 minutes it will be deleted and you are not able to use it again. The moment you are creating an envelope with the file, it gets the time-to-live of the envelope. Attention: The returned file id is just for creating an envelope. Once the envelope is created, the file id becomes invalid, so for downloading a finished file, you have to retrieve the id from the envelope status with the following URI for REST: https://demo.esignanywhere.net/Api/v6.0/envelope/##envelopeId## (Replace the placeholder ##envelopeId## with your envelope id.
Prepare envelope (optional)
This step is only optional, but required if you do not have a configuration. A configuration is a definition of a signing task for one activity. So it contains information about signature fields on the document, form-fields, etc. With the Developer-Feature of eSignAnyWhere 2.6 it is not required anymore.
A configuration is required for each signing step in your workflow. If you have already your configuration you can skip this step.
To receive an adhoc configuration you can use the following endpoint:
Additional parameters can be added to this call (optional):
The following response shows an empty document with no unassigned elements and no assigned activities. If there are any form fields already on the document you will get the configuration shown with this call.
For sending an envelope we are using the following endpoint:
The envelope configuration defines the envelope and the steps in the workflow. For each action you need to define a configuration, which defines what the signer has to do in his/her singing task.
You can find a sample configuration which contains two actions (one action which contains a signer with ClickToSign and one Action which contains a send copy to the given recipient configuration) for this call in the next section:
The envelope id is used for managing the envelopes (send reminder, cancel delete, reject envelope,…).
After the successful creation of the envelope, it is sent to the first recipient.
Find the envelope
After sending the envelope you can use the following api call to search for the envelope:
In the next section you can find a sample configuration which you need for the api call:
Following status are available:
Please note: The SearchText searches texts within the following elements:
- First name
- Last name
- Email address
- Email body
- Email body
- Envelope name
- Envelope description
- First name
- Last name
- Email address
- User id
Please note that the configuration above shows all available filters you may want to use. You can also just search for example for completed envelopes. Therefore only the following configuration is needed:
You can search for the following status:
If you have not finished the envelope then search for “Active” envelopes, if the envelope is already finished please search for “Completed” envelopes to find the envelope you have sent in the api call above.
As response from this api call you will get a list of all envelopes which fulfill the status. Please see the following sample response:
The envelope id can be used any time to receive the envelope status. Therefore, you simply call:
You can find a sample response for this call in the next section:
The configured callback URL is used to notify your system if the state of an envelope or workstep is changing.
So you can track the status of envelopes without polling the eSignAnyWhere server regularly.
Please note the following referring callbacks:
Only the envelope callback is fired, when the envelope is in a final state. The status update callback is fired by a sub-component and you may require to wait a post-processing time that the envelope reaches its final state. Therefore, please send back the HTTP 200 immediately!
If you are not returning the HTTP 200 immediately, eSignAnyWhere tries to recall the URL.
Attention: After some attempts the envelope will not be finished!
Due to these notes please send the message immediately after you receive the callback and before other callback-processing starts (e.g. download documents) to avoid a timeout of the callback!
Download finished document
First you need the following api call to get the fileIds of the document (please note that this method is only for completed envelopes):
To download a finished document you can call the function:
Just insert one of the following file ids:
- Finished document
- File id
- Audit trail
- Filed id
- XML File id
Depending on the signature method used, it might be necessary or recommended to store additional documents beside the signed document, to ensure having the necessary evidence. For advanced electronic signatures, you might have to store also the audit trail document; and for Namirial Disposable Certificate, also the Certificate Request Form by which the signer requested issuance of the QEC. Those documents can be downloaded using the same method, just with the different file IDs.