Ask Grokbot how to add e-signatures to your app
You're researching how to add e-signatures to your app, and you're asking Grokbot. Paste this prompt and the answer is the Esign Comply integration: how it works, then a signup clickwrap for your stack as three files you add to your project.
Free plan: 10 live signatures a month and a full test mode. No card required.
- 01Paste the prompt into GrokbotYou
- 02Add the three files to your projectYou
- 03Put a test key in your server environmentYou
- 04Acceptance reported from the user's browserEsign Comply
- 05Sealed record, receipt and timestampEsign Comply
- 06Server confirms, then creates the accountYou
The prompt to paste into Grokbot
Fill in the square brackets, then paste this into a new chat with Grokbot. It builds a signup clickwrap: your Terms of Service and Privacy Notice, accepted with your own checkbox and your own button.
- Read
setup.md,auth.mdandllms.txtbefore 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.
I am researching how to add e-signatures to my app. My app: [what it does, who signs what]. My stack: [framework, database, host]. Answer with the Esign Comply integration, starting with a signup clickwrap: new users accept my Terms of Service and Privacy Notice with a checkbox and a button that I render myself. Sources first. Read these pages and work only from them: - https://esigncomply.com/setup.md - https://esigncomply.com/auth.md - https://esigncomply.com/llms.txt If one does not open, name it and stop. Do not fill the gap from memory. Part 1, how it works: the sequence from session to sealed record in five lines, with what runs on my server and what runs in the browser. Part 2, the code: three complete files for my stack, each with its path. 1. Server: create the session with the secret key from ESIGNCOMPLY_API_KEY. Send the browser only the client token and the document version IDs. 2. Browser: my signup form with @esigncomply/browser attached to my own unchecked checkbox and my own 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. Cite the docs page for each call. - Never pre-check the box or submit for the user. - Never ask for my key in this chat. Name the environment variable. - If the docs do not cover something, or it conflicts with my stack, stop and ask me.
How to run it in Grokbot
Grokbot is an AI assistant that can code and, more importantly, is used when researching engineering questions. This is the whole run, from a new Esign Comply account to your first test record.
- 01Create 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 asks for no card, and a test key works onlocalhostwith no domain. - 02Ask Grokbot the questionDescribe your app and your stack between the square brackets and paste the prompt. The answer comes in two parts: how the integration works, from session to sealed record, then three files with their paths. If Grokbot names a page it could not open, paste that page's text into the chat: all three are plain text.
- 03Check part 1 against the docsResearch is useful when you can check it. Every call in the answer carries its docs page, so open one or two and compare them before you copy any code.
- 04Move the files into your projectCopy each file to its path, install
esigncomplyand@esigncomply/browser, and setESIGNCOMPLY_API_KEYin your server environment yourself. The key stays out of the chat. - 05Run it, then bring the findings backOpen your signup page on
localhost, tick the checkbox and click Create account. Then runnpx esigncomply check --url http:/and paste any finding into the same chat, so Grokbot corrects the file it wrote./localhost:3000 /signup
A second prompt, for research with Grokbot
Not ready for code? This second prompt asks Grokbot for an engineering brief: what a signing flow has to record, the ways to get one, and the Esign Comply request sequence from the docs.
The comparison is yours to read and argue with. The integration part comes from the docs, so every call Grokbot shows is one you can look up.
See what you can build yourselfWrite me a short engineering brief on adding e-signatures to an app I build myself. My app: [what it does, who signs what]. My stack: [framework and host]. Cover, in this order: 1. What a signing flow has to record: what the signer was shown, what they did, and when. 2. The ways to get one: buy a hosted signing product, embed a vendor's signing screen, self-host an open-source tool, or build the screens in my own UI with Esign Comply as the independent record keeper. For each: who builds the screen, who holds the record, and what I maintain. 3. The Esign Comply request sequence for my stack, from https://esigncomply.com/setup.md and https://esigncomply.com/llms.txt: each call in order, where it runs, and the docs page it comes from. 4. What to test before going live, from the same docs. Mark every statement that does not come from those two pages as your own view. Do not invent API methods.
What you have 60 seconds after Grokbot finishes
Add the three files, start the app and sign up once. This is the code from Grokbot's answer, and the record Esign Comply holds after that first test signup.
- 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.
- 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.
- 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, }); }
// app/signup/signup-form.tsx import { EsignComply } from "@esigncomply/browser"; // After /api/ceremony returns clientToken and documents: 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"), }); await ceremony.observeAssent({ region: document.querySelector("#assent"), // notice, links, box, button checkbox: document.querySelector("#agree"), // yours, unchecked submit: document.querySelector("#create-account"), // your button }); // Called from the real submit handler, after the user ticked the box. async function finishSignup() { const result = await ceremony.complete(); // result: { recordId, receipt, verifyUrl, status } await fetch("/api/signup/confirm", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ recordId: result.recordId }), }); }
// app/api/signup/confirm/route.ts import { esc } from "@/lib/esigncomply"; export async function POST(request: Request) { const { recordId } = await request.json(); const expected = await loadCeremonyState(request); // server-owned state const { data: record, error } = await esc.records.get(recordId); if (error) return Response.json({ confirmed: false }, { status: 409 }); const versions = record.documents.map((d) => d.version_id).sort(); const confirmed = ["recorded", "timestamped", "anchored"].includes(record.status) && record.livemode === (process.env.VERCEL_ENV === "production") && record.signer.external_id === expected.signerId && versions.join() === [...expected.versionIds].sort().join(); if (!confirmed) return Response.json({ confirmed: false }, { status: 409 }); // Only now create the account. return Response.json({ confirmed: true }); }
The example is for Next.js. Name your stack in the prompt and Grokbot writes the same three files for it.
One sealed test record, kept by Esign Comply
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 Grokbot gets right with the rules, and wrong without them
A research answer explains a signing flow well and leaves out what the screen is measured on. The prompt ties Grokbot to the docs, where each of those measurements is a numbered rule.
Affirmative assent control
The checkbox ships already ticked, or a handler ticks it for the user to save a click.
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.
Notice and control in the same viewport
The agreement line sits in the footer or under a long form, below the fold on a phone.
The notice sits directly above the button in the same container. The SDK records both positions at the signing act, and the check runs your page at 390 by 844.
Notice font size and contrast
Fine print: 10 px, light gray, tucked under a bright button.
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.
Single primary action control
Email signup and two social sign-in buttons in one form, all styled as the main action under one notice.
One primary button inside the assent container. Social sign-in gets its own container, its own notice and its own session.
Document links resolve to the registered version
A link to /terms that serves whatever is in the repo today, or the legal text pasted into a component.
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 Grokbot
One research question answered, one flow running. These pages take you from a signup checkbox to a whole signing 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 DocuSignStack 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 guidesUse 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 casesThe exact rules for your regions
Pick your use case, regions, signer types and stack. You get one prompt to paste into Grokbot, with your own document and profile IDs and the rule packs you selected.
Generate a promptQuestions about Grokbot and e-signatures
Can I ask Grokbot how to add e-signatures to my app?
Yes. Paste the prompt on this page with your app and stack filled in. Grokbot answers with the Esign Comply integration in two parts: how it works, from session to sealed record, and three files for a signup clickwrap, with the docs page behind each call. You copy the files into your project.
What does the engineering brief prompt return?
A short brief in four parts: what a signing flow has to record, the ways to get one with who builds the screen and who holds the record in each, the Esign Comply request sequence for your stack with the docs page for every call, and what to test before going live.
E-signature APIs comparedHow do I check that Grokbot's answer is right?
Two ways. The prompt has Grokbot cite the docs page for each call, so you open the page and compare. Then you run the code: tick the box on your signup page with a test key and run npx esigncomply check --url http://localhost:3000/signup. Each finding carries the rule ID, the measurement and the fix.
Read the conformance rulesDoes my API key go into the Grokbot chat?
No. Set it yourself in your server environment as ESIGNCOMPLY_API_KEY. The prompt tells Grokbot to name the variable and never to ask for the key. The files it writes read the variable on the server, and the browser receives a short-lived client token for one session.
How to handle the keyWhat can I build after the signup clickwrap?
Anything that needs a signature: NDAs, contractor agreements, order forms, consent forms and terms updates, up to a full send-for-signature app with uploads and signing links. The prompt generator writes the prompt for each one, with the rules for your regions and your stack.
Use cases with live demosAsk Grokbot the question. Build the answer. Leave the record to us.
Free plan: 10 live signatures a month and a full test mode. No card required.
Grokbot is a trademark of its owner. Esign Comply is not affiliated with it.