Skip to content
Chat assistant · Grokbot

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.

One prompt, from paste to record
  1. 01
    Paste the prompt into GrokbotYou
  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 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.

What the prompt tells Grokbot
  • 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 Grokbot
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.
5 steps

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.

  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 asks for no card, and a test key works on localhost with no domain.
  2. 02
    Ask 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.
  3. 03
    Check 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.
  4. 04
    Move the files into your projectCopy each file to its path, install esigncomply and @esigncomply/browser, and set ESIGNCOMPLY_API_KEY in your server environment yourself. The key stays out of the chat.
  5. 05
    Run it, then bring the findings backOpen your signup page on localhost, tick the checkbox and click Create account. Then run npx esigncomply check --url http://localhost:3000/signup and paste any finding into the same chat, so Grokbot corrects the file it wrote.
Research prompt

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 yourself
Research prompt for Grokbot
Write 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.
The 60-second result

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.

  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 Grokbot 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 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.

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-04block

Notice and control in the same viewport

Without the rules

The agreement line sits in the footer or under a long form, below the fold on a phone.

With the prompt

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.

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-07warn

Single primary action control

Without the rules

Email signup and two social sign-in buttons in one form, all styled as the main action under one notice.

With the prompt

One primary button inside the assent container. Social sign-in gets its own container, its own notice and its own session.

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 Grokbot

One research question answered, one flow running. These pages take you from a signup checkbox to a whole signing product.

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 Grokbot, with your own document and profile IDs and the rule packs you selected.

Generate a prompt

Questions 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 compared

How 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 rules

Does 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 key

What 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 demos

Ask 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.

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