How to add activity in trello card using api?

I am working on a trello power ups that add estimate time and work logs in card. i want to add activity using api from my power ups. how could I do that?