Update api.php to reflect changes to the hook.