how to insert data in a custom field using api?

I want to record the start and end date of an event for third parties and would like to know how to save this data using api

Captura de ecrã 2020-12-03, às 18.18.34