Identifying users and user traits
Users endpoint
To identify users and record user traits in Sherlock, send a POST request to https://in.sherlockscore.com/v1/users with a JSON payload containing:
api_key
: your Sherlock API keyuser_id
: identifier of the user (must be a string)group_id
: optional identifier of the group the user is part of (must be a string, if present)traits
: object containing key/value pairs of traitstimestamp
: a unix timestamp in milliseconds, indicating the time at which the traits are current
The API will respond with a 202 Accepted
if the request was accepted.
Example cURL request:
$ curl -XPOST https://in.sherlockscore.com/v1/users \
-H 'Content-Type: application/json' \
-d '{"api_key":"xyzzy","user_id":"1234","traits":{"name":"John","email":"joh[email protected]"},"timestamp":1553647710707}'
Updated over 4 years ago