# The e-signature and clickwrap API for DIY builders.

> The e-signature API and clickwrap API for developers who build their own signing flow with AI coding tools. You build the UI. We supply the rules and keep the record.

Source: https://esigncomply.com/

[Moving off Ironclad Clickwrap? Start here](https://esigncomply.com/migrate/ironclad-clickwrap)

Vibe code the signing flow in your own UI. We give your AI tool the rules and keep the record, so it doesn't live in a table you can edit.

[Get started](https://esigncomply.com/signup) · [Documentation](https://esigncomply.com/docs)

Free plan: 10 live signatures a month and a full test mode. No card required.

## Who it's for

For

Developers and founders building signing or clickwrap into their own app with Cursor, Claude Code, v0, Lovable, Bolt, or Replit.

You're building a signup clickwrap, a checkout terms box, or an NDA page, and you want to own the UI.

[Clickwrap API](https://esigncomply.com/clickwrap) · [E-signature API](https://esigncomply.com/sign)

Also for

Building a whole signing product. Your own DocuSign.

Upload a document, email each signer a link, and they sign inside your app. [See how to build it](https://esigncomply.com/build/docusign-alternative)

Think Resend, but for signing: an API and an SDK you call from your own code.

POST /v1/sessions

## Add a signup clickwrap to the app you already have

Create a session on your server. Attach the SDK to your own checkbox and button. The API stores the record before responding and returns a signed receipt. The external timestamp and public anchors follow asynchronously.

**Server (Next.js)**

```ts
// app/api/ceremony/route.ts
export async function POST(req: Request) {
  const user = await getSignedInUser(req); // your auth, e.g. Supabase Auth

  const res = await fetch("https://esigncomply.com/v1/sessions", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.ESIGNCOMPLY_API_KEY}`, // esc_test_us_...
      "Content-Type": "application/json",
      "Idempotency-Key": `signup-${user.id}-tos-2026-11-21`,
    },
    body: JSON.stringify({
      profile: "prof_signup_us_eu",
      signer: { external_id: user.id, email: user.email, name: user.name, class: "consumer", country: "US" },
      documents: [
        { document: "doc_8Hq2", version: "current" }, // Terms of Service
        { document: "doc_Pv71", version: "current" }, // Privacy Notice
      ],
      context: { url: "http://localhost:3000/signup", locale: "en-US", purpose: "account_signup" },
      expires_in: 1800,
    }),
  });

  if (res.ok === false) return Response.json({ error: "Unable to create ceremony" }, { status: res.status });
  const session = await res.json();
  // Save the resolved versions and signer in server-owned state for confirmation.
  await saveSignupCeremony(user.id, session.documents);
  return Response.json({ clientToken: session.client_token, requiredSteps: session.required_steps, documents: session.documents });
}
```

**Browser**

```
import { EsignComply } from "@esigncomply/browser";

const sessionResponse = await fetch("/api/ceremony", { method: "POST" });
if (sessionResponse.ok === false) throw new Error("Unable to create ceremony");
const { clientToken, documents } = await sessionResponse.json();
// clientToken is a short-lived esc_ct_... token, not a secret API key.

const ceremony = await EsignComply.attach({ clientToken });

await ceremony.presentDocument({
  versionId: documents[0].version_id,
  mode: "hyperlink",
  link: document.querySelector("#tos-link"),
});

await ceremony.presentDocument({
  versionId: documents[1].version_id,
  mode: "hyperlink",
  link: document.querySelector("#privacy-link"),
});

ceremony.observeAssent({
  region: document.querySelector("#assent"),       // notice text, links, checkbox, button
  checkbox: document.querySelector("#agree"),
  submit: document.querySelector("#create-account"),
});

