Rebuilt API to send parameters correctly

Was originally encoding each parameter as a named field, but the server
requires a single field called `parameters` that contains an array of
parameter values.