To delete an API, you must ensure that the API is not linked to an API Product.
If the API source of the API or any of its versions is linked to an API Product, you will not be able to remove it. This avoids deleting APIs used in API Products and breaking existing client integrations.
In order to delete API products, you must ensure that all customers who have subscribed to an API product have cancelled their subscription or that you have cancelled the subscription for them. Once all customer subscriptions to a specific product have been cancelled, you can then delete the corresponding Product and API.