When to use this endpoint

Use this to label saved form references in tables, settings, and rules. Use Forms_getById when definition fields are also needed.

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
idsJSON array stringYesNon-empty JSON array of actual JSON integers. Numeric strings such as "1042" are rejected. Native arrays are not supported.

Example request

$names = FM_api('Forms_getNamesByIds', [
	'ids' => json_encode([1042, 1048]),
]);

Example response

[{"id":"1042","name":"Service visit"},{"id":"1048","name":"Installation"}]

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: ids"}IDs are absent.
{"error":"ids must be an array of integers in JSON form"}JSON is malformed, empty, or does not decode to a non-empty array.
{"error":"not an integer: 1042"}An element is not a JSON integer; the message includes its rendered value.

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 are silently omitted. Archived forms are included.
  • The SQL query has no explicit ordering, so callers must map results by ID rather than relying on input order.
  • Only local tenant IDs are accepted; outsourced composite IDs are not supported.

See it in Fieldmotion

CRM1

Forms, Job Type settings, Quotes, Invoices, and Purchase Orders use this endpoint to label stored form IDs.

CRM2

The Forms page batches name lookups for referenced IDs.

Related endpoints