Skip to content
Chat assistant · ChatGPT

Add e-signatures to your app with ChatGPT

You're asking ChatGPT how to add e-signatures to your app. Give it this prompt: it reads the Esign Comply docs first, then writes the three files for a signup clickwrap in your stack, ready to paste into your project.

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

One prompt, from paste to record
  1. 01
    Paste the prompt into ChatGPTYou
  2. 02
    Add the three files to your projectYou
  3. 03
    Put a test key in your server environmentYou
  4. 04
    Acceptance reported from the user's browserEsign Comply
  5. 05
    Sealed record, receipt and timestampEsign Comply
  6. 06
    Server confirms, then creates the accountYou
Copy-paste prompt

The prompt to paste into ChatGPT

Fill in your stack between the square brackets, then paste this into a new ChatGPT chat. It builds a signup clickwrap: your Terms of Service and Privacy Notice, accepted with your own checkbox and your own button.

What the prompt tells ChatGPT
  • Read setup.md, auth.md and llms.txt before writing anything.
  • Create the session on your server with the secret key, and send only the client token to the browser.
  • Attach the browser SDK to your own checkbox and button. No widget, no iframe.
  • Confirm the record on your server before the account exists.
  • Never invent an API method, and stop and ask when something conflicts.
Generate the prompt for your regions
Prompt for ChatGPT
I am adding a signup clickwrap to my app with Esign Comply: new users accept my Terms of Service and Privacy Notice with my own checkbox and button. My stack: [framework, database, where it is hosted].

First read these pages and follow them exactly. If you cannot open one, tell me and stop. Do not write the integration from memory.
- https://esigncomply.com/setup.md
- https://esigncomply.com/auth.md
- https://esigncomply.com/llms.txt

Then write three complete files for my stack and say where each one goes:
1. Server: create the session with the secret key from the environment variable ESIGNCOMPLY_API_KEY. Send only the client token and the document version IDs to the browser.
2. Browser: my signup form, with @esigncomply/browser attached to the form's own unchecked checkbox and its Create account button. complete() runs from the user's real click.
3. Server: confirm the record with the secret key before the account is created.

Rules
- Never invent API methods, packages or legal wording. Name the docs page each call comes from.
- Never pre-check the box or submit for the user.
- Never ask me to paste my key here. Tell me which environment variable to set.
- If the docs do not cover something, or it conflicts with my stack, stop and ask me.

End with the commands I run to install the packages and to check the page: npx esigncomply check --url http://localhost:3000/signup.
5 steps

How to run it in ChatGPT

ChatGPT is OpenAI's AI assistant. This is the whole run, from a new Esign Comply account to your first test record.

  1. 01
    Create a free account and a test keySign up, then choose Create test key in the dashboard. The key starts with esc_test_ and is shown once. The Free plan needs no card, and test keys work on localhost with no domain.
  2. 02
    Paste the prompt into ChatGPTPut your framework, database and host between the square brackets first. ChatGPT reads the three docs pages and writes three files, each with the path it belongs at. If it says it cannot open a page, open it yourself and paste the text into the chat: all three are plain text.
  3. 03
    Take the files into your projectCopy each file to the path ChatGPT names and install esigncomply and @esigncomply/browser. Set ESIGNCOMPLY_API_KEY in .env.local yourself. The key never goes into the chat.
  4. 04
    Run the app and tick the boxOpen /signup on localhost, tick the checkbox and click Create account. Test keys work on localhost with no setup.
  5. 05
    Paste the findings backRun npx esigncomply check --url http://localhost:3000/signup and paste any finding into the same chat. Each one carries the rule ID, the measurement and the fix, which is what ChatGPT needs to correct the file.
Research prompt

A second prompt, for research with ChatGPT

Still deciding how to do signatures at all? This second prompt has ChatGPT compare the approaches for your app, then show the Esign Comply integration from the docs.

The comparison is yours to read and argue with. The integration part comes from the docs, so every call ChatGPT shows is one you can look up.

See what you can build yourself
Research prompt for ChatGPT
Compare the ways to add e-signatures to my app, then show the Esign Comply integration. My app: [what it does, who signs what]. My stack: [framework and host].

Compare a hosted signing product, an embedded signing component, an open-source tool I host myself, and building the flow in my own UI with Esign Comply keeping the record. For each one: who builds the screen, who holds the record of each signature, what I maintain, and how I hand the evidence to someone else.

Then show the Esign Comply integration for my stack, using only https://esigncomply.com/llms.txt and https://esigncomply.com/setup.md. Name the docs page for each API call, and say so when the docs do not cover something.
The 60-second result

What you have 60 seconds after ChatGPT finishes

Paste the three files in, start the app and sign up once. This is what ChatGPT wrote for you, and the record your first test signup produces.

  1. 01

    The server route that creates the session

    e.g. app/api/ceremony/route.ts

    It holds the secret key, pins the current version of each document and hands the browser a short-lived client token.

  2. 02

    Your signup form, with the SDK attached

    e.g. app/signup/signup-form.tsx

    Your markup and your styles. The SDK renders nothing: it watches your links, your checkbox and your button, and reports what the user did.

  3. 03

    The server confirmation

    e.g. app/api/signup/confirm/route.ts

    The record ID came from the browser, so the server reads the record with the secret key before the account exists.

// app/api/ceremony/route.ts
import { esc } from "@/lib/esigncomply";

