Update api.php

Extended