How to create a custom field in a model via write API

How to create a custom field(with default value, maybe hidden) in any model via write API.