When to use this endpoint

Use Notices_markAllSeen for the CRM2 bell’s “Mark all read” action. It changes stored notice statuses, not merely the polling checkpoint.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login and performs no additional page or role-permission check.

The read or write is limited to the authenticated tenant. Notice endpoints that say “current user” use the authenticated session user ID within that tenant.

Parameters

This endpoint has no operation-specific parameters.

Example request

$result = FM_api('Notices_markAllSeen', []);

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.

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

Behaviour and edge cases

  • Only rows owned by the current user are updated. Notices whose metadata contains source="push" are deliberately excluded from the CRM implementation.
  • Already-read rows and an empty notice set still produce success; affected-row count is not returned.
  • The mobile host has a separate implementation of the same route name. That intermediary marks all current-user notice rows, including app-push notices, and its regression test verifies that status persists into later app synchronization.

Side effects

  • Sets status=1 on matching CRM-visible rows. It does not alter users.meta.notices_seen, write generic history, or recalculate a stored counter.

See it in Fieldmotion

CRM1

No direct CRM1 caller was found.

CRM2

Open the header bell and choose Mark all read. The UI immediately clears its visible count and updates notification-card styling while this request persists the statuses.

Related endpoints