api endpoint template php syntax fix