Rest API with custom Domain returns 404, but graphql and /admin works

Ok stupid mistake.

I had in gitignore:
config/

The problem with that line is, it’s recursive and not only root folder.

So it ignored all the config files for the routes:
/api/xxx/config/*

Fixed by using the correct root-folder gitignore:
/config