https://github.com/typicode/json-server
For a fancier solution, Swagger / OpenAPI spec is useful. It has a feature called API Auto Mocking which you can serve with SwaggerHub. [The free tier includes this feature by the way.]
https://app.swaggerhub.com/help/integrations/api-auto-mockin...
https://swagger.io/tools/swaggerhub/
You can also use Swagger Codegen to generate server stubs and API clients as code in various languages once you're ready to break out of the mock API.
https://github.com/swagger-api/swagger-codegen
That's the route I'd go personally as this tooling is available for free, is fairly mature, and has a strong community behind it at this point.
There are a few other similar alternatives that I know less about such as WireMock (http://wiremock.org/) and Stoplight (https://stoplight.io/). Postman also has a mock server feature if you happen to already use that.
I built this a couple of years ago when I wanted to experiment with AWS API Gateway. The entire project is hard-coded definitions in API Gateway with a domain (I don't log anything). It costs me a trivial amount to host (~$0.51/mo, 99% of which is the R53 hosted zone + domain cost) so I'll be keeping it up indefinitely since I use it for some projects of mine.
It was a bit of work up front, but it made the eventual integration almost seamless. In this case, I manually created the endpoints and mocked return values. If I did it again, I'd probably use something more automated like some of the other posters have mentioned.