I've needed thing like this a few month back and stumbled upon https://mock.codes/ which does the job too
I've been meaning on writing the same functionality as an actual application and adding things like custom response timers, timeouts and more and deploying it to fly.io to try their service out but I haven't gotten around to doing it yet.
If you'd like, feel free to email me at contact@responsecodes.xyz and we can collab