While we're here, let's remove APIError:

```python
return jsonify(error="unknown fields on json data"), BAD_REQUEST
```

Feel free to add more to the error if you think it would be more descriptive of the problem.