Strapi endpoint 404 NOT FOUND

how to get endpoint API

http://localhost:!337/api/YOU COLLECTION ← NOT WORK 404 not found

What i`ll do in your case, because i came across it lately.
This answer is for v4

  1. Go to strapi admin under /settings/user-permissions/roles find your Role (i`ll assume you want the Public)
    1.a Find your -collection (api folder)
    1.b Tick that the Role has access to the request.
    //if that doesnt work check
    2.the appropriate routes.json in your api.

For future users, I had the same problem for about an hour.
If you get a 404 error after resolving the 403.

DO NOT FORGET TO PUBLISH YOUR COLLECTION