Firma lets you add legally binding e-signatures to any app built on InsForge. Because InsForge gives your coding agent compute, hosting, auth, and storage out of the box, you can drop Firma into an existing agent-built app by adding one compute function and one webhook handler. This guide covers two integration paths: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.
- Compute function (per-app) — Write a TypeScript function that calls the Firma REST API directly. Best for single apps or custom logic.
- MCP-assisted generation (agent-level) — Connect the Firma Docs MCP server to your coding agent so it can write the integration for you against accurate API references.
Prerequisites
- A Firma account with an API key
- An InsForge project with compute and storage enabled
- At least one Firma template with signing fields configured
Firma uses the raw API key as the
Authorization header value — do not prefix it with Bearer. This differs from many other APIs.Getting started
- Compute function
- MCP-assisted generation
This is the most direct approach. You write a TypeScript compute function that calls the Firma REST API.The response includes You can also ask your coding agent to wire this up: “When the user clicks Send Contract, call the sendSigningRequest function with the template ID and signer details from the form.”
Step 1: Store your API key as a secret
In your InsForge project dashboard, add a secret namedFIRMA_API_KEY with your Firma API key as the value. See the InsForge secrets documentation for details.The secret is encrypted and automatically available to your compute functions via Deno.env.get("FIRMA_API_KEY").Step 2: Create a compute function to send signing requests
Create a new function in your InsForge project, or ask your coding agent to generate one. This function creates a signing request from a template and sends it in a single API call using thecreate-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.first_signer.id (the signing_request_user_id) and first_signer.signing_link, which you will need if you want to embed the signing experience directly in your app.Step 3: Call the function from your app UI
Invoke the compute function from your frontend using the InsForge SDK:Webhook integration
To track when documents are signed, set up a Firma webhook pointing to an InsForge compute function.- Create a new compute function to handle incoming webhook events.
- In the Firma dashboard under Settings -> Webhooks, register a webhook pointing to your function’s URL:
https://<your-app>.functions.insforge.app/<function-name>. - Select the events you want to receive, such as
signing_request.completedandsigning_request.recipient.signed.
Embedded signing
For apps where signers complete documents directly in your UI, 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. Load the signer URL in an iframe inside your InsForge 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