Quickstart
Welcome to the new Quickstart guide! Looking for the original Quickstart repo? Check out the Docusign code example launchers for setup instructions.
Make your first API call with Docusign
Authenticate with Docusign, create your first envelope, and send an agreement for remote signing via email in a single API call.
In this quickstart, you will obtain an OAuth access token, create an envelope containing a document and a signature field, and send it to your recipient’s email inbox. Choose Bash, C#, Java, Node.js, PHP, PowerShell, Python, or Ruby. Code examples for some languages use Docusign SDKs. The workflow uses OAuth 2.0 JWT Grant (Service Integration) in the developer environment.
An envelope contains the documents, recipients, and fields for a signature transaction.
Prerequisites
Create a developer account
Create a free Docusign developer account at https://www.docusign.com/developers/sandbox. Use this account to build and test in the developer environment.
Create and configure an integration key
An integration key, also called a client ID, identifies your application.
- Sign in to your developer account and open Apps and Keys.
- Select Add App and Integration Key, name your app, and create it.
- Copy the integration key.
- Under User Application, select + Add RSA Keypair. Download and save the private key as
private.key. - Under Additional settings, add a Redirect URI:
https://developers.docusign.comand save your changes.
Grant one-time consent:
Open this URL in your browser once to authorize your integration key (replace {INTEGRATION_KEY} with your key):
Obtain your OAuth access token
To make the API call shown in this Quickstart, you need a valid OAuth access token. Docusign recommends three OAuth grant types: Public Authorization Code Grant, Confidential Authorization Code Grant, and JSON Web Token (JWT) Grant. Choose the grant type appropriate for your application and follow the authentication instructions to obtain a token. The SDK examples in this Quickstart use JWT Grant.
Install your language dependencies
Find your language below and complete its setup.
Bash
C#
Java
Node.js
PHP
PowerShell
Python
Ruby
Use Bash with cURL 7.76 or later, jq, and base64. This example calls the REST API directly; no Docusign SDK is required. Save the authentication and API blocks in quickstart.sh.
Call the Docusign API: Send an envelope via email
Remote signing is Docusign’s core workflow: your application creates an envelope containing your document and signature fields, and Docusign delivers an email invitation to the recipient and guides them through signing.
Create and send the envelope in a single API call:
Set status to sent in the request body to send the signing invitation. Select a language tab below to view its code example.
Bash
C#
Java
Node.js
PHP
PowerShell
Python
Ruby
Display the signing experience
Run your example
Run the script from your project directory:
Bash
C#
Java
Node.js
PHP
PowerShell
Python
Ruby
Expected output
Output varies by language. A successful request returns an envelope ID and confirms that the envelope was sent. For example:
Review and sign
- Open the email inbox for your recipient.
- Open the email from Docusign (“Please sign this document from Docusign Quickstart”) and select Review Document.
- Complete the signature field and select Finish.
- In your Docusign Developer Account, go to Manage > Completed to view the completed agreement.
Troubleshoot common issues
consent_requirederror: You must grant consent once before your first JWT API call. Open the consent URL from the Prerequisites section in your browser, log in, and select Accept.- Private key not found: Verify that
private.keyis saved in your project folder and matches the RSA keypair generated in your Docusign Developer Account under Apps and Keys. - Invalid User ID or Account ID: In your developer account, navigate to Settings > Apps and Keys and confirm that your User ID (GUID) and API Account ID match the values in your script.
- Email not received: Check your spam/junk folder. In the developer demo environment, emails are sent from
dse_demo@docusign.net.
Next steps
- Add Embedded (In-App) Signing: If your application requires users to sign directly inside your web app rather than via email, add a call to
EnvelopeViews: createRecipientwith aclientUserId. See the Embedded Signing Guide. - Set Up Webhooks (Docusign Connect): Configure webhooks to listen for real-time envelope status changes (e.g., completed, declined) on your server instead of relying solely on client-side browser events. Explore setup options in the Connect Webhooks guide.
- Explore Full API Capabilities: Review the eSignature REST API Documentation to learn about additional features like bulk sending, templates, and supplemental documents.
- Prepare for Production Deployment: Complete the Go-Live Process to promote your integration key from the sandbox environment to production, updating your redirect URIs and base URLs accordingly.