<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: indigo esign</title>
    <description>The latest articles on DEV Community by indigo esign (@indigo_esign_172711dd9b44).</description>
    <link>https://dev.to/indigo_esign_172711dd9b44</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4149469%2F07b2f90a-4de8-434b-a0ce-b3dd8c7779af.png</url>
      <title>DEV Community: indigo esign</title>
      <link>https://dev.to/indigo_esign_172711dd9b44</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/indigo_esign_172711dd9b44"/>
    <language>en</language>
    <item>
      <title>Add AI Contract Review and Legally Binding eSignatures to Your App with a REST API</title>
      <dc:creator>indigo esign</dc:creator>
      <pubDate>Tue, 29 Sep 2026 11:20:11 +0000</pubDate>
      <link>https://dev.to/indigo_esign_172711dd9b44/add-ai-contract-review-and-legally-binding-esignatures-to-your-app-with-a-rest-api-370d</link>
      <guid>https://dev.to/indigo_esign_172711dd9b44/add-ai-contract-review-and-legally-binding-esignatures-to-your-app-with-a-rest-api-370d</guid>
      <description>&lt;p&gt;If you're building a SaaS product that handles agreements (vendor onboarding, freelancer contracts, NDAs, leases), you'll eventually hit the same two requirements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Users want to know what they're signing.&lt;/strong&gt; Auto-renewals, uncapped liability and missing clauses are easy to miss.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The signature has to be legally usable&lt;/strong&gt;, with an audit trail you can point to later.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Building both from scratch means wiring up a document parser, an LLM pipeline, signature placement, email delivery, tamper-evident sealing and audit logs. That's a lot of surface area for a feature that isn't your core product.&lt;/p&gt;

&lt;p&gt;This post shows how to do it with a REST API instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're building
&lt;/h2&gt;

&lt;p&gt;A flow where your app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sends a contract for &lt;strong&gt;AI review&lt;/strong&gt; (risk detection, clause extraction, plain-English summary)&lt;/li&gt;
&lt;li&gt;Sends the same document for &lt;strong&gt;eSignature&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Tracks the agreement status and receives a signing link&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://indigoesign.com/" rel="noopener noreferrer"&gt;Indigo eSign&lt;/a&gt; combines AI contract analysis and eSignatures in one platform, so this can be a single request instead of two integrations.&lt;/p&gt;

&lt;h2&gt;
  
  
  The request
&lt;/h2&gt;

&lt;p&gt;Here's a basic example in JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Analyze contract for risks &amp;amp; send for eSignature&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://indigoesign.com/api/v1/sign-request&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Vendor MSA Agreement 2026&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;enable_ai_review&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;risk_threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;signers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;legal@company.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;risk_score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;signing_url&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few things worth noting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;enable_ai_review&lt;/code&gt; turns on the contract analysis for this request.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;risk_threshold&lt;/code&gt; lets you control how sensitive the flagging is.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;signers&lt;/code&gt; defines who signs and in what role.&lt;/li&gt;
&lt;li&gt;The response gives you a &lt;code&gt;risk_score&lt;/code&gt;, the current &lt;code&gt;status&lt;/code&gt;, and a &lt;code&gt;signing_url&lt;/code&gt; you can hand to the signer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This snippet is the minimal shape of the call. For the full list of parameters (document upload, multiple signers, templates and webhooks), see the &lt;a href="https://indigoesign.com/api-docs/" rel="noopener noreferrer"&gt;API documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use the risk score in your own logic
&lt;/h2&gt;

&lt;p&gt;The interesting part isn't the call itself, it's what you do with the result. A few patterns that work well:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gate the signing step.&lt;/strong&gt; If the risk score is above your threshold, route the contract to a human reviewer before it goes out.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;risk_score&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;High&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;notifyLegalTeam&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;risk_score&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;sendSigningLink&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signing_url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Show findings in your UI.&lt;/strong&gt; Surface flagged clauses (for example, an auto-renewal notice period) next to the document so users can make an informed decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Log everything.&lt;/strong&gt; Store the request ID, status changes and audit trail reference alongside your own records. If a contract is ever disputed, you'll want a clean paper trail.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "legally binding" means here
&lt;/h2&gt;

&lt;p&gt;Signatures created through the platform are designed to meet the US ESIGN Act, UETA and the EU eIDAS regulation. Each signed document gets a tamper-evident seal and an audit trail. That said, a few document types (wills and some family-law or court documents, for example) may still require a handwritten signature or notarization, so check your use case with counsel.&lt;/p&gt;

&lt;p&gt;Also worth knowing: signers don't need an account. They sign through an email link on any device, which keeps friction low for external parties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits and plans
&lt;/h2&gt;

&lt;p&gt;API access depends on the plan. At the time of writing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;API access&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;No API keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Basic AI&lt;/td&gt;
&lt;td&gt;$19.90/mo&lt;/td&gt;
&lt;td&gt;1 key, 1 API template&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro AI + Signer&lt;/td&gt;
&lt;td&gt;$49/mo&lt;/td&gt;
&lt;td&gt;10 keys, 50 templates, 1,000 requests/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise&lt;/td&gt;
&lt;td&gt;Custom&lt;/td&gt;
&lt;td&gt;Custom webhooks and SLA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Check the &lt;a href="https://indigoesign.com/pricing/" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt; for current numbers. Currently only PDF documents are supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on AI review
&lt;/h2&gt;

&lt;p&gt;AI risk flagging is a fast first pass, not a replacement for legal advice. It's best at catching the routine stuff (missing clauses, renewal traps, liability caps) so that your lawyer's time goes to the deals that need it. Design your UI so users understand that, and keep a human in the loop for high-stakes contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;You can &lt;a href="https://indigoesign.com/register/" rel="noopener noreferrer"&gt;create a free account&lt;/a&gt; to test the AI review and signing flow in the dashboard first, then grab an API key when you're ready to integrate.&lt;/p&gt;

&lt;p&gt;If you're building something similar, I'd love to hear how you handle contract review in your product. Drop a comment below.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz2pucxiqadjayep7ovll.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz2pucxiqadjayep7ovll.png" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>saas</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