export async function POST(request: Request) {
  const { signerId, email, attempt } = await request.json();

  const { data: session, error } = await esc.sessions.create(
    {
      profile: "prof_signup_4f1a",
      signer: {
        external_id: signerId,
        email,
        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",
      },
    },
    { idempotencyKey: `signup-${signerId}-${attempt}` },
  );
  if (error) return Response.json({ error: error.code }, { status: 502 });

  // Save signerId and the pinned version IDs in server-owned state.
  return Response.json({
    clientToken: session.client_token,
    documents: session.documents,
  });
}

The example is for Next.js. Name your stack in the prompt and ChatGPT writes the same three files for it.

The record that appears

One sealed test record, kept by Esign Comply

Recordrec_Z4m8
simple · L1
RecordedWritten durably, receipt signed with ES256
TimestampedExternal RFC 3161 token over the record hash
AnchoredPublic anchor pending
Checkbox changed by a trusted user eventobserved
Terms of Service, version dv_3kT9observed
Server time 2026-11-21T15:03:20.291Zobserved
Signer email dana@example.orgasserted
record_hash sha256:5be7…example record

Your first test record opens in the dashboard with what was observed, what was asserted, and the conformance findings. It is sealed like a live record, on a separate test ledger, and its evidence report is watermarked TEST.

What ChatGPT gets right with the rules, and wrong without them

Ask for a terms checkbox with no context and you get a generic one. The prompt sends ChatGPT to the docs first, so the code it writes comes from the rules.

CR-01block

Affirmative assent control

Without the rules

The checkbox ships already ticked, or a handler ticks it for the user to save a click.

With the prompt

The box renders unchecked and only a real user event changes it. The SDK records its state at load, and the check reports a pre-checked box or a scripted click at block level.

CR-02block

Notice text names every document

Without the rules

One generic line, "By signing up, you agree to our terms", with no document titles and no links.

With the prompt

The notice carries the registered title of every document in the session, each one linked, inside the same container as the checkbox and the button.

CR-03warn

Notice names the action control

Without the rules

"By continuing" or "by clicking below", next to a button that says something else.

With the prompt

The notice names the button by its exact label: "By checking the box and clicking Create account, you agree to the Terms of Service." The check flags vague phrases.

CR-06warn

Notice font size and contrast

Without the rules

Fine print: 10 px, light gray, tucked under a bright button.

With the prompt

The notice is set at body size, never under 12 px, with contrast of at least 4.5 to 1 against its background. The SDK measures both.

CR-08block

Document links resolve to the registered version

Without the rules

A link to /terms that serves whatever is in the repo today, or the legal text pasted into a component.

With the prompt

Every link serves the registered version by its ID, and the record pins that version by SHA-256 hash. Document text is never copied into your code.

Each row is a real conformance rule with its ID and its default level. Esign Comply runs 28 of them over your test records, and every finding names the rule, the measurement and the fix.

Go further with ChatGPT

When the chat gets long, move to a prompt written for your whole project. The generator writes it, and the pages below show what else to build.

A whole product

Build your own signing app

Upload a document, email each signer a link to your own application and collect the signatures there. There are 7 build guides, each with the steps and the code.

Build your own DocuSign
Your stack

Stack guides

The same integration written out for your framework and your host, with working code for the server, the browser and the confirmation.

Browse the stack guides
Live demos

Use cases

NDAs, contractor agreements, consent forms, order forms and terms updates. Each page has a live demo you can sign in test mode.

See the use cases
Prompt generator

The exact rules for your regions

Pick your use case, regions, signer types and stack. You get one prompt to paste into ChatGPT, with your own document and profile IDs and the rule packs you selected.

Generate a prompt

Questions about ChatGPT and e-signatures

Can ChatGPT write an e-signature integration for my app?

Yes. Give ChatGPT the prompt on this page with your stack filled in. It reads the Esign Comply setup runbook first, then writes three files: the server code that creates the session, your signup form with the browser SDK attached, and the server confirmation. You add them to your project.

Should I paste my API key into ChatGPT?

No. The key goes in your server environment as ESIGNCOMPLY_API_KEY, set by you. The prompt tells ChatGPT never to ask for it and to name the environment variable instead. A key that has been pasted anywhere it should not be gets revoked and replaced in the dashboard.

How to handle the key

How do I stop ChatGPT from inventing API methods?

Make it read the docs before it writes. The prompt lists three pages to read first, tells it to stop when a page does not open, and asks for the docs page behind each call. Then run the conformance check on the page it wrote: findings come back with a rule ID and a fix.

Read the quickstart

Can I use ChatGPT to compare e-signature options first?

Yes. The research prompt on this page asks for a comparison of a hosted signing product, an embedded component, a self-hosted open-source tool and your own UI with Esign Comply keeping the record, then for the Esign Comply integration with the docs page behind each call.

What you can build yourself

What do I do with the three files ChatGPT writes?

Copy each one to the path ChatGPT names, install the esigncomply and @esigncomply/browser packages, set a test key in ESIGNCOMPLY_API_KEY and run your app. Tick the box on your signup page and the first test record appears in the Esign Comply dashboard.

Ask ChatGPT for the code. Leave the record to us.

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

ChatGPT is a trademark of its owner. Esign Comply is not affiliated with it.

Working with an AI tool? This page is also available as Markdown: /build/chatgpt.md