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.

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({
  variables,
})
const packetDetails = data?.data['createEtchPacket']
console.log('Visit the new packet on your dashboard:', packetDetails.detailsURL)

Create & send an e-sign packet in seconds with Document AI

Upload any PDF and watch Anvil Document AI identify input and signature fields, identify signers and connects them to fields. It's free - no signup required.

Get a demo
(from a real person)

Schedule some time on our calendar to talk through your specific use case and see which Anvil products can help.
    Want to try Anvil first?
    Want to try Anvil first?