How to create custom events, that appears in contact activity timeline


I would like to know how to add custom events for contacts using API that appears in the activity timeline.
We want to store some data in key value pairs and this is for a marketplace app.

The following article was given for the custom events reference,

Tried the custom events API like below


{“price”: 1000, “currency”: “USD”, “product-name”: “Amazon Fire Stick”, “user_id”: “1010303”}

Got, 405 Method Not Allowed

I’m not sure about what API headers needs to be set. Also what is the correct way to create custom events. Is Associate Visitor API required for custom events. Can you please guide us on this.

Also, want to know the custom events creation is similar in both freshsales and freshworks crm.

Thanks in advance.