When to use this endpoint

Use this after selecting a block from the relevant block-management table. This is permanent; there is no archive or restore counterpart.

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 record-owner or page-permission check. Definition writes are blocked when the tenant’s features2.disableFormEdits flag is 1, except for the temporary setup user identified by userdata.meta.is_tmp=1.

Parameters

ParameterTypeRequiredDescription
idPositive integerYesTenant form-block ID. Zero, negative, blank, and omitted values are rejected.

Example request

$result = FM_api('FormBlock_delete', [
	'id' => '4821',
]);

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"}The ID is absent or not positive.
{"error":"Form Block does not exist"}No tenant block has that ID.
{"error":"form edits are disabled for this account"}The tenant setting blocks definition edits for this user.

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 lookup does not restrict block type; it can delete an ordinary report block or an email-template block.
  • If the row’s image field is non-empty, the conventional formblocks/<id>.png object is removed. Images extracted from HTML code under formblock_images/ are not explicitly removed.

Side effects

  • Deletes the form_blocks row.
  • May remove the uploaded preview image from file storage.

See it in Fieldmotion

CRM1

Open Settings → Forms → Form Blocks, or Settings → Email Templates → Settings, and delete a block from its table.

CRM2

The corresponding Form Blocks and Email Template Blocks screens use the same endpoint.

Related endpoints