Those aren’t events and they can’t be created via the API, only by integrations.
Just create an event. Literally, HA has those and you can make them via the API. At that link find POST /API/events/<event type> to see how the create event API works. Then in an automation you can listen for it using an event trigger and pull info you passed in out of the trigger object to make your announcement.
Or alternatively just use a webhook. Same idea except even easier because now you don’t even need a long lived access token. You basically just have a custom API that allows you to trigger your automation and make an announcement.
Thank you Mike and Tomas. An event indeed sounds more logical.
So I can just type website_sale as my event type, without first having to register such a ‘new’ event type ?
Will try this. With the extra data i can even pass on what product was sold. Sweet