Firma lets you add legally binding e-signatures to any application built with Wasp. Since Wasp generates a full-stack React + Node.js app with built-in auth, database (Prisma), and server actions, the integration is straightforward: create a Wasp action that calls the Firma API, and invoke it from your React frontend. This guide is especially useful if you are building on the Open SaaS template, which already includes auth, payments, and a database. Adding e-signatures is a natural extension for SaaS apps in legal, HR, consulting, and real estate verticals.Documentation Index
Fetch the complete documentation index at: https://docs.firma.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Firma account with an API key
- A Wasp project (v0.15+ recommended) or an Open SaaS project
- At least one Firma template with signing fields configured
- Node.js 18+ installed locally
Firma uses the raw API key as the
Authorization header value - do not prefix it with Bearer. This differs from many other APIs.Step 1: Store your API key as an environment variable
Add your Firma API key to the.env.server file in your project root:
.env.server ensures the key is only available in server-side code and never reaches the browser.
Step 2: Define the action in your Wasp file
Add a server action declaration to yourmain.wasp file:
schema.prisma file:
Step 3: Implement the server action
Createsrc/signing/actions.ts. This example creates and sends a signing request from a template in a single call using the create-and-send endpoint:
The
create-and-send endpoint creates the signing request and sends it to recipients atomically. If you need to review or modify the request before sending, use POST /signing-requests to create a draft, then POST /signing-requests/{id}/send separately.Step 4: Call the action from your React frontend
Import the action fromwasp/client/operations and call it when the user submits a form:
sendSigningRequest import is a type-safe RPC call to your server action - no manual fetch needed.
Webhook integration
To track when documents are signed, declare an API route in yourmain.wasp file and implement a handler that processes Firma webhook events.
Add the API route to main.wasp:
- Deploy your app so the route is publicly reachable
- In the Firma dashboard under Settings → Webhooks, add a webhook pointing to
https://<your-app-domain>/api/webhooks/firma - Select the events you want to receive. See the webhooks guide for all event types and signature verification
Embedded signing
For apps where signers complete documents inside your UI instead of jumping to email, Firma provides an embeddable signing experience. Thecreate-and-send response includes a first_signer.id (the signing_request_user_id) and a ready-made first_signer.signing_link. Render it in an iframe:
Bonus: MCP connection for AI-assisted building
Firma offers a Docs MCP server that AI coding tools can connect to directly. When connected, your AI assistant searches Firma documentation while generating code so it uses accurate endpoints, field names, and patterns. This is a build-time aid and does not affect your deployed app.Next steps
- API authentication - API keys and workspace scoping
- Webhooks guide - event types, payloads, and signature verification
- Embedded signing - in-app signing experience
- Creating workspaces - multi-tenant setups for SaaS apps
- Complete setup guide - end-to-end Firma integration walkthrough
- API reference - full endpoint documentation