When to use this endpoint

Use File_updateData for CRM2 file-table edits, especially notes fields that may contain user mentions.

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
idInteger-compatible or native arrayYesOne or more file IDs. Multi-ID mode applies the same values sequentially and returns only {"ok":1}.
Mapped fieldsMixedNoAny mapped keys from 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. Unmapped keys are ignored by the data update but remain available to surrounding notification logic.
paramTypeEnumInteger-compatibleNoRemoved before update and used only to choose a CRM mention-notice link/message. Supported branches include Customer, Asset, Job, User, recurring Job, Quote, Task, Contract, Stock, and Purchase Order.
paramPageIDInteger-compatibleNoParent screen/resource ID embedded in that mention link.

Example request

$result = FM_api('File_updateData', [
	'id' => '4821',
	'notes' => 'Please review this file, @Alex',
	'paramTypeEnum' => '2',
	'paramPageID' => '1042',
]);

Example response

{
  "ok": 1,
  "oldData": {"notes": "Previous notes"}
}

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: id"}ID key is absent.
{"warning":"no updated fields.","oldData":[]}No mapped update field is supplied.
{"warning":"No data.","oldData":[]}The ID does not name a non-deleted row.

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

Behaviour and edge cases

  • Changed fields set last_edited and receive individual files audit history entries. Soft-deleted rows are excluded. No-op values return No Change..
  • sendNotification runs after a successful helper response. With a supported type/page pair, sendNotices also creates mention notices linked to the relevant CRM1 page.
  • There is no transaction spanning the update and notifications; multi-ID processing does not aggregate per-ID warnings/errors.

See it in Fieldmotion

CRM1

No direct production CRM1 editor was found; CRM1 uses File_setNotes and dedicated switches.

CRM2

Edit Notes or another inline file value on modern Customer, Job, Asset, User, and other file tables.

Related endpoints