Getting "Cannot remove the API" in WSO2 API Manager
I tried to delete an API in the WSO2 API Manager Publisher at https://hostname:9443/publisher/ but received the error Cannot remove the API as active subscriptions exist (see screenshot below).

To delete this API, navigate to the WSO2 API Manager Developer Portal at https://hostname:9443/devportal/.
Click on "Applications" and you will notice that the application DefaultApplication has 2 active subscriptions (see screenshot below). Applications can be created here to allow you group APIs into a logical grouping. Each application has a consumer key and consumer secret pair.
Click on the application name then click on "Subscriptions" on the left-most navigation pane.

Now the subscriptions appear. Click on "Delete". Now you should be able to delete the API from the Publisher.

A subscription means that there are active users subscribed to the API.
--
References: