Correct response status and mimetype for API.