// Call this from the real submit handler, after the SDK records trusted intent.
async function finishSignup() {
  const result = await ceremony.complete(); // { recordId, receipt, verifyUrl }
  await confirmSignupOnYourServer(result.recordId); // Your authenticated server route
}
```

**Confirm on server**

```
// Your authenticated server route loads the expected signer, mode, and versions from server-owned state.
// Use a secret key that can read records.
const res = await fetch(`https://esigncomply.com/v1/records/${recordId}`, {
  headers: { Authorization: `Bearer ${process.env.ESIGNCOMPLY_API_KEY}` },
});
if (res.ok === false) throw new Error("Esign Comply confirmation failed");
const record = await res.json();
const actualVersions = record.documents.map((d: { version_id: string }) => d.version_id).sort();
if (
  ["recorded", "timestamped", "anchored"].includes(record.status) === false ||
  record.signer.external_id !== expectedSignerId ||
  record.livemode !== expectedLivemode ||
  JSON.stringify(actualVersions) !== JSON.stringify([...expectedVersionIds].sort())
) throw new Error("Unexpected signup record");
// Only now grant access. A verified record.completed webhook is another option.
```

**Publish a version**

```
POST /v1/documents/doc_8Hq2/versions
Authorization: Bearer esc_live_us_...
Content-Type: application/json
Idempotency-Key: tos-2026-11-21

{
  "version_label": "2026-11-21",
  "language": "en",
  "effective_at": "2026-12-01T00:00:00Z",
  "content": { "format": "markdown", "text": "# Terms of Service\n..." },
  "material_change": true,
  "summary_of_changes": "Added arbitration clause in section 14."
}
```

**cURL**

```bash
curl https://esigncomply.com/v1/sessions \
  -H "Authorization: Bearer esc_test_us_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: signup-user_7c1d-tos-2026-11-21" \
  -d '{
    "profile": "prof_signup_us_eu",
    "signer": { "external_id": "user_7c1d", "email": "dana@example.org", "name": "Dana Whitfield", "class": "consumer", "country": "US" },
    "documents": [ { "document": "doc_8Hq2", "version": "current" }, { "document": "doc_Pv71", "version": "current" } ],
    "context": { "url": "http://localhost:3000/signup", "locale": "en-US", "purpose": "account_signup" },
    "expires_in": 1800
  }'
