The API update and create methods don't trim spaces around most passed values. This can lead to problems in the frontend. For instance, we can create two hosts with different spaces around the host names, which we later won't be able to save because the spaces will be trimmed.
Keep in mind, that certain parameters like "ipmi_sensor" of items should not be trimmed.