Pass the right kind of data to API update

The API should work fine now.