Added posting functionality for API.