Developer
Test mode: try the e-signature API without spending sends or creating real signatures
Test mode lets you run the whole signing flow without using any of your plan's sends. Create a key that starts with dsk_test_, or flag a single request as a test. Each test envelope behaves like a real one, but every page is marked TEST - NOT LEGALLY BINDING. Real emails still go out, so use addresses you control.
Three ways to turn it on
If more than one setting is present, a test key wins over everything. With a live key, the header wins over the body, so X-Test-Mode: false overrides "testMode": true.
The sample below expects text tags such as {{signature:1}} in the PDF. If your file has no tags, send "withSignaturePage": true instead of "textTags": true.
curl https://docaisign.com/api/v1/envelopes \
-H "Authorization: Bearer dsk_test_..." \
-H "Content-Type: application/json" \
-d '{"document": {"url": "https://example.com/nda.pdf"}, "textTags": true,
"recipients": [{"name": "Ana Diaz", "email": "[email protected]"}]}' - A test key: tick Test key when you create it on the Developer page
- The header X-Test-Mode: true on a request made with a live key
- "testMode": true in the request body
What is different in a test envelope
These differences make a test easy to recognise, for you and for anyone who receives one.
- It uses none of your plan's sends
- Every page of the signed PDF is marked TEST - NOT LEGALLY BINDING, and the certificate says so
- Email subjects start with [TEST] and the signing page shows a test banner
- API responses and webhook events show "testMode": true
- Report totals, charts and the waiting list leave it out
What stays the same
The rest of the flow is real, which is why the test is worth running. Recipients get real emails and sign the same way. Webhooks fire, and the finished PDF is sealed and can be downloaded.
Three things can surprise you. Test envelopes count toward the daily sending limit on your account. A declined test envelope can still appear under Recent declines on the reports page. The documents CSV export also includes test envelopes and does not mark them, so keep their envelope IDs if you plan to analyse that file.
What a test key can and cannot reach
A test key belongs to your account, so treat it as a secret. It protects real envelopes from being changed, but it does not hide them.
- Blocked on real envelopes: send a draft, void, extend, remind, change a recipient, delete
- Allowed on real envelopes: list them, read their details and field values, download their files
- Also allowed: request a signing link for a real recipient whose turn it is
- Also allowed: create and delete templates, and change the account's webhook
A test plan you can copy
For example, a developer adding contract signing to a booking app could run these checks before launch. Use one mailbox you control for each recipient.
- Create an envelope and confirm the response shows "testMode": true
- Open the email, sign, and confirm your webhook receives recipient-completed and envelope-completed
- Download the signed PDF and the certificate, and check both are marked as tests
- Send another envelope and decline it, then void a third, and confirm your app handles each result
- Stop your webhook endpoint for a few minutes and confirm a retried event is processed only once
Keys for agents, CI and contractors
A test key is the better choice for an AI agent you are still trying out, for automated tests and for a contractor building your integration. Anything they send is free and marked as a test, and they cannot void or alter a live contract.
Remember the limit above: the key can still read real envelopes. If a contractor should not see your live documents, have them work in a separate account that holds no real envelopes. Point automated tests at addresses you own, because every run sends real email.
Going live
Moving to production is a small change, but check each step. Your first live envelope uses one send from your plan, so send it to yourself.
- Create a live key and store it in your production secrets
- Remove X-Test-Mode and testMode from your requests
- Make sure your webhook handler treats live events as real business actions
- Revoke test keys you no longer use on the Developer page; requests with a revoked key get a 401
Source: DocAISign developer docs: test mode (opens in a new tab) ↗
Common questions
Can I turn a finished test envelope into a real one?
No. Send a new envelope with a live key so the document has no test marks.
Can a public signing link run in test mode?
No. Each copy started from a public link is a real envelope and uses one send.
Does bulk send support test mode?
Yes. Use a test key, or send "testMode": true to POST /api/v1/bulk-sends. The CLI bulk command accepts --test.