How to hit the Docusign eSignature API

Docusign's eSignature REST API v2.1 lives at https://demo.docusign.net/restapi/v2.1 for developer accounts; production accounts use the base_uri returned by /oauth/userinfo. Most paths include your account id.

Authentication

Docusign uses OAuth. For testing, generate a token in the developer account's app settings or OAuth Token Generator. Send it as Authorization: Bearer <token>. In the examples it's written {{DOCUSIGN_TOKEN}}.

Full reference: https://developers.docusign.com/docs/esign-rest-api/

Who am I (and my account id)

Returns your accounts, each with an account_id and base_uri.

curl https://account-d.docusign.com/oauth/userinfo \
  -H "Authorization: Bearer {{DOCUSIGN_TOKEN}}"
Run in PostTaco

List envelopes

curl "https://demo.docusign.net/restapi/v2.1/accounts/{{ACCOUNT_ID}}/envelopes?from_date=2026-01-01" \
  -H "Authorization: Bearer {{DOCUSIGN_TOKEN}}"
Run in PostTaco

Send from a template

curl -X POST https://demo.docusign.net/restapi/v2.1/accounts/{{ACCOUNT_ID}}/envelopes \
  -H "Authorization: Bearer {{DOCUSIGN_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{"templateId": "{{TEMPLATE_ID}}", "templateRoles": [{"email": "[email protected]", "name": "Jenny Rosen", "roleName": "Signer"}], "status": "sent"}'
Run in PostTaco