updated the publish api endpoint