Prerequisites
- A Firma account with an API key
- A Rork-generated mobile app (React Native / Expo)
- At least one Firma template with signing fields configured
- A backend for secure API calls. Options include Rork Backend, Supabase Edge Functions, Vercel Serverless Functions, or any Node.js/Python server
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: Set up your backend
Rork apps run on the client, so you need a server-side layer to keep your API key secret. This example uses a Supabase Edge Function, but the same logic applies to any backend. Create the Edge Function:index.ts with the following:
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 2: Call the backend from React Native
From your Rork app, POST to your Edge Function when the user triggers the signing flow:Step 3: Embedded signing in a WebView
For mobile apps, the signing experience renders inside a WebView instead of an iframe. Installreact-native-webview:
create-and-send response includes a first_signer.id (the signing_request_user_id) and a ready-made first_signer.signing_link. Use either to build the signing URL:
first_signer.id from the response in Step 2 as the signingRequestUserId prop. See the embedded signing guide for full setup including security best practices.
Webhook integration
To track when documents are signed, add a webhook Edge Function and register it in the Firma dashboard.- Deploy the function:
supabase functions deploy firma-webhook --no-verify-jwt - In the Firma dashboard under Settings → Webhooks, add a webhook pointing to
https://<your-project-ref>.supabase.co/functions/v1/firma-webhook - Select the events you want to receive. See the webhooks guide for all event types and signature verification
Bonus: MCP connection for AI-assisted building
Firma offers a Docs MCP server that can be connected to AI coding tools. When connected, AI assistants search Firma documentation while generating code so they use 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