flexAPI for server to server communication