Tracking events


Event endpoint

To record specific events in your product, send a POST request to with a JSON payload containing:

  • api_key: your Sherlock API key
  • user_id: identifier of the user that performed the event (must be a string)
  • event: name of the event (must be a string)
  • timestamp: a unix timestamp in milliseconds, indicating the time at which the event occurred

The API will respond with a 202 Accepted if the request was accepted.

Example cURL request:

$ curl -XPOST \
    -H 'Content-Type: application/json' \
    -d '{"api_key":"xyzzy","user_id":"1234","event":"Viewed page","timestamp":1553647710707}'