naturalForms connects to your other systems in three ways. Pick the one that matches what you want to do, then follow its section below. Each is set up once by you or your developer.
| You want to | Use | Who sets it up |
|---|---|---|
| Open a form on a phone, tablet or browser with customer or job details already filled in | Prefill Links | Anyone who can build a link; a developer for automation |
| Create documents, users or value lists from your own system, with no one opening the app | Public API | A developer |
| Send each completed document's data and files to your own system automatically | Webhooks | A developer, plus an admin in the Portal |
Looking for a ready-made connection (JobNimbus, CompanyCam, LeadPerfection, Zapier and others)? See Integrate Form Data with Other Software.
Before You Start: Template IDs and Field Names
Prefill links and the Public API both need two things from your template:
- The template ID. A number that identifies the template. Ask support if you can't find it.
-
Field names. The name each field has in the template designer (its identifier), not the label shown on the form. Names are case sensitive:
FirstNameandfirstnameare different fields.
Field names should start with a letter and use only letters, numbers and underscores, for example Address_1 or JobNum. The Public API refuses any other name.
Prefill Links
A prefill link is a web address that opens naturalForms with one or more new documents already filled in. It works with the naturalForms app on iOS and Android and in a web browser. A CRM button, an email or a scheduling app can all use one.
- Every time the link is opened, it creates new documents. It never changes a document made earlier, even from the same link.
- The user still has to sign in to naturalForms. If they are already signed in, the documents open straight away.
- If the link names a field the template doesn't have, that value is skipped without an error.
How the Link Is Built
https://prefill.p.naturalforms.com/app/4/vnd/1/your-company/add?action=add-documents&documents=...&values=...| Part | Required | What it is |
|---|---|---|
your-company |
Yes | A short name for the system creating the link, for example your company or app name. Letters, numbers and hyphens. |
action |
Yes | Always add-documents. |
documents |
Yes | A list of the documents to create. Each has id (the template ID), name (the name shown in the document list) and, optionally, values (field names and values for that document only). |
values |
No | Field values shared by every document in the link. A document's own values win over these. Use it to keep the link short when several documents share the same details. |
Example, shown before encoding so it is readable:
documents = [
{ "id": 12345678, "name": "Work Order 18381", "values": { "JobNum": "18381" } }
]
values = { "FirstName": "Joe", "LastName": "Carson" }Encode the Values
The documents and values parts are JSON, and they must be URL encoded twice before they go into the link: encode the JSON, then encode the result again. Encoding once works for most data, but any value containing a percent sign (such as "50% deposit") is then dropped without an error. Most languages have a built-in way to encode:
| Language | Encode a value (run it twice) |
|---|---|
| JavaScript | encodeURIComponent(value) |
| Python | urllib.parse.quote(value) |
| Swift | value.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) |
| Java |
URLEncoder.encode(value.replace(" ", "%20"), StandardCharsets.UTF_8.toString()) (Java turns spaces into +, so replace them first) |
A complete JavaScript example:
const documents = [
{ id: 12345678, name: "Work Order 18381", values: { JobNum: "18381" } }
];
const values = { FirstName: "Joe", LastName: "Carson" };
const link = "https://prefill.p.naturalforms.com/app/4/vnd/1/your-company/add"
+ "?action=add-documents"
+ "&documents=" + encodeURIComponent(encodeURIComponent(JSON.stringify(documents)))
+ "&values=" + encodeURIComponent(encodeURIComponent(JSON.stringify(values)));Test a Link Without Creating a Document
Change /add to /add-test in the link and open it in a browser. Instead of creating documents, naturalForms shows what it read from the link: each template ID, document name and field value. If a document or value is missing from that list, check the encoding and the field names. When it looks right, change it back to /add.
Public API
The Public API lets your system make changes in naturalForms directly, with no one opening the app. It can:
- Create documents from a template, filled in and assigned to a user, ready for them to finish.
- Add, update and remove users, including their roles and group.
- Create and update value lists (data sources), for example a list of products or crew members that your forms offer as choices.
Get an API Key
Ask support for a Public API key for your account. We send the key with the web address to use. The key looks like nfpak01@... and gives access to your account's data, so:
- Keep it on your server. Never put it in a web page, a mobile app or a shared document.
- If it is ever exposed, contact support and we will replace it.
Making a Request
Every request is an HTTPS POST with a JSON body and two headers:
Content-Type: application/json
nf-authorization: nfpak01@YourApiKey| To | Send to | Body holds |
|---|---|---|
| Create documents | /v1/document/create |
documents (each with name, assignedEmail, templateId, fieldValues) and "schemaType": "document-create/1"
|
| Add users | /v1/user/create |
users (each with email, firstName, lastName, roles, optional groupName) and optional skipActivationEmail
|
| Change a user's group | /v1/user/update |
users (each with email and groupName; null removes them from their group) |
| Remove users | /v1/user/delete |
users (each with email) |
| Create value lists | /v1/datasource/create |
dataSources (each with name, "type": "ValueList" and values) |
| Update value lists | /v1/datasource/update |
The same as create, with the list's full new set of values |
Example: create one document for a user.
POST /v1/document/create
{
"schemaType": "document-create/1",
"documents": [
{
"name": "Inspection - 123 Main Street",
"assignedEmail": "tech@yourcompany.com",
"templateId": 12345678,
"fieldValues": [
{ "name": "Address_1", "value": "123 Main Street" },
{ "name": "Inspection_Date", "value": "2026-07-31T13:31:58.901Z" }
]
}
]
}Rules to Know
-
Field names must start with a letter and use only letters, numbers and underscores (up to 64 characters). A name with a space, such as
Address 1, is refused. -
Dates are sent as text in ISO 8601 format, for example
2026-07-31T13:31:58.901Z. -
Roles are one or more of
Admin,Submitter,ViewerandDesigner. - A user's email can't be changed through the API; it is how the user is found.
- A value list can hold up to 10,000 values.
- Each request can carry several documents, users or lists at once.
Responses
- 202 Accepted: your request passed its checks and is queued. The response carries a short message and a task ID. The work happens a moment later, so new documents and users appear shortly after, not instantly.
- 401 Unauthorized: the key is missing, mistyped or no longer valid.
- Refused: a request that breaks one of the rules above (a field name with a space, say) is turned away. Fix the request and send it again.
There is no call yet that reports whether queued work finished. To confirm, check the account in naturalForms: the document in the assigned user's list, the user in the Portal, or the value list in the template designer.
Webhooks
A webhook is a message naturalForms sends to your system. When a document's output is processed, normally when the document is completed, naturalForms sends that document's data to a web address you give us.
Set It Up
- Have your developer create a web address (URL) on your system that accepts an HTTPS POST with a JSON body.
- In the Portal, open the template's Settings, go to the Output Settings tab, choose Use custom output settings, and open Web Apps.
- Add a connector, choose Document to Webhook, tick Enabled, and paste the address into Webhook URL.
-
The Field Mapping opens. Choose what the message carries:
- All the data in one file (recommended for most templates). Add an entry for the document's JSON file and type a name for it under Connector Field. The message then carries a link to a file holding every field and its value, and your system reads what it needs from that file. Nothing else has to be mapped, however many fields the form has.
- Selected fields in the message. Add an entry for each field your system needs, so its value arrives directly in the message.
- Every field in the message. Auto-map all fields adds every template field at once. Use it only when your system needs every field directly in the message. On a template with many fields it takes a while to set up and makes each message large, so the JSON file is usually the better choice. The button is only offered before you add an entry by hand.
With nothing mapped, the message carries the document's details but no field values.
- To receive other files, add an entry for each one (Document PDF file, CSV, XML, an attachment) and type a name for it under Connector Field. Each becomes a download link in the message.
- Pick a document and click Show sample output using document to see what will be sent.
- Test, at the bottom of the tab, really sends the document you pick to every connector that is ticked Enabled. If a test fails, use a different document for the next try.
- Click Save at the bottom of the window.
What Your System Receives
A POST with Content-Type: application/json. The body has:
- The document's details, among them
documentId,documentNumber,documentName,customerName,customerNumber, the submitter's email and name, andformTemplateName. - A
contentobject holding any fields you mapped individually. - A
filesobject holding one download link per file entry, including the JSON file if you added it.
What Your System Has to Do
- Answer with a success code (2xx) within 90 seconds. If it answers with an error, or takes longer, naturalForms stops sending that document for 24 hours and does not try again by itself.
-
Answer at the address itself, with no redirect, and use an
httpsaddress. - Download the files soon. The links need no sign-in and last 7 days. If a file was not produced for a document (a missing attachment, say), its link is a placeholder that will not download.
-
Keep the address private. The message carries no key or signature today, so put a long random value in the address, for example
https://your-system/hooks/naturalforms/<long-random-value>.
Need Help?
Contact support with your account number, the template name and, for webhooks, the time of a document that didn't arrive. For an API key, tell us which of the three options above you plan to use.