Make interfaces easy to use correctly and hard to use incorrectly.

When people are using your interfaces, whether it is a graphical user interface or an API, you should strive to make it very easy to use. Further, it should be obvious how to use it properly.
Strive to make each field as obvious as possible. Choose your names and labels carefully. Imagine a field named “amount”. Is this an amount in dollars? A quantity of items ordered? The number of ounces of product? It could mean a lot of things. As a result, with this field, it would be easy for the user to misuse the interface. This is a bad design.
In visual interfaces, it is important to use controls that match the field type. Booleans work well with checkboxes, with the checked state matching the true condition. Phone numbers should limit the controls to numeric input, which is particularly helpful when your customer is using a mobile device. Limit text choices with a dropdown instead of validating after entry.
Techniques like these make it hard for the user to enter the wrong kind of data. This increases your chances that your system will be used correctly.
The same holds for APIs. With expressive names and restrictive rules, you can avoid problems where the wrong kind of data is submitted with any given parameter.