When to use this endpoint

Use for an inline scalar setting such as tags. Use Form_updateData for complete field definitions, On Complete rules or AutoDoc documents because its validation and follow-ups differ.

Authentication and permissions

Authenticate with a signed API key (acting as its owner) or a logged-in CRM session on the routed account host. Session calls include the dispatcher’s CSRF value when configured. IDs refer to the authenticated tenant unless an explicit cross-account copy is described.

Requires Forms Edit (pageForms_edit) through the shared settings guard. Client administrators pass; other actors need the stored/session grant. This guard uses no legacy role-less allowance and is not conditional on the CRM version. The temporary-user edit-lock exception does not bypass it.

The account’s features2.disableFormEdits setting blocks this mutation with form edits are disabled for this account. A temporary user marked meta.is_tmp=1 bypasses that setting only.

Parameters

ParameterTypeRequiredDescription
id / idsScalar integer-compatible ID or native arrayYesid takes precedence when present. Native arrays are converted element-by-element to integers; encoded JSON lists are not decoded.
fieldMapped aliasYesExactly one mapped name, such as name, metaTags or theme. See the complete map below.
valValue matching the mapped fieldYesExplicit value, including empty text or zero. Null fails the required-value check. Encoded JSON is needed for serialized definition/document values.

Example request

$result = FM_api('Form_updateField', [
	'id'=>'1042','field'=>'metaTags','val'=>'Inspection,Annual',
]);

Example response

{"ok":1}

Database numeric values can be JSON strings. Examples are representative; legacy application errors can use HTTP 200, so inspect the decoded response.

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"missing or invalid parameter: field"}field absent.
{"error":"missing or invalid parameter: val"}val absent or null.
{"error":"missing or invalid field"}Unknown alias.
{"error":"missing or invalid parameter: id/ids"}No selection.
{"error":"Unable to update record"}Primary update failed.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Accepts the mapped aliases listed by Form_updateData except id. The primary identifier cannot be edited through field. Use a targeted metadata alias to preserve unrelated metadata.
  • Uses the mapped save workflow for every target: stable-ID and On Complete status validation, uploaded-image policy, AutoDoc HTML normalization, supported linked-table parent synchronization, per-target history and post-commit mention handling.
  • Validates all target IDs and saves them under one SQL transaction. Missing targets or failed writes stop and roll back the batch. Omitted/null val is rejected, while explicit blank text and zero remain valid values.
  • Returns {"ok":1}, including a no-op; it no longer exposes the generic helper’s raw oldData columns or string-valued no-change result. No endpoint pagination or selection-size cap is added.

Side effects

  • Advances last_edited for changed rows, invalidates forms cache and records an Undo baseline/snapshot and mapped audit for each changed target. SQL failures roll back the whole selection; normalized image assets are outside that rollback.

See it in Fieldmotion

CRM1

No direct CRM1 caller found for the mapped inline route; dedicated setting functions and Form_edit are used instead.

CRM2

In Forms, click the Tags cell and save. Its autosave prefix Form resolves to Form_updateField with field=metaTags; filter Network for that endpoint.

Related endpoints