Trang chủ / Trung tâm blog / DocuSign API: Adding a "Decline" reason comment programmatically

DocuSign API: Adding a "Decline" reason comment programmatically

Shunfang
2026-01-18
3min
Twitter Facebook Linkedin

Understanding Programmatic Decline Reasons in DocuSign API

In the fast-paced world of digital agreements, electronic signature platforms like DocuSign have become essential for businesses streamlining contract workflows. One common challenge arises when signers need to decline a document, often requiring a reason for audit and compliance purposes. Programmatically adding a “Decline” reason comment via the DocuSign API enhances automation, allowing developers to integrate this feature into custom applications without manual intervention. This capability is particularly valuable for enterprises managing high-volume transactions, where tracking declinations can inform process improvements and reduce friction in sales or HR pipelines.

From a business perspective, enabling decline reasons programmatically aligns with DocuSign’s emphasis on robust audit trails and compliance. It ensures that every interaction is documented, which is crucial in regulated industries like finance or healthcare. By leveraging the API, organizations can customize the decline experience, prompting users for specific feedback—such as “Terms not aligned with budget” or “Requires legal review”—and appending it directly to the envelope’s status log. This not only improves transparency but also provides actionable insights for teams to refine templates or negotiation strategies.

image

Implementing Decline Reason Comments via DocuSign API

To add a “Decline” reason comment programmatically, developers typically use DocuSign’s REST API, specifically the Envelopes API endpoints. The process involves updating the envelope status and attaching a comment during the decline action. Here’s a step-by-step guide based on DocuSign’s developer documentation and best practices observed in enterprise integrations.

Step 1: Authenticate and Prepare the Envelope

Begin by obtaining an access token via OAuth 2.0, as required for all API calls. Ensure your developer account is set up under a plan like Intermediate or Advanced, which support envelope modifications (Starter plans have limitations on advanced features). Identify the envelope ID from your initial creation request. For decline scenarios, you’ll use the PUT /envelopes/{envelopeId} endpoint to update the status.

In code, this might look like (using Python with the DocuSign eSign SDK for clarity):

import docusign_esign as docusign

api_client = docusign.ApiClient()
api_client.host = "https://demo.docusign.net/restapi"  # Use production for live
api_client.set_default_header("Authorization", f"Bearer {access_token}")

envelopes_api = docusign.EnvelopesApi(api_client)
envelope_id = "your-envelope-id"

This setup authenticates your session, preparing for envelope interactions.

Step 2: Define the Decline Action with Reason

DocuSign allows signers to decline via the decline method on tabs or the overall envelope. To add a reason programmatically, incorporate it into a comment or note field. Use the EnvelopeDefinition or RecipientUpdate to trigger a decline and append a comment. Key is the status field set to “declined,” combined with a declineReason parameter in the recipient’s update.

For a programmatic decline (e.g., simulating a signer’s action in an automated workflow), update the recipient:

from docusign_esign.models import RecipientUpdateRequest

update_request = RecipientUpdateRequest(
    recipient_id="1",  # Signer ID
    status="declined",
    decline_reason="The proposed terms exceed our current fiscal constraints."  # Custom reason
)

envelopes_api.update_recipients(envelope_id, update_request)

This attaches the reason to the envelope’s audit trail. If the decline occurs client-side (e.g., via embedded signing), capture the reason in a form field and submit it via the POST /envelopes/{envelopeId}/recipients/{recipientId}/decline endpoint, including the reason in the request body as a string parameter.

Step 3: Handle Comments and Audit Integration

To make the reason visible as a comment, link it to a Comment tab in the document. Pre-configure tabs during envelope creation using the Tabs array in SignHere or Note components. When declining, reference the tab ID to populate the comment:

from docusign_esign.models import Document, EnvelopeDefinition, Signer

# During envelope creation
signer = Signer(
    email="signer@example.com",
    name="John Doe",
    recipient_id="1",
    tabs=Tabs(
        comment_tabs=[CommentTab(
            tab_label="DeclineReason",
            document_id="1",
            page_number="1",
            x_position="100",
            y_position="100"
        )]
    )
)

envelope_definition = EnvelopeDefinition(
    email_subject="Please review and sign",
    documents=[Document(document_base64=base64_doc, name="contract.pdf", document_id="1")],
    recipients=Recipients(signers=[signer]),
    status="sent"
)

envelope_summary = envelopes_api.create_envelope(account_id, envelope_definition)

Upon decline, update the comment tab value via PUT /envelopes/{envelopeId}/tabs/{tabId} with the reason text. This ensures the comment appears in the envelope’s history, accessible via GET /envelopes/{envelopeId}/audit_events for reporting.

Step 4: Error Handling and Best Practices

Common pitfalls include quota limits—Advanced plans cap automation sends at ~100 per user annually, so monitor via the API usage dashboard. Always validate the reason length (max 255 characters) to avoid rejection. For compliance, ensure reasons are logged immutably, aligning with standards like ESIGN Act in the US.

Testing in the DocuSign Developer Sandbox is recommended before production. Businesses report that this integration reduces manual follow-ups by 30-40%, as decline reasons feed into CRM systems like Salesforce via webhooks. However, for high-scale use, consider Enterprise plans for custom quotas.

Limitations and Considerations

While powerful, the API doesn’t natively support real-time decline reasons without tab configuration. For bulk declines (e.g., via Bulk Send API in Business Pro), reasons must be batched per recipient. Pricing impacts: Intermediate API plans start at $3,600/year for 100 envelopes/month, scaling costs for heavy automation.

This programmatic approach empowers developers to build resilient workflows, but it requires familiarity with DocuSign’s SDKs (available in Java, .NET, etc.). For teams new to APIs, DocuSign’s support resources or partners can accelerate implementation.


