Update api.php

Bug fix for missing else include.