```

The signup example uses an L1 profile with no extra required steps and test versions of both documents.

[View the Next.js example](https://esigncomply.com/docs/guides/nextjs) · [Read the quickstart](https://esigncomply.com/docs/quickstart)

## Tell your AI tool exactly what to build

Pick your use case, regions, signer types, and stack. Get one prompt. Paste it into Cursor, Claude Code, v0, Lovable, Bolt, or Replit.

1. **Choose**

   Pick a use case and signer type, then choose jurisdiction packs in any combination.

2. **Paste**

   Copy the prompt or open it in Cursor. Your tool reads the applied rules and wording from the session.

3. **Check**

   Run a conformance check over your test records and see what is missing before you go live.

[Generate a prompt](https://esigncomply.com/product/prompt-generator)

`esigncomply-prompt.md`

\## Required for the record

Create every session on the server with the secret key. Send only client_token to the browser.

Read required_steps from the session and satisfy each one. Do not hard-code steps.

\## Your obligations

Duties the law places on your company, listed so your team can handle them.

\## Recommendations

Suggestions. Ask the developer before applying any that changes the product.

\## What you can send us

Optional reports your company may file. Each is sealed on receipt and marked as supplied by you.

The conformance check tests everything under the first heading.

Why not just log it in Supabase

## Your acceptances table works. It is also yours to edit.

That is the problem with doing this part yourself. In a dispute, you have to explain who could change it and how you know the record is intact.

`public.acceptances`

### Your table

- Written by your own code, on your own server.
- Editable by anyone with database access.
- No independent record of what the interface presented and what the software received.

rec_Z4m8 · receipt

### Our record

- In a direct browser ceremony, the signer's browser reports events straight to us, outside your server.
- We add our server time, bind the record to the exact document version, and seal it with a key held in a separate cloud account.
- We obtain an external RFC 3161 timestamp for the live record. Export the evidence package to verify its integrity and timestamp offline.

**Keep your table. Store our receipt in it.**

[Why a third party keeps the record](https://esigncomply.com/why)

## The part you shouldn't DIY: the record

Esign Comply captures direct browser evidence and seals and stores live records separately from the parties to the agreement.

Record

`rec_Z4m8`

simple · L1

Recorded

Written durably, receipt signed with ES256

Timestamped

External RFC 3161 token over the record hash

Anchored

Public anchor pending

Checkbox changed by a trusted user event · observed

Terms of Service, version dv_3kT9 · observed

Server time 2026-11-21T15:03:20.291Z · observed

Signer email dana@example.org · asserted

record_hash sha256:5be7… · example record

### Direct browser channel

In a direct browser ceremony, events go straight to Esign Comply.

### Our own seal

Receipts signed with ES256, with hardware-backed keys held in a separate AWS account.

### External timestamps

An external RFC 3161 authority timestamps each live record hash asynchronously.

### Append-only ledger

Hash-chained per domain, batched into signed regional Merkle checkpoints every 60 seconds.

### Write-once copy

Protected checkpoint bundles are kept in write-once storage.

### Verify offline

Check an exported package with the open-source esigncomply-verify, without an account.

[How sealing works](https://esigncomply.com/product/evidence)

## Annual pricing per domain

### Free

**$0**

10 live signatures a month on one domain. Full test mode. No card.

### Starter

**$200 per year**

2,000 live events. No certificates included; $20 each when issued.

### Unlimited

**$1,200 per year**

Unlimited events, fair use. 25 certificates per subscription year, then $20 each.

### Enterprise

**from $10,000 per year**

Unlimited certificates.

A bundle of up to 10 documents accepted together is one event. Test events never count. [See pricing](https://esigncomply.com/pricing)

## Questions developers ask

### How do I add a clickwrap to my Next.js app?

Create a session on your server with POST /v1/sessions, then attach the browser SDK to your own checkbox and button. The SDK reports the ceremony from the signer's browser, and the API stores the record and returns a signed receipt you keep next to the user.

[View the Next.js example](https://esigncomply.com/docs/guides/nextjs)

### Can I build e-signatures with Cursor, Claude Code, or Lovable?

Yes. Pick your use case, regions, signer types, and stack, and get one prompt to paste into Cursor, Claude Code, v0, Lovable, Bolt, or Replit. Your tool builds the flow in your own UI, and a conformance check over your test records shows what is missing before you go live.

[Generate a prompt](https://esigncomply.com/product/prompt-generator)

### Can I build my own DocuSign alternative?

Yes. Vibe code the whole product: upload a document, email each signer a link, and they sign inside your app. Your AI tool builds the screens, and Esign Comply gives it the rules and keeps the independent record of every signature.

[Build your own DocuSign](https://esigncomply.com/build/docusign-alternative)

### Why isn't a row in my database enough?

Because the company relying on the row also controls it. In a direct browser ceremony Esign Comply receives the events separately, then seals and externally timestamps the live record. Anyone you give the evidence package to can check its integrity and timestamp offline.

[Why a third party keeps the record](https://esigncomply.com/why)

### Is a DIY clickwrap legally binding?

Electronic signatures and clickwraps are recognized under the U.S. ESIGN Act and state UETA laws: a signature cannot be denied legal effect just because it is electronic. What matters is clear notice, an unmistakable act of assent, and a record of both. Esign Comply gives your AI tool those rules and keeps that record.

[The U.S. rules we apply](https://esigncomply.com/compliance/united-states)

### Is there a free plan?

Yes. The Free plan includes 10 live signature events a month on one verified domain, plus a full test mode with 500 test events a month. No card is required. Starter is $200 per year for 2,000 live signature events.

[See pricing](https://esigncomply.com/pricing)

## Build the signing flow yourself. Leave the record to us.

[Get started](https://esigncomply.com/signup)

Free plan: 10 live signatures a month and a full test mode. No card required.

---

Every page on esigncomply.com has a Markdown version at the same URL plus `.md` (the home page is `https://esigncomply.com/index.md`). https://esigncomply.com/llms.txt lists them.