Comparing eSignature platforms with DocuSign or Adobe Sign?

eSignGlobal delivers a more flexible and cost-effective eSignature solution with global compliance, transparent pricing, and faster onboarding.

👉 Start Free Trial


Navigating the eSignature Competitive Landscape

The eSignature market continues to evolve, with DocuSign leading but facing competition from platforms offering varied pricing, compliance, and integration options. From a neutral business viewpoint, selecting a solution depends on factors like API flexibility, regional needs, and cost structures. Below, we overview key players, focusing on their API capabilities for features like decline handling.

DocuSign: The Established Leader

DocuSign dominates with its comprehensive API suite, supporting programmatic declines as outlined earlier. Its eSignature plans range from $10/month for Personal to $40/month per user for Business Pro, with API add-ons from $600/year. Strengths include deep integrations and global reach, though APAC latency and seat-based pricing can increase costs for large teams.

image

Adobe Sign: Enterprise-Focused Integration

Adobe Sign, part of Adobe Document Cloud, excels in seamless ties with Acrobat and Creative Cloud. For API-driven declines, it uses similar REST endpoints to update recipient status with reasons, often via Adobe’s Experience Manager. Pricing starts at $10/user/month for individuals, scaling to enterprise custom quotes. It’s strong for creative workflows but can feel bundled-heavy for standalone eSignature needs.

image

eSignGlobal: APAC-Optimized Challenger

eSignGlobal positions itself as a cost-effective alternative, compliant in 100 mainstream countries globally, with particular strengths in the Asia-Pacific (APAC) region. APAC’s electronic signature landscape is fragmented, with high standards and strict regulations, contrasting the more framework-based ESIGN/eIDAS models in the US/EU. Here, solutions demand “ecosystem-integrated” approaches, including deep hardware/API integrations with government-to-business (G2B) digital identities—far exceeding simple email or self-declaration methods common in the West.

eSignGlobal competes head-on with DocuSign and Adobe Sign worldwide, including in the Americas and Europe, by offering lower entry barriers. Its Essential plan costs just $16.6/month (annual billing), allowing up to 100 documents for signature, unlimited user seats, and verification via access codes—all while maintaining compliance. It integrates seamlessly with Hong Kong’s iAM Smart and Singapore’s Singpass, making it ideal for regional cross-border deals. This setup provides high value for teams prioritizing speed and affordability without sacrificing security.

esignglobal HK


Looking for a smarter alternative to DocuSign?

eSignGlobal delivers a more flexible and cost-effective eSignature solution with global compliance, transparent pricing, and faster onboarding.

👉 Start Free Trial


HelloSign (Dropbox Sign): Simplicity for SMBs

HelloSign, now Dropbox Sign, focuses on user-friendly APIs for quick setups, including decline reasons via webhook callbacks. Basic plans start at $15/month for 20 documents, appealing to small businesses. It’s lightweight but lacks the depth of enterprise features like advanced bulk sends.

Comparative Overview of eSignature Platforms

Feature/Aspect DocuSign Adobe Sign eSignGlobal HelloSign (Dropbox Sign)
API for Decline Reasons Robust REST endpoints with tab integration; supports custom reasons in audits Similar REST API; ties into Adobe ecosystem for workflow reasons API included in Pro plans; ecosystem-integrated for regional compliance Basic webhook support; simple status updates with notes
Pricing (Entry Level, Annual) $120/user (Personal); API from $600 $120/user (Individual) $199 (Essential, unlimited users) $180 (Essentials)
Envelope Limits 5-100/month per plan 10-100/month 100 documents (Essential) 20/month (Basic)
Compliance Focus Global, ESIGN/eIDAS strong US/EU emphasis; GDPR 100 countries; APAC depth (iAM Smart/Singpass) US-centric; basic international
User Seats Per-seat billing Per-user Unlimited Unlimited in higher tiers
Strengths Enterprise scale, integrations Creative/document synergy APAC speed, cost transparency Ease of use for SMBs
Limitations Higher costs for API/APAC Bundle dependency Less brand recognition in West Fewer advanced automations

This table highlights neutral trade-offs: DocuSign for maturity, Adobe for Adobe users, eSignGlobal for regional efficiency, and HelloSign for simplicity.

In summary, while DocuSign’s API remains a benchmark for programmatic decline handling, exploring alternatives like eSignGlobal can offer regional compliance advantages as a balanced DocuSign substitute. Businesses should assess based on specific needs for optimal ROI.

Câu hỏi thường gặp

How can I add a decline reason comment programmatically using the DocuSign API?
To add a decline reason comment in the DocuSign API, use the Envelopes API to update the envelope status to 'declined' via a PUT request to the /envelopes/{envelopeId} endpoint. Include a 'declineReason' field in the envelope update object, such as {"status": "declined", "declineReason": "Reason for declining the document."}. Ensure the recipient is authenticated. For users in Asia requiring enhanced compliance features, eSignGlobal offers a more suitable alternative with robust regional support.
What are the required parameters for specifying a decline reason in the DocuSign API?
How does adding a decline reason comment affect the envelope workflow in DocuSign API?
avatar
Shunfang
Trưởng phòng Quản lý Sản phẩm tại eSignGlobal, một nhà lãnh đạo dày dạn kinh nghiệm quốc tế sâu rộng trong ngành chữ ký điện tử. Theo dõi LinkedIn của tôi
Nhận chữ ký có giá trị pháp lý ngay lập tức!
Dùng thử miễn phí đầy đủ tính năng trong 30 ngày
Email doanh nghiệp
Bắt đầu
tip Chỉ được phép sử dụng email doanh nghiệp