Skip to main content
Firma lets you add legally binding e-signatures to any mobile application built with Rork. Since Rork generates React Native (Expo) apps, you can call the Firma API from a lightweight backend and render the signing experience in a WebView within your mobile app. This guide covers the recommended integration path: a serverless backend function that calls the Firma REST API, with a React Native WebView for embedded signing.

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:
Store your Firma API key as a secret:
Never call the Firma API directly from your React Native app. The API key would be exposed in the app bundle and could be extracted by anyone who downloads your app.
Then replace the generated 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.
Deploy the function:

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. Install react-native-webview:
Then create a signing screen component. The 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:
Pass 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 and register the webhook:
  1. Deploy the function: supabase functions deploy firma-webhook --no-verify-jwt
  2. In the Firma dashboard under Settings → Webhooks, add a webhook pointing to https://<your-project-ref>.supabase.co/functions/v1/firma-webhook
  3. Select the events you want to receive. See the webhooks guide for all event types and signature verification
For production use, always verify the webhook signature using your Firma webhook signing secret. See the webhooks guide for implementation details.

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