New message API and a client API