Skip to content

anvilco/anvil-e-signature-api-node-example

Repository files navigation

Horizontal Lockupblack Horizontal Lockup copywhite

Anvil Etch E-Sign API Example App (Node)

This is an example full stack Node / Express / React web app showcasing the Anvil Etch e-sign API implemented with the node-anvil client.

Live Demo

This project is hosted at esign-demo.useanvil.com so you can try it without setting up the example app locally.

What is Anvil?

Anvil provides easy APIs for all things paperwork.

  1. PDF filling API - fill out a PDF template with a web request and structured JSON data.
  2. PDF generation API - send markdown or HTML and Anvil will render it to a PDF.
  3. Etch e-sign with API - customizable, embeddable, e-signature platform with an API to control the signing process end-to-end.
  4. Anvil Workflows (w/ API) - Webforms + PDF + e-sign with a powerful no-code builder. Easily collect structured data, generate PDFs, and request signatures.

Learn more on our Anvil developer page.

What is this app?

The Anvil Etch E-Signature API allows you to collect e-signatures from within your app. Send a signature packet including multiple PDFs, images, and other uploads to one or more signers. Templatize your common PDFs then fill them with your user's information before sending out the signature packet.

The app will create Signature Packets with up to two signers on two PDFs: both a templatized IRS W-4 PDF, and an adhoc NDA PDF that is uploaded for each new packet.

Data input by the user will be used to fill both PDFs before signing. Then the user will go through the signing process via email or the embedded signing process.

Where are the bits?

Set it up

Clone this repo and set it up locally to create signature packets on your own Anvil account via the API.

  1. First create your own Anvil account
  2. The app will ask you to verify your email before continuing
  3. View your organization settings by clicking the building icon in the bottom left followed by the settings icon.
  4. Click API Settings in your organization navigation bar.
  5. Click "Add an API Key"

Now you are ready to set this example up!

# Fork this project + clone your fork, or just clone this repo
git clone https://github.com/...

cd anvil-e-signature-api-node-example
  1. Save a copy of .env.example at the root of this project as .env.
  2. Copy the development API key from your API settings page, then paste it in your .env file.
  3. Start the app!
yarn install # Get all the deps
yarn dev     # Start the server and client in dev mode

Visit http://localhost:8080

Watch the server logs. The logs will show pertinent JSON payloads being sent & received via the API.

Screen Shot 2020-10-28 at 3 12 30 PM

Questions

If you have questions, email us at [email protected].

Other app scripts

# Build the production dist
yarn build

# Start production server
yarn start

# Run the linter, server tests, and client tests
yarn test

yarn lint # Only the linter
yarn test:server # Only the server tests
yarn test:client # Only the client tests