When to use this endpoint

Use this after a block list supplies an ID, most often when opening the HTML editor. Use FormBlock_getByName only when a saved template contains a block name rather than an ID.

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
idPositive integerYesTenant form-block ID.

Example request

$block = FM_api('FormBlock_get', [
	'id' => '4821',
]);

Example response

{
  "id": "4821",
  "type": "0",
  "name": "Service summary",
  "image": "92442/formblocks/4821.png",
  "code": "<section>...</section>",
  "parent": "0",
  "cdate": "1790841600",
  "last_edited": "1790845200"
}

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":"invalid or missing parameter: id"}The ID is absent or not positive.
{"error":"no such form block"}The tenant has no matching 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

  • The response is the raw database row: numeric values normally remain JSON strings and HTML is not transformed.
  • No type filter is applied. Types 0 and 1 share this lookup.

See it in Fieldmotion

CRM1

Open a Form Block or Email Template Block and select its Code tab; the editor loads the row with this endpoint.

CRM2

The same Code-tab workflow uses this endpoint in both block editors.

Related endpoints