How to create a custom admin route?

I have added a new button to the Strapi content manager interface and aim to create a custom API endpoint to handle requests triggered by clicking this button. A crucial requirement is that this API endpoint should be accessible to the currently authorized admin user without any additional authorization process.

From what I understand, I can achieve this by using the type: “admin” API. However, I have not found a way to create such an API endpoint without developing a plugin. Is creating a new plugin the only method to accomplish this? Or is there another setting that would allow the API endpoint to use the ‘admin’ authorization strategy?

This topic has been created from a Discord post (1236970294430797845) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord