add endpoint for javascript client