Customers
Reactivate a customer
/a/Customer_enable
Reactivate one customer, remove its customer deletion-log marker, and invalidate generated customer-name caches without restoring recurring work.
When to use this endpoint
Use Customer_enable when an inactive, non-deleted customer should become selectable for new work again. It is the counterpart to Customer_disable, not a restore operation for a soft-deleted customer.
Review any recurring schedules separately. Deactivation removes their future work and enabling the customer does not reactivate those schedules.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login but performs no additional role or page-permission check.
The customer lookup uses the authenticated tenant and does not filter by active or deleted state.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Customer to reactivate. It must convert to an integer of at least 1. |
Example request
$result = FM_api('Customer_enable', [
'id' => '1042',
]);
Example response
{
"ok": 1
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"missing or invalid parameter: id"} | id is absent or does not convert to a positive integer. |
{"error":"customer does not exist"} | No customer row has that ID. |
Behaviour and edge cases
- If the customer is already active, the endpoint returns
{"ok":1}without changing timestamps, deletion markers, or caches. - When reactivating, it updates
is_active=1,last_edited, andedited_uuid. - It removes matching
customersrows from the tenant deletion log and leaves unrelated or non-numeric metadata entries intact. - The query can select a soft-deleted row. In that case
is_activemay be set to1, butdeletedremains1and normal detail/list endpoints still hide the customer.
Side effects
A real activation invalidates the customer cache, removes this customer's deletion-log marker, and removes generated daily-archive customer_names.json files so they can be rebuilt.
It does not re-enable customer recurrences, recreate future jobs, recreate scheduler rows, restore expiry notifications, write a customer audit entry, or fire Customer_edit.
See it in Fieldmotion
CRM1
Open Customers, display inactive customers, choose Enable on a row, and filter the Network panel for Customer_enable. The list redraws after the success response.
CRM2
Open Customers, use the Activate row action for an archived customer, and filter for Customer_enable. CRM2 shows a success notification and refreshes the table.
Related endpoints
Customer_disablemakes a customer inactive and dismantles its active recurrences.Customer_getretrieves the customer and its currentis_activevalue.Customer_deletesoft-deletes customers; enabling is not its inverse.