Creating a custom support app, how do you support a custom route like myjitsi.com/api?

We are currently making a Go app that supports a custom page instead of the default page and one purpose is also to pre-set a password for a conference before it is created using the app and then stores the password into an external database like mysql.

What we want to achieve is that when you enter myjisti.com/api, it should redirect to the Go app instead of creating a new conference. we want the /api to become the root when creating rooms. e.g /api/rooms/new.

I used a location match (location = /api) in nginx to redirect it to our app using proxy_pass but I think I am missing something because anything that comes after /api e.g (/api/rooms/new) is still handled by Jitsi’s default and creates a new conference instead.

I am also looking into the possibility of using a subdomain (api.myjitsi.com) to handle this. I just wanted to know if there is a special way of handling this custom routes since Jitsi might be using it exclusively.