In order to enable Mautic API log in to your Mautic Account and press the Setting icon in the top right corner.

Mautic Dashboard

 Then, choose  Configuration from the list of settings in the flyout menu.

Mautic settings

Finally, go to the API Settings tab and enable the API option. Besides, enable the HTTP basic auth options in case your API uses it (e.g. Magento 2 Mautic Integration extension)

Mautic API settings

Don't forget to press the Save&Close button.

Mautic settings save

Besides, it is recommended to clear the Mautic cache.

There are several ways to do that. The easiest is to go to the /var/cache folder and delete its content. If you want to do it via CLI command, navigate to the Mautic root folder and run the following:

rm -rf var/cache/*

The new cache files will be generated after Mautic is refreshed in the browser.