How to call a REST API from a web hook?

Do you know if you can tell where the request is coming from in a hook? I have a dev environment and a production one - I want to change the API thats being called based on the environment …