See the last section of Anvil Docs | Creating HTTP APIs
It shows you how you can redirect users to a URL.