When to use this endpoint

File_updateField is a legacy alias-shaped wrapper with the same request and behavior as File_setField. Prefer the route already used by the calling screen.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session and establish the tenant database context.

The handler performs no record-owner or resource-specific permission check. CRM screens may hide the action, but callers with tenant API/session access can target any matching file ID.

Parameters

ParameterTypeRequiredDescription
fieldStringYesOne mapped file field: id, filename, typeId, description, cDate, notes, ownerID, meta, name, typeEnum, lastEdited, url, customerReadable, fileLast_Edited, deleted, ddate, storageType, storageInstance, data, filesize, metaUserID, metaDateExpiry, metaTags, metaIncludeInEmail, metaEditNotesInPortal, metaShareWithSites, metaShowInPortal, metaOutsourcing, and metaLinkForm.
valMixedYesReplacement value.
id / idsInteger-compatible or native arrayYesTarget ID(s); id wins when both exist.

Example request

$result = FM_api('File_updateField', ['ids' => ['4821', '4822'], 'field' => 'notes', 'val' => 'Reviewed']);

Example response

{
  "ok": 1,
  "oldData": [
    {"id": "4821", "notes": ""},
    {"id": "4822", "notes": "Pending"}
  ]
}

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.
{"error":"missing or invalid field"}Field is unmapped.

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

Behaviour and edge cases

  • Behavior, timestamping, JSON merging, audit logging, soft-delete filtering, and no-change response are identical to File_setField.

See it in Fieldmotion

CRM1

No direct production CRM1 caller was found.

CRM2

The generic widget framework can derive this update route, although current file tables commonly call File_setField or File_updateData.

Related endpoints