Strapi 4.5.6 custom API controller 404

System Information
  • Strapi Version: 4.5.6
  • Operating System: Ubuntu 22.04.1 LTS
  • Database: PostgreSQL
  • Node Version: v18.12.1
  • NPM Version: 9.2.0
  • Yarn Version: 1.22.19

I am following Strapi documentation to add a custom API /verify for user registration. We want to use a mobile SMS message to verify the user’s phone number. I’ve written the controller+router code for the API and tested it once. I might have then upgraded Strapi from version 4.5.x to 4.5.6. Now the API call returns 404.

I have checked that the API is shown in the Strapi Admin panel in the role based authorization settings, also I have set the API function to require no authentication.

Have I missed anything? Any thoughts / insights would be much appreciated.

Also, a broader question: should I have used the APIs provided by the “Users and Permissions” to do user registration instead? Any documentation / example on how I would implement an SMS based verification in that process?

Thank you very much!