fixed api endpoint negotiation