Rolando Andrade
Back to projects

Built in 2024

SignatureAPI

Electronic Signature API

SignatureAPI preview

SignatureAPI is a digital signature service that allows you to sign documents online providing a secure and easy API to integrate with other applications.

Electronic signatures look like a solved problem until you try to integrate one. DocuSign charges enterprise prices. HelloSign has API limits. Most tools expect you to use their whole interface, when all you want is the raw signature data.

SignatureAPI started as an internal tool for signing documents in high volume. We needed something that could handle thousands of envelopes a day without costing a fortune. We could not find it, so we built it.

Ten cents per envelope

The digital signature market has a gap. Enterprise tools charge $5 to $10 per envelope. That works for the occasional contract. It stops working when you send thousands of documents a month. Real estate agencies, HR departments and law firms all hit this scaling problem.

We priced SignatureAPI at $0.10 per envelope, and the price drops further at volume. Use cases that were too expensive before became possible.

Five services, one platform

SignatureAPI is built as microservices, with each one owning a clear part of the work. The platform has five main components:

  • The core API runs every operation, manages envelopes and recipients, and handles authentication.
  • The signing ceremony is the signing experience people see, with responsive UI components.
  • The crypto service isolates cryptographic operations and integrates with HSMs.
  • The rendering service processes PDFs, places fields and generates documents.
  • The integrations layer connects to Microsoft Power Automate, Zapier and other platforms.

Because they are separate, each service scales on its own. The crypto service signs, the rendering service processes PDFs, and the API coordinates everything.

The core API

The main API runs on NestJS, with TypeORM connecting to PostgreSQL. The domain model is built around envelopes, documents, recipients and places. An envelope holds the documents and the people who must sign them. A place is a spot on a document where a recipient signs or fills in a field.

When a client creates an envelope through the API, the system validates the request, saves the envelope and queues the documents for background processing. The API answers fast, while heavy work like document rendering and email delivery happens later.

Bull queues with Redis handle all of that background work. Document processing, email sending and webhook delivery all go through the queues.

Signing with an HSM

The crypto service is a separate C# application that creates digital signatures. It integrates with Hardware Security Modules (HSM), physical devices that store private keys and sign with them. Enterprise customers need HSMs for signatures that meet the legal requirements of different jurisdictions.

The service receives a document hash and credentials, asks the HSM to perform the signature, and returns it. This isolation is critical for security. Cryptographic material never touches the main API. Private keys stay inside the HSM, and the crypto service only handles signing.

Rendering PDFs

The rendering-service is another C# application, deployed to AWS Lambda. It renders PDFs, places the signature fields and generates the final signed document.

PDF rendering was harder than we expected. Fonts were the worst part. Documents with embedded fonts sometimes rendered wrong. We spent weeks building a rendering pipeline that handles the edge cases.

SignatureAPI playground interface
SignatureAPI playground interface

The service uses a proprietary PDF library (Xfinium) for precise control over where fields go and how they look.

The signing ceremony

When someone receives a document to sign, they use the ceremony application. It is a Next.js app that shows the document, captures the signature and sends the signed data back to the API.

It relies on a few key libraries:

  • perfect-freehand for smooth signature drawing
  • html-to-image for capturing signature graphics
  • next-intl for internationalization (multiple languages)

The ceremony adapts to any device. Phones need different interface patterns than desktops. We built a responsive experience that works on phones, tablets and computers.

Storage integration with R2 and S3
Storage integration with R2 and S3

Running on AWS

The platform runs on AWS with several services:

  • S3 for document storage
  • KMS for encryption key management
  • SES for transactional emails
  • Lambda for serverless PDF processing
  • CloudFront for signed URL distribution

Enterprise customers can use BYOS (Bring Your Own Storage). They connect their own S3 or R2 bucket, and documents never leave their infrastructure.

Signatures without code

A large share of adoption came from no code tools. We built connectors for two of them.

Microsoft Power Automate is the most popular integration. Users build workflows that send a document for signature when a file appears in SharePoint. When signing completes, the workflow can notify a Teams channel and store the final document in OneDrive.

Zapier offers similar automation and connects to thousands of other apps.

These integrations brought in dozens of new users every week. They do not write code, but they need to automate signatures.

Webhooks with Svix

The platform uses Svix to deliver webhooks. Every important event triggers a webhook to the subscribed endpoints: an envelope is created, a recipient acts, a document is completed.

Svix handles retries and delivery logs, and gives customers a screen to manage their webhooks. Using it was much faster than building our own webhook system. Customers can also see the status and history of every delivery.

Accounts and organizations

Clerk handles user authentication, SSO and organization management. The @clerk/backend SDK checks the token on every API request.

Each organization has:

  • Isolated data (envelopes, documents, recipients)
  • Separate API keys
  • Individual billing and quotas
  • Member role management

Compliance

Enterprise customers need compliance certifications. We achieved:

  • HIPAA compliance for healthcare use cases
  • SOC2 certification (in progress during observation period)

The webrisk module in the API checks URLs and attachments for malicious content. That helps stop phishing attempts sent through signature requests.

Enterprise software is different

SignatureAPI taught me how different enterprise software is from consumer products. Compliance, security audits and legal requirements shape the architecture as much as technical needs do.

Using two languages, TypeScript and C#, was worth the extra complexity. C# has better libraries for cryptography and PDF work. TypeScript is better for APIs and web frontends. Using each where it is strongest makes a better product.

The monorepo with independent services scales well. Teams can work on different parts without getting in each other’s way. Deployment is more complex, but the operational benefits are worth it.

Electronic Signature API — SignatureAPI Integrate legally binding e-signatures into your apps and workflows with our award-winning, developer-friendly API and integrations — starting at just $0.25 per document. signatureapi.com

SignatureAPI is the startup where I work as the lead engineer. If you need high-volume digital signatures at a reasonable price, give it a look.

Interested in working together? Check out my services and pricing to see how we can collaborate on your next project. Let's Build