This QuickStart shows you how to:
The examples here and later on
to show how to make HTTP requests.
If you prefer, you may find it more convenient
to use a tool such as Postman.
In your application you might use one of the client SDKs
rather than making HTTP requests directly.
Create Your Developer Sandbox
Developer sandboxes are completely free,
they never expire,
and you get access to enterprise level features.
Create your developer sandbox.
After creating your sandbox account,
you will get an email to confirm your account.
Confirm your account,
and set up a password
for the sandbox.
Once you do that
you’ll be logged in
to your developer sandbox.
Developer sandbox accounts operate in the DocuSign demo environment.
Documents sent through this environment are not legally binding
and have watermarks indicating they are tests.
Generate an Integrator Key
Your integrator key (also known as a client id)
is a unique identifier that authenticates your account
with the DocuSign API. To create yours, log in
to your developer sandbox then follow these steps:
Go to DocuSign Admin
Select the Go to Admin link in the account settings drop-down menu
in the upper left corner.
Alternatively, you can go to this address
In DocuSign Admin, click API and Keys in the left
Click ADD INTEGRATOR KEY.
Add a description for your application.
For the time being
ignore the This is a mobile app checkbox.
A new modal dialog opens to let you add
additional information if you’re using
one of the OAuth authentication flows.
You’ll be using a simpler form of authentication
for this QuickStart, so click CANCEL.
Your integrator key is a string
that appears in the My Integrator Keys section
of DocuSign Admin. It looks something like this:
You’ll use this key to authenticate your API requests.
Authenticate and Get Your Base URL
This and later examples
use legacy header authentication
which is easier to use while learning the API
but is not recommended for production applications.
See Authentication Overview
to learn more about your authentication options.
Your first call to the DocuSign REST API
is to the
to get account information
You’ll use the
baseURL to make all the subsequent API requests.
and to obtain the URL that you’ll use to make more requests.
$ curl -i -H 'X-DocuSign-Authentication:
The response will look similar to this:
"name": "Dev Eloper",
"userName": "Dev Eloper",
Since we’re using
legacy header authentication,
every request must include an
to authenticate the request.
The value of this header should be a JSON string that looks like this:
"IntegratorKey":"your integrator key"
The result contains information about
all of the login accounts
associated with your account.
The most useful value to you right now
This is the URL that you’ll use
for all your requests.
In the production environment
baseUrl will contain the address
of a production server.
Make a Request to the REST API
Armed with your
baseUrl and authentication header,
you’re ready to start creating envelopes and sending signature requests.
To send a signature request for a document
you need to call the
Envelopes: create method
POST request to the
"emailSubject": "DocuSign REST API Quickstart Sample",
"emailBlurb": "Shows how to create and send an envelope from a document.",
"name": "Sally Smith",
"documentBase64": "<base64 encoded document bytes>"
A successful response looks like:
You can use the REST API Explorer
to test the
Envelopes: create API in real time.
Since we are not defining any tabs in the above request
the request uses the
free-form signing workflow
in which the recipient decides where to sign the document.
status property is set to
in this example,
the envelope will be sent immediately.
If the status was
the envelope would be
saved as a draft to be sent later.
XML Formatted Requests and Responses
DocuSign’s REST API also accepts XML-formatted requests. To render requests and
responses in XML add the following headers to your requests:
Alternatively you can also append
.xml to each endpoint you access to force XML
You can also supply the
X-DocuSign-Authentication header in XML.
The XML in this example is formatted to be easier to read.
The response is actually rendered as an unformatted string.
To create and send an envelope (i.e. signature request) through the REST API using
XML format make the following http POST request:
<emailSubject>DocuSign REST API Quickstart sample</emailSubject>
<emailSubject>This example uses xml</emailSubject>
<documentBase64>base64 encoded document bytes</documentBase64>
A successful response in XML looks like: