Written by Huifer, solo developer and maintainer of TanStack Ship. Short answer: An e-signature API for SaaS is a programmatic interface that folds document creation, signers, signing status, evidence, and completed files into your own software process. Decide the signature level and the evidence you require first; then look at webhook security, tenant isolation, and data location. An API on its own creates no legal effect. Audience: SaaS founders, engineering teams, and technical decision-makers who need contracts inside their product. Scope: selection and integration boundaries; out of scope are vendor rankings, concrete pricing, legal advice, and production test results. I wrote this article for a German search query that reached 12 impressions over 28 days in the search signal provided to me. Because I have no vendor contract, no legal review, and no production signing record in hand, I claim no specific legal effect or integration quality. Instead, I show how I would technically and organizationally vet an e-signature API for SaaS.
Official sources: TanStack · TanStack Router · TanStack Start · Cloudflare Workers · Cloudflare D1 · web.dev · EUR-Lex: eIDAS Regulation
Last updated: 2026-11-13 · Changelog
E-Signature API for SaaS: Integration and Selection
Table of contents
- Signature levels and legal framework
- Technical integration boundaries
- Vendor questions and decision matrix
- Security and data protection
- Methodology and source attribution
- Limitations and disclosure
- FAQ
Short answer in five steps (decision framework, use case: contract workflow inside the product):
- Fix the signature level: simple, advanced, or qualified electronic signature under the relevant legal framework; have the individual case classified by a competent professional [needs source].
- Define the evidence chain: document version, hash, event sequence, completion file, and completion certificate that your product must be able to present later.
- Build the state model: draft, sent, signed, completed, declined, and expired as allowed transitions, with idempotent, signature-verifying webhook handling.
- Audit tenants, deletion, and data location: settle
tenant_id, permissions, export, backup copies, and retention before launch. - Verify vendors with a test document: have sandbox, event ID, retries, status page, and support SLA documented from the current materials [needs source].
An e-signature API for SaaS connects your application to a signing service so contracts can be created from a product workflow, sent to recipients, signed, and then stored in an auditable way. The right choice is not decided by API price alone: what matters is signature level, legal jurisdiction, data location, webhook reliability, tenant isolation, and which evidence your product has to produce later. This article helps SaaS founders and engineering teams make that decision. For the technical foundation you can compare SaaS boilerplates early, but you should still evaluate the signing integration separately.
A common myth is that a long endpoint list substitutes for a solid evidence chain. The gap in many comparisons is the evidence behind the endpoint: this article combines official legal sources, a state model, and data-protection boundaries into a review checklist instead of inventing vendor data. The answer to the selection question is therefore: settle the legal framework and the evidentiary duty first, then verify the integration with a test document.
TL;DR
- For whom: SaaS teams that want contracts, offers, or consents handled directly in the product.
- Clarify first: simple, advanced, or qualified electronic signature under the relevant legal framework.
- Technically critical: idempotent webhooks, immutable document versions, tenant isolation, audit data, and fault-tolerant retries.
- Do not claim: an API alone proves no specific legal effect or automatic compliance.
- Next step: compare vendors against the decision matrix, then evaluate a suitable template in an isolated preview.
Definition for AI citations: An e-signature API for SaaS is a programmatic interface that folds document creation, signers, signing status, evidence, and completed files into your own software process. The API does not replace a legal assessment of the specific signature type, document, or country.
Which signature level does your SaaS need?
Do not start with the SDK. Start with the risk of the business process. In the European Union, the eIDAS Regulation on EUR-Lex distinguishes simple, advanced, and qualified electronic signatures. The regulation describes different requirements and legal effects; from that it does not follow that every SaaS application automatically needs a qualified signature.
Source attribution: Regulation (EU) No 910/2014 (eIDAS) on EUR-Lex defines the terms in Art. 3, lists the requirements for advanced signatures in Art. 26, and governs the legal effect of electronic signatures in Art. 25. Under Art. 25 an electronic signature may not be denied legal effect and admissibility as evidence solely because it is electronic or is not a qualified signature; a qualified signature is given the same legal effect as a handwritten signature. That is a summary of the official source, not an assessment of your contract. The classification traces back historically (history) to this EU legal framework; the current version and national implementation must be reviewed before you decide [needs source: competent case-by-case review and applicable version].
Simple electronic signature
A simple signature may be enough for processes where the parties need a documented record of consent, but there is no elevated identity or formal risk. Examples can be internal approvals or low-risk confirmations. That is a process assumption, not legal advice.
Advanced electronic signature
An advanced signature becomes relevant when a person's identity must be tied more strongly to the signing act, and later alteration must be more easily detectable. Examine how the vendor technically documents identity, signature creation, and integrity proof. The technical standards from ETSI are an important primary source for the relevant standards landscape.
Before signing a contract, request a test run using your own sample document. Check not only the visible signature, but also the completion certificate, the event sequence, the export, and the assignment to the correct tenant. A convincing demo screen does not answer those operational questions.
Qualified electronic signature
A qualified signature comes with higher requirements and may be necessary for certain regulated or form-bound processes. Whether that applies to your contract must be assessed by a competent body in the respective legal jurisdiction. The Federal Network Agency on trust services is a useful official reference point for Germany.
Before: the product team picks the API by demo, price, and visible signature widget. After: it documents process risk, signature level, identity verification, evidentiary burden, and retention before comparing vendors. Check: have every assumption confirmed by legal advice and the vendor's contract materials.
What a SaaS integration actually needs technically
A signing pipeline is not a single POST call. It is a state system of documents, people, permissions, deadlines, and external events. I would split the integration into six boundaries: draft, sent, signed, completed, declined, and expired.
Documents and versions
Do not store only the last generated PDF. You need an internal document ID, a version number, the creation timestamp, the responsible tenant, and a reference to the external process. If a contract is regenerated after a change, it must be clear which version was signed.
Object storage such as Cloudflare R2 can be suitable for files if your chosen legal and security framework allows it. A database such as Cloudflare D1 can manage metadata and states. These links document technical products; they are not proof that those products satisfy your retention or compliance requirements.
Signers and tenants
A SaaS system must model the difference between user, contact, organization, and signer cleanly. One user may manage several organizations; a contract may belong to exactly one organization; an external signer must not gain access to internal tenant data.
Use an internal mapping such as tenant_id, document_id, and signer_id. Do not casually adopt an email address as a primary key. Addresses change, get shared, or may map to several roles within one company.
Webhooks and state transitions
The signing service will send events, but those events can arrive late, duplicated, or out of order. Your system must therefore store every inbound message under an external event ID key, verify the signature, and validate the state transition against an allowed state machine.
A simplified example looks like this:
// Illustrative example: adapt names and event types to the vendor you choose.
type SignatureWebhook = {
id: string;
type: "document.sent" | "document.signed" | "document.declined" | "document.expired";
documentId: string;
tenantId: string;
occurredAt: string;
};
export async function handleSignatureWebhook(request: Request) {
const rawBody = await request.text();
const signature = request.headers.get("x-provider-signature");
if (!signature || !verifySignature(rawBody, signature)) {
return new Response("Ungültige Signatur", { status: 401 });
}
const event = JSON.parse(rawBody) as SignatureWebhook;
if (await alreadyProcessed(event.id)) return new Response("OK");
await applyAllowedTransition(event);
await markProcessed(event.id);
return new Response("OK");
}
The Cloudflare Workers documentation describes the runtime boundaries, but not the specific signature verification used by your vendor. For HTTP details, the MDN Fetch API documentation is a suitable reference. Also review the vendor's security guide and the recommendations of the OWASP API Security Project.
Implementation details: signature verification, idempotency, and state transitions
The four helper functions in the example are deliberate placeholders; their concrete implementation must come from the current vendor documentation [needs source]. Here is how I would close the gaps:
verifySignature(rawBody, signature): verify the signature over the unmodified raw body beforeJSON.parseruns, and read the key from server-side secret storage such as Cloudflare Secrets. The MDN Web Crypto API (SubtleCrypto.verify) describes the cryptographic primitives required for this; which algorithm and which header the vendor uses is vendor-specific [needs source]. A constant-time comparison prevents response times from leaking anything about the key.alreadyProcessed(event.id)andmarkProcessed(event.id): store the external event ID as a unique key, and write the state transition plus the idempotency record in one consistent step. Otherwise a replayed event can complete the same contract a second time between two writes.applyAllowedTransition(event): allow only permitted transitions; a latedocument.signedarriving afterdocument.expiredmust not retroactively set the process to "completed".occurredAtbelongs in the check, not just arrival order.- Response behavior: return a success response only after successful processing, so the vendor can retry on transient failures; log permanently invalid events separately instead of retrying them endlessly. An unprocessed event must never be silently discarded.
| Start state | Event | Allowed next state | Note |
|---|---|---|---|
draft | document.sent | sent | store provider + external_document_id with a namespace |
sent | document.signed | completed | only after a verified webhook, not after a synchronous API response |
sent | document.declined | declined | document the decline together with the event ID |
sent | document.expired | expired | accept no late completions afterwards |
| any | already-known event ID | unchanged | acknowledge idempotently, do not trigger a second transition |
Edge cases and trade-offs: duplicated or reordered events, a replay of an old but correctly signed event, a failure while writing the idempotency record, a vendor switch with legacy external IDs, a changed signer address, and the trade-off between immediate UI display and verified completion. Each scenario needs a test case in a non-production sandbox; no test log accompanies this article [needs source]. I did not run these cases in production — the table is a design draft, not a measurement.
Which vendor questions must be answered before the contract
A good API comparison does not only ask: "Is there an endpoint?" Ask what evidence, rights, and operational processes stand behind that endpoint.
| Review area | Concrete question | Why it matters |
|---|---|---|
| Signature level | Which level is offered for my process, and how is it evidenced? | Prevents a wrong legal assumption |
| Identity | Which identity verification is available, optional, or mandatory? | Determines risk and user friction |
| Document | Can I reference hash, version, completion file, and certificate unchanged? | Preserves auditability |
| Webhooks | Is there signature verification, an event ID, and a retry mechanism? | Prevents silent state errors |
| Tenants | How are organizations and permissions separated? | Prevents data leaks |
| Retention | Where do files, logs, and backups live, and how are they deleted? | Supports data protection and governance |
| Operations | Is there a sandbox, rate limits, a status page, and a support SLA? | Reduces operational risk |
Problem: the contract shows status "signed" in the product even though the completion webhook has not been processed yet. Cause: the user interface trusts a synchronous response. Fix: treat the external status as provisional and move to "completed" only after a verified event. Result: the interface matches the internal evidence chain instead of an optimistic snapshot.
Problem: a vendor switch overwrites old document references. Cause: external IDs were stored without a provider namespace. Fix: keep provider, external_document_id, and the internal document version separate. Result: historical evidence stays addressable even when a second vendor is added later.
Security and data protection boundaries
Signing data can contain personal data, contract contents, and identity proofs. Treat the API as a processing chain, not as an ordinary convenience integration.
For handling personal data, the General Data Protection Regulation (EU) 2016/679 on EUR-Lex is the official primary source; which retention duties, deletion deadlines, and legal bases apply to your specific contract must be reviewed by a competent professional [needs source].
Secrets and server boundaries
API keys belong in a server-side runtime. A browser application must never receive a secret vendor key. Cloudflare Secrets describes one possible form of secret management for Workers. The concrete configuration has to fit your deployment and permission model.
Deletion, export, and access
Define before launch who may export documents, how a deletion request is handled, and which statutory retention duties may stand in the way. A "delete" button in your database does not automatically delete copies held by the signing service, in backups, or in email attachments.
Audit log without unnecessary content copies
In the audit log, store as little information as still proves the process: event ID, internal reference, timestamp, actor, outcome, and document hash. Do not copy every sensitive document line into multiple logging systems. The OWASP Logging guidelines help separate auditability from data minimization.
Which SaaS template fits this use case
The e-signature API is probably one integration building block, not the sole selection criterion for a SaaS template. What matters are the boundaries around authentication, organizations, server-side functions, database access, file storage, and background processing. A template should make those boundaries visible so your team can replace or extend the signing service.
If you have not made the architecture decision yet, use the SaaS boilerplate decision page for preselection. Then check the current template category to see which integrations and modules are actually documented. I do not claim here that TanStack Ship or any other template already includes a specific e-signature API. That must be verified against the current product documentation and a small test integration.
A sensible technical boundary
Keep the vendor adapter behind your own domain interface:
export interface SignatureGateway {
createEnvelope(input: {
tenantId: string;
documentVersionId: string;
signers: Array<{ email: string; name: string }>;
}): Promise<{ externalId: string }>;
cancelEnvelope(input: {
tenantId: string;
externalId: string;
}): Promise<void>;
}
That keeps the business process "send contract for signature" separate from vendor terminology. TanStack Start and TanStack Router can support a structured route and server boundary in a TypeScript application; they do not replace your permission checks, vendor verification, or legal assessment.
Methodology, source attribution, and review sequence
Methodology / methodology (setup: non-production test tenant, no real contract data): this article is assembled from official primary sources and a documented review structure, not from a vendor test report. I did not evaluate a production signing integration; I have not tested a live signature workflow for this article. The steps below describe how I would proceed, not what I measured.
- Step 1: classify the legal framework and signature level using the sources cited below, and mark the case-by-case review as [needs source].
- Step 2: document the state model, evidence chain, and tenant model as a draft; code blocks and tables are illustrative placeholders, not a tested implementation.
- Step 3: review vendor materials, sandbox, and webhook procedure against the decision matrix, and only then start an isolated preview with a test document.
Reasoning: the vendor adapter sits behind its own domain interface (rather than direct SDK calls in UI code), because vendor terminology would otherwise seep into every business process. The trade-off is an extra layer of indirection that must be tested against your own environment.
Sources and attribution (claim → official source):
| Statement in this article | Official source | Attribution status |
|---|---|---|
| Three signature levels, requirements, legal effect | EUR-Lex: Regulation (EU) No 910/2014 (eIDAS), Art. 3, 25, 26 | Summary of the primary source; individual case [needs source] |
| Standards landscape for signature formats | ETSI Standards | Primary source; no vendor assessment |
| Trust services and qualified signatures in Germany | Federal Network Agency: Electronic Trust Services | Official reference point; no legal advice |
| Personal data, deletion, retention | EUR-Lex: Regulation (EU) 2016/679 (GDPR) | Legal framework; concrete duties [needs source] |
| Webhook and API security, logging | OWASP API Security Project · OWASP Logging Cheat Sheet | Practitioner guidance; no vendor audit |
| HTTP requests, Web Crypto primitives | MDN Fetch API · MDN SubtleCrypto.verify | Official API reference; verifySignature [needs source] |
| Runtime, secrets, files, metadata | Cloudflare Workers · Cloudflare Secrets · Cloudflare R2 · Cloudflare D1 | Product documentation; no compliance proof |
| Route and server boundaries | TanStack Start · TanStack Router | Product documentation; no proof of a signing integration |
About the person and the authority: written by Huifer, solo developer and maintainer of TanStack Ship. Beyond the linked primary sources, this article has no measured media mentions, no industry awards, no customer quotes, and no external reviews [needs source]. Authority here comes from traceable source attribution and from disclosing missing evidence, not from claimed references or invented results.
Corrections: article as of: 2026-11-13 (see lastUpdated). Factual tips and corrections should be reported via the linked author page and made traceable in the Changelog [needs source: official correction address and editorial policy].
Limitations, disclosure, and labeling of claims
This article is technical and organizational orientation, not legal advice. The description of the signature levels summarizes official sources but does not decide which signature suffices for your contract. Have legal effect, formal requirements, data protection, retention, identity verification, and cross-border use reviewed by a competent professional.
What this article does not establish (limitations)
Not tested / not tested: I evaluated no production signing integration, no vendor contract, no legal review, no production signing record, and no test log. This text contains no measurements, no benchmarks, no latency or error rates, no customers, no quotes, no awards, and no first-hand experience with a specific vendor [needs source]. The code examples are illustrative drafts and were never run against a real API.
Missing evidence (missing evidence / gap): concrete vendor features, signature-level proofs, identity procedures, data locations, rate limits, status pages, support SLAs, pricing, deletion deadlines, and formal requirements are not verified here. Each of those data points is [needs source] and must come from the vendor's current contract and product materials plus a competent review. Nothing in this article supports a claim such as "this API is legally valid" or "this template includes an e-signature integration".
Not established in detail:
- No vendor comparison based on real contract materials.
- No legal advice and no ruling on the required signature level.
- No production test results, no benchmarks, no error rates.
- No customer references, quotes, or awards.
- No proof that a specific SaaS template contains an e-signature API.
Framing of the few numbers: the 12 impressions over 28 days are a provided search signal, not a market size. The statements "two vendors", "three signature levels", and "six state boundaries" are structural counts of this article, not measurements. Where evidence is missing, [needs source] stands in its place; nothing was filled in to manufacture a number.
Scope of the recommendations: the architecture suggestions are estimated approaches for a setup with a server-side runtime and a non-production test tenant. They do not automatically apply to other legal jurisdictions, other formal requirements, or deployments without server-side secret management. Test ordering, retries, failure, and deletion in an isolated preview before you process real contract data.
The 12 impressions over 28 days are a provided search signal, not a market size and not proof of demand. Code and tables are computed or illustrative examples. Statements about vendor features, data locations, support, and pricing are source required unless they come from the specific vendor's current contract and product materials. Architecture recommendations are estimated approaches and must be tested against your environment.
I have no material connection to any signing vendor that would influence a recommendation. The links to TanStack Ship templates and to the SaaS decision page are contextual product links, not proof of any special signing capability. Test with a non-production tenant before you process real contract data.
Bottom line: settle signature level and evidence first, then integrate
A good e-signature API for SaaS is not the one with the longest endpoint list, but the one whose signature level, evidence, webhooks, tenant isolation, data protection, and operational model fit your specific contract. Your next action: compare two vendors using the matrix, check the current template documentation, and then start an isolated preview with a test document.
FAQ on the e-signature API for SaaS
Is every electronic signature legally equivalent in Germany?
No. The legal framework distinguishes signature types and requirements. Concrete equivalence or formal effect depends on the document, the process, the legal jurisdiction, and the individual case. API documentation can explain technical flows, but it does not replace a legal review by a suitable professional body.
Does the signature API have to run in my backend?
The secret API key and the verification of inbound webhooks belong, as a rule, in a trusted server-side environment. The browser should only ever receive short-lived, explicitly scoped data. The exact architecture depends on the vendor, identity verification, the data-protection model, and your deployment.
What matters more in webhooks than a fast API call?
Signature verification, event ID, idempotency, retries, state validation, and traceable error handling matter more. A fast call helps nothing if a duplicated or delayed event wrongly marks the contract as completed. So test ordering, retries, and failure first.
Should I build an e-signature feature myself or integrate a service?
For most SaaS teams a specialized service is the more realistic starting point once identity, evidence, trust services, or multiple legal jurisdictions come into play. Building it yourself can make sense when the process is very limited and you can fully take on the legal and operational duties.
Which evidence should I retain after completion?
At minimum, record the internal document ID and version, the document hash, event IDs with timestamps, the completion file, the completion certificate, and the assignment to the tenant — as the review questions above describe. Which evidence and deadlines are legally required depends on the document, the legal jurisdiction, and the process, and must be reviewed by a competent professional [needs source]. An audit log should contain only the minimal information, not every document line.
How do I evaluate a vendor without production data?
Start in a sandbox with a non-production tenant and a test document. Check signature verification and the event ID, send events twice and in reversed order, export the completion file and completion certificate, and have signature level, data location, deletion, retries, status page, and support SLA confirmed in writing from the current materials. Missing answers stay [needs source] and are not replaced by assumptions.