When to use this endpoint

Use as a naming warning while editing a form. It does not reserve the name or enforce uniqueness during a subsequent save.

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 form, department, owner, or page-permission check unless the page below says otherwise. CRM navigation may impose additional UI-only access rules.

Parameters

ParameterTypeRequiredDescription
nameStringYesPresence/non-null only; lowercased without trimming. Blank names are accepted for lookup. Equality is not a substring or wildcard search.

Example request

$check = FM_api('Form_checkName', ['name'=>'Service checklist']);

Example response

{"duplicates":2}

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: name"}name absent/null; checked before tenant login guard.

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

Behaviour and edge cases

  • Counts every matching form across types and archive states in the authenticated tenant, without excluding the currently edited ID. Duplicate counts are integers; a failed/false COUNT is integer-converted to zero.
  • No ID exclusion, type/department/owner filter, pagination, ordering or normalized whitespace. The SQL LIMIT 1 does not limit the aggregate count to one.
  • Concurrent writes can change the result before save. A zero result is not an enforced uniqueness guarantee.
  • No direct mobile app/m-service caller for this RPC was found. Mobile form definitions arrive through m’s syncDownloads form channel, not this endpoint.

Side effects

  • Read-only; no history, cache invalidation, file write, URL fetch or report rendering.

See it in Fieldmotion

CRM1

Form Edit checks the name during the editor workflow. Filter for Form_checkName and inspect the exact entered name.

CRM2

Form Edit invokes Form_checkName for the edited name. This is separate from the definition save request.

Related endpoints