Skip to content
Chat assistant · Muse

Add e-signatures with Muse, Meta's AI assistant

You use Muse, Meta's AI assistant, to research code before you write it. This prompt points it at the Esign Comply docs and gets you the three files for a signup clickwrap, with the docs page behind every call.

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 MuseYou
  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 Muse

Fill in your stack between the square brackets, then paste this into a new chat with Muse. 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 Muse
  • 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 Muse
I want to add e-signatures to my app with Esign Comply, starting with a signup clickwrap: new users accept my Terms of Service and Privacy Notice with my own checkbox and button. My stack: [framework and host].

Research first. Read these pages and follow them exactly:
- https://esigncomply.com/setup.md
- https://esigncomply.com/auth.md
- https://esigncomply.com/llms.txt
If you cannot read a page, tell me and stop. Do not answer from memory.

Then write the code as three complete files, each with its path:
1. Server: create the session with the secret key from the environment variable ESIGNCOMPLY_API_KEY, and send only the client token and the document version IDs to the browser.
2. Browser: the signup form, with @esigncomply/browser attached to its own unchecked checkbox and its own Create account button. Call complete() from the user's real click.
3. Server: confirm the record with the secret key before granting access.

Under each file, name the docs page every API call comes from.

Rules
- Never invent API methods, packages or legal wording.
- Never pre-check the box or click for the user.
- Never ask me to paste my key into this chat.
- If the docs do not cover a step, or it conflicts with my stack, stop and ask me.
4 steps

How to run it in Muse

Muse is Meta's AI assistant, used for code research. 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 MusePut your framework and host between the square brackets. Muse reads the three docs pages, then writes three files and names the docs page behind every API call under each one. If it tells you it cannot read a page, paste the text of that page into the chat.
  3. 03
    Check the sources, then take the filesOpen the docs pages Muse cites and compare a call or two. Then copy the files to the paths it names and install esigncomply and @esigncomply/browser.
  4. 04
    Set the key, run the app, tick the boxSet ESIGNCOMPLY_API_KEY in your server environment yourself, open your signup page on localhost, tick the checkbox and click Create account.
Research prompt

A second prompt, for research with Muse

Doing the research first? This second prompt has Muse lay out the approaches, then explain the Esign Comply flow call by call from the docs.

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

See what you can build yourself
Research prompt for Muse
Code research: compare ways to add e-signatures to my app and show the Esign Comply integration. My stack: [framework and host].

1. List the approaches: a hosted signing product, an embedded signing component, an open-source tool I host, and my own UI with Esign Comply keeping the record. One paragraph each on who builds the screen and who holds the record.
2. Read https://esigncomply.com/llms.txt and https://esigncomply.com/setup.md. Explain the Esign Comply flow call by call: the session on the server, the ceremony in the browser, the confirmation on the server.
3. For each call, give the endpoint or SDK method and the docs page it comes from.

If the docs do not cover something, say so. Do not invent API methods.
The 60-second result

What you have 60 seconds after Muse finishes

Take the three files, start the app and sign up once. This is the code Muse researched and wrote, 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 Muse 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 Muse gets right with the rules, and wrong without them

Code research is only as good as its sources. The prompt gives Muse the source, the Esign Comply docs, and these are the rules it finds there.

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-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-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 Muse

The docs Muse read cover far more than a signup checkbox. These pages are the short way in.

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

Generate a prompt

Questions about Muse and e-signatures

Can Muse help me add e-signatures to my app?

Yes. Muse is Meta's AI assistant, used for code research. Give it the prompt on this page and it reads the Esign Comply docs, then writes three files for a signup clickwrap and names the docs page behind every API call. You add the files to your project.

What does the research prompt for Muse return?

A comparison and a walkthrough. Muse lists the ways to add e-signatures to an app, with who builds the screen and who holds the record in each, then explains the Esign Comply flow call by call: the session on the server, the ceremony in the browser and the confirmation on the server, with the docs page for each.

What you can build yourself

How do I know the calls Muse used exist?

The prompt asks for the docs page behind every call, so you can open it and compare. Every documentation page is also available as Markdown at the same address plus .md, and esigncomply.com/llms.txt lists them all. If the docs do not cover a step, the prompt tells Muse to stop and ask.

Open the documentation

Where does my API key go?

In your server environment as ESIGNCOMPLY_API_KEY, set by you. The prompt tells Muse never to ask you to paste the key into the chat. Only your server code reads it, and the browser receives a short-lived client token for one session.

Read the quickstart

What do I have after I add the three files?

A signup form with your own checkbox and button, a server that creates the session and confirms the record, and after your first test signup a sealed test record in the Esign Comply dashboard showing what was observed, what was asserted and the conformance findings.

What a record holds

Research it with Muse. Leave the record to us.

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

Muse 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/muse.md