API now working