Tracking user actions.
POST https://api.dashly.app/users/{id}/events
For {id}
you can use:
by_user_id=true
)Authentification parameters. id_as_string parameter.
Parameter | Type | Description |
---|---|---|
by_user_id |
Optional[boolean] | Should be true in case you're using User ID instead of Dashly ID. Default: false |
event |
string[1;255] | Event name (up to 255 characters) |
params |
Optional[Dict] | Event properties. Default: {} |
created |
Optional[timestamp] | UTC timestamp. Time, when event happened. Default: time of request. Event does not trigger automessages, bots and triggered integrations if this parameter is added |
app |
Optional[ID] | D of requesting application. Default: calculated based on access token |
event
field should contain system event name starting with $
symbol if you are posting a standart system event (not custom). You can look up those standart names here.
data
field will contain careated Event object.
{
"meta": {
"status": 200
},
"data": {
"id": 6187513,
"created": 123123123,
"type": {
"id": 123123123,
"name": "testEvent",
"score": 0,
"visible": true,
"active": false
},
"user": 123123123,
"props": {}
}
}
Track Order Created
event with event property item=chicken
by user with dashlyId=8173131
(our ID):
curl -X POST \
--data-urlencode "event=Order Created" \
-H "Authorization: Token XXX" \
https://api.dashly.app/users/8173131/events
Track Order Created
event with event property item=chicken
by user with UserId=user-7216
(your ID):
curl -X POST \
--data-urlencode "event=Order Created" \
--data-urlencode 'params={"item": "chicken"}' \
--data-urlencode "by_user_id=true" \
-H "Authorization: Token XXX" \
"https://api.dashly.app/users/user-7216/events"