API internal handling.