Upload attachment via API

I need to create a record that contains a field of type “attachment”. The attachment field is not part of the open-api spec that contain only the other fields. Any suggestion?

Example is here.

API docs here