POST Users / Events

Endpoint URL:


Path Parameters

Name Type Required Definition
user_id string A Sailthru Mobile user ID

Body Parameters

Name Type Required Definition
events object JSON object containing array of events


Basic Event

curl -X POST -u :$API_KEY -d '{"events":[{"name":"event_name", "date":"2016-09-11T18:04:23Z"}]}' -H "Content-Type:application/json" -H 'Accept: application/json'$user_id/events

Multiple Events

curl -X POST -u :API_KEY -d '{"events":[{"name":"event_name", "date":"2016-09-11T18:04:23Z"},{"name":"event_name_2", "date":"2016-09-11T19:04:23Z"}]}' -H "Content-Type:application/json" -H 'Accept: application/json'

Events without a specific date

curl -X POST -u :API_KEY -d '{"events":[{"name":"event_name"}]}' -H "Content-Type:application/json" -H 'Accept: application/json'

Result Format

202 Accepted

// your events have been successfully registered

400 Bad Request

//your event data is not in the correct format
//common issues include: no event name, invalid event object, no events

401 Unauthorized

// This error is given when your API client credentials are not correct. 


  • The date property on an event is optional and if left off UTC time will be used in its place.
  • In versions prior to v5, the /users/events endpoint would prepend Public Api: to events when viewed in the web view. In v5, this behavior has been removed, but if your code depends on this, then you can use the /v4/users/events/ endpoint.
  • POSTing an event to a user with multiple devices will cause the event to be attributed to each and every device associated with the requested user_id. Dates should be formatted using an ISO 6801 formatted string.

Contact us