docusign_send_envelope, the template-based e-signature send tool exposed through the Agents Platform.
Authentication
DocuSign tools use the DocuSign connector, which authenticates with JWT Grant (server-to-server) rather than the authorization-code flow. Users configure:integration_key— the app’s client iduser_id— API Username (GUID) of the user to impersonateprivate_key— RSA private key, PEMaccount_id— optional; only needed when the user can reach several accountsenvironment— optional;demo(default) orprod
/oauth/userinfo, and caches both. See docusign.md for setup, the one-time admin consent step, and why JWT Grant is used.
docusign_send_envelope
Creates an envelope from an existing DocuSign template and sends it, emailing each signer a link to sign.
This is a mutating tool. Sending is billed per envelope and cannot be undone.
Inputs
Required:template_id: Id of the template to send.signers: One entry per role the template defines. Each needsrole_name,nameandemail.
email_subject: Overrides the template’s subject.expire_after_days: Stop reminders and block signing this many days after sending.reply_to_email,reply_to_name: Reply-to overrides on the signing email.reference: Your own correlation id, stored on the envelope as areferencecustom field.dry_run: Preview without sending. Defaults tofalse.
role_name must match the template
DocuSign binds each signer to a role declared in the template. Role names are trimmed before sending, but a name the template doesn’t declare leaves DocuSign with no recipient to bind — supply the exact role (e.g. Patient).
Use reference
Matching a completed envelope back to the record that caused it by signer name or email is unreliable — names are entered inconsistently and one person can have several records. Passing your own id (an appointment id, an order number) stores it on the envelope, so completion can be correlated exactly.
Dry run
dry_run: true renders what would be sent and makes no network call — it does not even construct a client. A preview must never be billable.
Output
On success, structured content includes:status:successordry_runenvelope_id: the created envelope’s idenvelope: the envelope object (id, status, subject, timestamps)reference: echoed back for correlation
Notes
- There is no idempotency. Calling twice sends two envelopes and bills twice. Check docusign_get_envelope for an existing envelope before re-sending.
expire_after_daysmaps to DocuSign’s envelope expiration; the warning window is disabled so the only effect is a hard stop.