Best way to hook a custom url?

The approach is pretty much sound, this is how these things work in WordPress.

You might want to use add_rewrite_enpoint() for implementation though, since it compresses multiple steps into on integrated call and fits many use cases well.