When to use this endpoint

Use the inline name editor in CRM1 Settings → Filters; this avoids replacing the payload through the legacy saver.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. A tenant login is required.

Reads expose only filters owned by the current user or marked public=1. Writes require ownership or client-administrator permission; another user’s public filter is not editable merely because it is visible. Assigning or transferring ownership to another active tenant user requires client-administrator permission.

Parameters

ParameterTypeRequiredDescription
idPositive integer stringYesExisting physical filter ID.
valStringYesNonempty name, maximum 182 Unicode characters. Literal 0 is accepted as text; whitespace is not trimmed.

Example request

$result = FM_api('UserFilter_setName', ['id' => '1088', 'val' => 'Northwind jobs']);

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: id"}IDs must be positive integers; malformed/missing selectors are rejected.
{"error":"filter with that ID does not exist"}Any selected target is absent.
{"error":"filter permission denied"}A non-administrator targets another owner or attempts an unauthorized owner assignment.
{"error":"configuration read failed"}A required database read fails; no write is committed.
{"error":"configuration write failed"}Persistence or checked history fails; the transaction rolls back.
{"error":"configuration transaction failed"}Transaction begin or commit fails; no success is reported.

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

Behaviour and edge cases

  • Equal stored text returns {"ok":1,"warning":"No change needed"}. A change writes only name with checked history and cache invalidation.
  • Authorization, row write and history are checked in one transaction; creation time is unchanged.

Side effects

  • Changed rows request their table’s cache marker. Row changes and history commit in one checked transaction; a write, history or commit failure rolls back the batch.
  • No customer/job data, notification or email is changed. No tenant feature setting alters this endpoint’s behavior.

See it in Fieldmotion

CRM1

Settings → Filters: click a name, edit it and leave the input. Filter Network requests for UserFilter_setName.

CRM2

No direct CRM2 caller for this narrow setter was found. Settings → Filters uses mapped UserFilter_updateData/UserFilter_updateField through shared editing helpers.

Related endpoints