You cannot delete an API specification that is currently used in one or more API instances or versions being managed in API Manager.
Delete API Instances
You can delete an API instance and its version if you no longer need to manage it from API Manager. Deleting an instance from API Manager does not delete its referenced asset from other locations, such as Anypoint Exchange (Exchange) or file system.
To delete API instances from API Manager:
Go to Anypoint Platform > API Manager.
In API Administration, click the name of the API you want to delete.
The API Settings detail appears:
Select Actions > Delete API.
Click Delete to confirm.
Your API instance is now successfully deleted.