made changes to the POST api call as per wp-api specifications