FieldOps

Developers

Forms API and webhooks

Send responses in, read them out, and hear of each new one as it arrives. Updated 6 November 2026.

On this page

Every FieldOps form can take responses from another system and hand its responses to one. This page is the reference. The keys and addresses for a particular form are in the app: open the form, then Form API & webhooks. That page fills this reference in with the form's own keys, field IDs and examples, and has a button that sends a test event to your webhook.

Keys

A form has two keys, made when it is first published. They do different things, so they can be given to different systems.

KeyStarts withDoes
Submit keyfm_submit_Adds responses to the form. Cannot read anything.
Read keyfm_read_Reads the form's fields and its responses. Cannot add anything.

Treat both as passwords: anyone holding the submit key can add responses, and anyone holding the read key can read every response. Keep them on your server. Browsers on other sites are refused (HTTP 403), so a key put in a web page's code would not work there anyway.

Field IDs

Answers are keyed by field ID. A field's ID is made from its name when the form is first saved with it: spaces become underscores, and punctuation that would break a path or an address is dropped. "Site name" becomes Site_name, "Depth (m.)" becomes Depth_m, and two fields with the same name become Name and Name_2.

Once a field has its ID it keeps it. Renaming the question later does not change the ID, so answers already stored stay with the question and integrations keep working. Forms made before field IDs followed names keep the IDs they had. The current IDs are on the form's API page in the app, under each question in the form builder, and in the form.fields list the read endpoint returns.

Field typeSend
shortText, longText, email, phone, urlA string.
numberA number, or a string that is one.
multipleChoice, dropdownOne of the field's options, exactly as written.
dateA string, YYYY-MM-DD.
timeA string, for example 14:30 or 2:30 PM.
mediaA list of addresses of files you host.

Submit a response

POSThttps://fieldopsinc.com/api/forms/{submit key}/submit

Send JSON with a responses object, field ID to answer. Add location with latitude and longitude in decimal degrees; it is required when the form asks for a location, which is the default.

curl -X POST 'https://fieldopsinc.com/api/forms/fm_submit_.../submit' \
  -H 'content-type: application/json' \
  --data '{
    "responses": {"Site_name": "Borehole 4", "Depth_m": 62},
    "location": {"latitude": 9.0765, "longitude": 7.3986}
  }'

A saved response answers HTTP 201:

{"ok": true, "responseId": "3f2c...", "webhook": {"configured": true, "ok": true, "status": 200}}

webhook says how delivery of this response to the form's webhook went, if it has one. The response is saved whether or not the webhook took it.

Read the form and its responses

GEThttps://fieldopsinc.com/api/forms/{read key}/responses

Answers with the form's definition, every field with its ID, name and type, and a page of responses, newest first.

curl 'https://fieldopsinc.com/api/forms/fm_read_.../responses?limit=100'
{
  "form": {
    "id": "Borehole_inspection",
    "title": "Borehole inspection",
    "status": "active",
    "responseCount": 128,
    "locationRequired": true,
    "fields": [
      {"id": "Site_name", "name": "Site name", "type": "shortText", "required": true, "options": []}
    ]
  },
  "responses": [
    {
      "id": "3f2c...",
      "responses": {"Site_name": "Borehole 4"},
      "submittedAt": "2026-11-06T10:15:02.000Z",
      "location": {"latitude": 9.0765, "longitude": 7.3986},
      "mediaFiles": {}
    }
  ],
  "page": {"limit": 100, "hasMore": true, "nextCursor": "3f2c..."}
}

limit is 1 to 500, 100 if left out. While page.hasMore is true, ask for the next page with cursor set to page.nextCursor: ?limit=100&cursor=3f2c.... Responses sent through the API carry "source": "api"; those filled in on the app also carry mediaFiles, the attachments by field ID.

Webhooks

Give a form a webhook address (in the form builder) and FieldOps sends a POST to it for every new response, whether it came through the API, the phone app or the web app. The address must be https:// on a public host.

EventWhen
form.response_submittedA response was saved. Carries form (as the read endpoint gives it) and response.
form.webhook_testTest webhook was pressed on the form's API page. Carries form only; nothing is saved.
{
  "event": "form.response_submitted",
  "form": {"id": "Borehole_inspection", "fields": [...]},
  "response": {"id": "3f2c...", "responses": {"Site_name": "Borehole 4"}, "submittedAt": "2026-11-06T10:15:02.000Z"},
  "site": "https://fieldopsinc.com"
}

Each delivery is one attempt with an 8 second limit; redirects are not followed and failures are not retried, so answer 2xx quickly and do the work afterwards. Anything missed can be read back from the read endpoint.

Checking a delivery is from FieldOps

Every delivery carries X-FieldOps-Event and X-FieldOps-Timestamp (Unix seconds). A form with a webhook secret, which every form gets when it is next saved, also carries X-FieldOps-Signature: sha256= and the hex HMAC-SHA256 of the timestamp, a full stop, and the raw body, keyed with the secret. The secret is on the form's API page in the app.

// Node.js
const crypto = require('crypto');
function fromFieldOps(rawBody, headers, secret) {
  const t = headers['x-fieldops-timestamp'];
  const expected = 'sha256=' + crypto.createHmac('sha256', secret)
    .update(t + '.' + rawBody).digest('hex');
  const given = String(headers['x-fieldops-signature'] || '');
  return given.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected)) &&
    Math.abs(Date.now() / 1000 - Number(t)) < 300;
}
# Python
import hashlib, hmac, time
def from_fieldops(raw_body: bytes, headers, secret: str) -> bool:
    t = headers.get('X-FieldOps-Timestamp', '')
    expected = 'sha256=' + hmac.new(secret.encode(), f'{t}.'.encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(headers.get('X-FieldOps-Signature', ''), expected) and abs(time.time() - int(t or 0)) < 300

Sign the body exactly as it arrived; parsing and re-encoding the JSON changes it.

Errors

Errors answer JSON with an error message, and the field concerned where there is one. Opened in a browser, a failed request shows a page saying what went wrong instead.

StatusMeans
400Something in the request needs fixing: no key, no responses object, a required answer missing (fieldId), unknown field IDs (unknown), an answer that is not one of its options (fieldId, options) or not a number, no location on a form that needs one, or a cursor that is not valid.
403Called from a web page on another site. Call from your server.
404The key is not valid (or the address is not an API endpoint).
405Wrong method: submit takes POST, read takes GET.
410The form has ended and no longer takes responses.
500, 503Our side. Try again shortly.