There are couple of ways to send event
to Herogi. You can use restful api or one of our client libraries to send event.
All URLs referenced in the documentation have the following base;
https://stream.herogi.com
HTTP requests to the REST API are protected with HTTP Basic authentication. You will use your Herogi app id as the username and your app secret as the password for HTTP Basic authentication.
key | Data Type | Required | Example | Description |
---|---|---|---|---|
sessionId | STRING | YES | john | Session information of event as string |
scenarioNames | ARRAY[STRING] | YES | [“scenario1”, “scenario2”] | Name of the scenarios you want to send event as array of string. If you provide empty array, it’ll send to all available scenarios |
eventName | STRING | YES | loginEvent | Event name as string |
data | OBJECT[OBJECT] | NO | {param1 : “value1”, “param2” : “value2”} | Event parameters as key/value object |
Example;
curl -H "Content-Type: application/json" -X POST \
-d '{"sessionId":"12345","scenarioNames":["CustomerEngagement"],"eventName":"loginEvent","data":{"accountType":"user", "email": "john@example.com", "fullname":"John Mellnik"}}' \
--user appid:appsecret https://stream.herogi.com/event