...
If you want to create custom locations for your endpoint, there is currently a bug that can be fixed with the following workaround: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3474#issuecomment-1902790528
Example:
Moreover you need to add a custom section into the configuration rewrite /api/(.*) /$1 break;
to work properly.