Product teams should be thinking differently about documents.Read blog post.
Anvil Logo

E-signatures with TypeScript

A simple API for signing PDFs from your app. Set up an etch e-signature packet and use TypeScript to send or embed the e-sign experience.
Beyond giant hero assetGiant hero assetDesktop hero assetMobile hero assetTablet hero asset

Embed or send e-signature requests

Simple, legally binding e-signatures. Generate or upload a PDF, define the signers, and send out an e-signature request all over API.

TypeScript to signature

Use TypeScript to set up an Etch e-signature packet. Then send the packet for signature over email or directly from your app.

const variables = {
  name: `Test Docs - ${signerName}`,
  signatureEmailSubject: 'Custom email subject',
  signatureEmailBody: 'Custom please sign these documents....',
  files: [
      // Our ID we will use to reference and fill it with data.
      id: 'sampleTemplate',
      castEid: pdfTemplateID,
  ], data: {
    payloads: {
      // 'sampleTemplate' is the sample template ID specified above
      sampleTemplate: {
        data: {
          name: signerName,
          email: signerEmail,
  }, signers: [
      id: 'signer1',
      name: signerName,
      email: signerEmail,
      signerType: 'email',
      // These fields will be presented when this signer signs.
      fields: [
          fileId: 'sampleTemplate',
          fieldId: 'signature',

const anvilClient = new Anvil({ apiKey })
const { statusCode, data, errors } : Anvil.GraphQLResponse = await anvilClient.createEtchPacket({
const packetDetails = data?.data['createEtchPacket']
console.log('Visit the new packet on your dashboard:', packetDetails.detailsURL)

Try e-signatures now

Upload a PDF, create a free etch packet, and send to your signers using the demo below to see what you can automate with TypeScript and the Anvil e-signature API.

Sign up for a live demo

Request a 30-minute live demo today and we'll get in touch shortly. During the meeting our Sales team will help you find the right solution, including:
  • Simplifying data gathering
  • Streamlining document preparation
  • Requesting e-signatures
  • Building and scaling your business
Want to try Anvil first?Sign up for free
Want to try Anvil first?Sign up for free