When to use this endpoint

Use for the Settings history panel. This records configuration changes, not successful delivery attempts.

Authentication and permissions

Use signed API-key authentication or a logged-in CRM session on the account’s routed host. API keys act as their owner; normal session requests need dispatcher CSRF protection where configured. Tenant data is selected from the authenticated account.

The handler has no additional page-action/Role check. A CRM2 screen hiding a control does not add such a server guard, and CRM2 role names must not be assumed to apply to CRM1. The dispatcher has no dedicated object-scope mapping for this namespace.

Parameters

ParameterTypeRequiredDescription
channel / actionTextNoExact stored channel/type-name2 and compact JSON action filter; no enum validation. Common channels email,push,sms,webhooks and actions create,update,delete.
notification_id / notification_keyInteger-compatible / textNoPositive notification_id selects obj_id first. Otherwise notification_type_<id> selects that rule ID; other nonblank keys select a deterministic hashed setting ID. A nonblank key also adds a metadata substring filter, even when a numeric ID is supplied.
from / toUnix secondsNoNonblank values integer-convert and compare log.cdate inclusively. Zero is a real bound. No relative-day or timezone conversion.
limitInteger-compatibleNoDefaults 200; clamped to 1..500, including explicit zero ->1. No offset/page cursor.

Example request

$result = FM_api('Notifications_getHistory', ['channel'=>'email','notification_key'=>'notification_type_18','limit'=>'50']);

Example response

{
  "data": [],
  "notificationOptions": []
}

Application errors normally remain JSON responses with HTTP 200; inspect error/warning keys. Numeric driver values can be strings.

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

  • data sorts by cdate descending then id descending. Each row includes id,cdate,channel,description,user_id,meta,obj_id,user_name and derived action,notification_key,notification_id,notification_label,userIP,newDate,newTime. meta decodes to an array; invalid/missing metadata becomes []. userIP defaults N/A; display date/time use server PHP time.
  • notificationOptions scans up to 1000 recent rows for the selected object/channel, deduplicates key|ID and sorts labels case-insensitively. Its query does not apply the main action/date bounds or the same metadata-key filter; options may include entries outside the displayed result.
  • Read failure normalizes to empty arrays. The dispatcher does not apply its Log/Logs TeamAccess mapping to this Notifications namespace.

Side effects

  • Reads tenant logs only; no configuration, delivery, notification or queue change.

See it in Fieldmotion

CRM1

Settings > Notifications history opens widgetNotificationHistory.

CRM2

Use History beside Email/Push/SMS/Webhooks notification settings; widgetNotificationHistory sends channel/key/date filters.

Related endpoints