When to use this endpoint

Inspect recent tenant import diagnostics for a selected configuration ID. Use this to see worker outcomes rather than to check whether a configuration save succeeded.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. The handler calls Core_requireLogin(); it has no separate page, administrator, or role-permission check.

The account must have Import By Email enabled (employer|features bit 32768). The features_used marker is separate and does not grant access.

The query uses the authenticated tenant’s logs table. It does not look up the global filter or verify its owner or type; an arbitrary positive ID only filters logs already in this tenant.

Parameters

ParameterTypeRequiredDescription
idIntegerYesPositive global import-filter ID, converted with PHP intval(). Obtain it when saving the configuration or opening it from the relevant email-import list.

Example request

$result = FM_api('ImportCustomersEmail_getLog', [
	'id' => '1042',
]);

Example response

[]

Returns a bare array of raw log rows, or [] when none match. It does not return configuration details, an ok envelope, or a total count. Log payloads remain in their stored formats.

Populated raw rows contain id, Unix-seconds cdate, type_name, type_name2, description, user_id, encoded meta, and obj_id. Database numeric values can be strings; nullable columns are not normalized.

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"}Nonpositive integer-converted ID, checked before authentication.
{"error":"Import By Email feature not enabled"}The account feature bit is disabled.

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

Behaviour and edge cases

  • Selects * where type_name="import_email" and obj_id equals the supplied ID. It does not filter type_name2.
  • Orders by cdate DESC, limited to 1000 rows. Equal timestamps have no additional tie-breaker. There are no accepted offset, cursor, date-range, or page-size controls.
  • A missing or foreign filter is not an error; matching tenant-local log rows can still be returned. This endpoint is not a complete email delivery audit, and it does not include other log categories.
  • This read has no writes, history effects, cache invalidation, or mailbox processing.

See it in Fieldmotion

CRM1

In Imports → Customers by Email, use the row’s log action to download a CSV. Filter for ImportCustomersEmail_getLog; it supplies the configuration ID.

CRM2

In Customers by Email, use Download Log and filter for ImportCustomersEmail_getLog. The page converts the returned JSON rows to a CSV download.

Related endpoints