Customers
List customers with invalid emails
/a/Customers_listInvalidEmails
Return non-deleted customers whose primary email is blank or fails PHP’s standard email validation.
When to use this endpoint
Use Customers_listInvalidEmails before a workflow that expects every customer to have a syntactically valid primary email, such as the CRM’s accounting-connection cleanup prompt.
The endpoint reports problems only. It does not repair addresses or inspect additional/accounting email fields.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.
The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.
Parameters
This endpoint has no operation-specific parameters.
Example request
$invalid = FM_api('Customers_listInvalidEmails', []);
Example response
[
{
"id": "1088",
"name": "Northwind Cork",
"email": "not-an-email"
}
]
Blank and whitespace-only emails are included. The stored value is returned unchanged rather than trimmed in the response.
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
[] | Every non-deleted customer has a primary email accepted by FILTER_VALIDATE_EMAIL, or there are no customers. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- All non-deleted customers are loaded and validated in PHP. Inactive customers are included.
- Validation trims the value only for the test, then applies PHP
FILTER_VALIDATE_EMAIL. It does not check deliverability, duplicates, suppression status, or tenant email settings. - Result order follows an unordered customer-table query. There is no pagination or limit.
See it in Fieldmotion
CRM1
The CRM1 customer email-checker widget calls Customers_listInvalidEmails before offering to generate placeholder addresses. Filter Network requests by the endpoint name when that dialog opens.
CRM2
In CRM2, start the QuickBooks connection workflow that checks customer email quality. The checker calls Customers_listInvalidEmails and can then offer a separate repair action.
Related endpoints
Customer_setEmailreplaces the primary email on one customer.Customers_listcan retrieve emails with normal customer filters.