Skip to main content
POST/users-by-id/:user_custom_id/events/

Create event by user custom id

You can create an event using a user_custom_id.

AttributesTypeRequiredDescription
user_custom_idstringyesThe unique identifier for the user which is provided by the client. Previously: "user_id".
dataJSONyesA valid json object with additional data.
namestringyesAn event name.
timestampdatetimenoA datetime when an event occured in UNIX format.

Request​

curl -X POST -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"name":"profile_updated",
"timestamp": 1426967129,
"data":{
"keyData1":"value for key data 1"
}
}' "https://<your_app_subdomain>.user.com/api/public/users-by-id/:user_custom_id/events/"

Response​

{
"id": 86,
"created": true
}

'created: true' means that this is first occurrence for created event
'created: false' means that there is at least one occurence for this event in database