eSignature REST API

The DocuSign eSignature REST API lets you eSign documents, request signatures, and automate your forms and data. To ensure data privacy the DocuSign REST API is served over HTTPS and documents stored in DocuSign are encrypted using AES-256. Learn more about security or check real-time system status.

API Endpoints

All REST API endpoints have the following base:

https://{server}.docusign.net/restapi/v2

DocuSign hosts multiple geo-dispersed ISO 27001-certified and SSAE 16-audited data centers. For example, account holders in North America might have the following baseUrl:

https://na2.docusign.net/restapi/v2/accounts/{accountId}

Whereas European users might access the following baseUrl:

https://eu.docusign.net/restapi/v2/accounts/{accountId}

To access DocuSign workflows and resources you append URIs to your baseUrl. For example to send a signature request append the /envelopes URI to your baseUrl:

https://na2.docusign.net/restapi/v2/accounts/12345/envelopes

To retrieve your specific baseUrl you need to authenticate with the DocuSign platform.

Authentication

The REST API supports http custom header authentication as well as OAuth authorization flows. Custom header authentication is recommended for service integrations that do not require each end user to authenticate with the DocuSign platform. Alternatively, user applications that require end users to authenticate with DocuSign should use OAuth.

HTTP Custom Header

To retrieve your base URL using custom header authentication, also called legacy header, add your username, password, and Integrator Key in JSON format to the X-DocuSign-Authentication http header:

curl -H 'X-DocuSign-Authentication:{"Username": "bob@example.com","Password": "xxx","IntegratorKey": "your_key"}' \
https://www.docusign.net/restapi/v2/login_information

A successful response will contain your account baseUrl which is needed to request signatures and eSign documents:

    {
        "loginAccounts": [{
            "name": "John Dough",
            "accountId": "12345",
            "baseUrl": "https://na2.docusign.net/restapi/v2/accounts/12345",
            "isDefault": "true",
            "userName": "John Dough",
            "userId": "02e6fc42-0c2e-4e8e-ade1-8ed6f140daee",
            "email": "john@example.com",
            "siteDescription": ""
        }]
    }

OAuth

OAuth 2.0 authorization flows using the Authorization: bearer {token} http header are also supported. Learn about OAuth.

Testing

You can test the DocuSign API using a developer sandbox account. Sandbox accounts operate in the demo environment, which is identical to the live production system except documents sent through demo are not legally binding.

All URLs in the demo environment have the following base:

https://demo.docusign.net/restapi/v2/accounts/{accountId}

To create and send a test envelope send an http POST request to:

POST https://demo.docusign.net/restApi/v2/accounts/{accountId}/envelopes

{
    "status": "sent",
    "emailSubject": "Request a signature via email example",
    "documents": [{
        "documentId": "1",
        "name": "contract.pdf",
        "documentBase64": "[base64 encoded file bytes...]"
    }],
    "recipients": {
        "signers": [{
            "name": "[SIGNER NAME]",
            "email": "[SIGNER EMAIL ADDRESS]",
            "recipientId": "1",
            "tabs": {
                "signHereTabs": [{
                    "xPosition": "25",
                    "yPosition": "50",
                    "documentId": "1",
                    "pageNumber": "1"
                }]
            }
        }]
    }
}

Read more about the Envelopes: create API or see the full REST API Reference.