When to use this endpoint

Use a dedicated setter for names, code, and images. This lower-level route is useful only for trusted internal mapped-field updates. No production CRM caller was found.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.

The handler performs no record-owner or page-permission check. Definition writes are blocked when the tenant’s features2.disableFormEdits flag is 1, except for the temporary setup user identified by userdata.meta.is_tmp=1.

Parameters

ParameterTypeRequiredDescription
fieldStringYesOne mapped name: id, type, name, image, code, parent, cDate, and lastEdited.
valMixedYesReplacement value converted according to the map.
id / idsInteger or native arrayYesOne ID or a native array. If both are present, id wins. Values are integer-coerced.

Example request

$result = FM_api('FormBlock_updateField', [
	'id' => '4821',
	'field' => 'parent',
	'val' => '37',
]);

Example response

{
  "ok": 1
}

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 is absent.
{"error":"missing or invalid parameter: val"}Value is absent; blank is still a supplied value.
{"error":"missing or invalid field"}Field is outside the map.
{"error":"missing or invalid parameter: id/ids"}No target selector is supplied.
{"error":"form edits are disabled for this account"}Definition edits are disabled.

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

Behaviour and edge cases

  • Missing IDs and values already equal to the stored value produce {"ok":"1","warning":"no change required"}.
  • A changed write also advances last_edited in Unix seconds, including when another field is targeted.
  • The update is tenant-scoped and has no block-type filter.

Side effects

  • Updates all existing target rows whose selected value differs. Shared change logging may record the mapped change.

See it in Fieldmotion

CRM1

No production CRM1 caller was found.

CRM2

No production CRM2 caller was found.

Related endpoints