When to use this endpoint

Use this to populate block pickers in report-document and email-template editors. It is unpaginated; use FormBlocks_getDT for a management table.

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
typeInteger-compatibleNoExact type, default 0; type 1 selects email-template blocks.
fieldsJSON array stringNoOnly image is accepted as an extra. ID and name are always returned. A native array is not supported by this handler.

Example request

$blocks = FM_api('FormBlocks_list', [
	'type' => '1',
	'fields' => json_encode(['image']),
]);

Example response

{
  "ok": 1,
  "rows": [{"id": "4822", "name": "Standard footer", "image": null}]
}

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.

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

Behaviour and edge cases

  • The list has no explicit ordering or pagination.
  • Unknown requested fields are ignored. Empty results still return {"ok":1,"rows":[]}.
  • The type is integer-coerced and compared exactly.

See it in Fieldmotion

CRM1

Email-template and report-document editors use this list when inserting reusable blocks.

CRM2

The corresponding editors use the same endpoint, including notification-email configuration.

Related endpoints