identify

PUT {{api_url}}/api/v1/identify

The identify call is primarly used from your SAAS product to identity an end_user and their associated company to Userlot.

The most common way of using this is via our analytics.js file and performed on the front end of your application.

<script>
    window.Userlot=window.Userlot||[];
    function userlot(){window.Userlot.push(arguments);}
    (function(a,b,c,d){var cz=a.createElement(b); cz.type=c; cz.async=true; cz.src=d;var s=a.getElementsByTagName(b)[0];s.parentNode.insertBefore(cz, s);})(document, "script",'text/javascript', 'https://scripts.userlot.app/analytics.js');
    userlot(['init', /*<yourSubdomain>*/, /*<yourApiKey>*/]);
    // Then before sending any events you should identify the user and company/account
    userlot(["identify", /*<userEmail>*/, /*<userExternalId>*/, /*<companyName>*/, /*<companyExternalId>*/]);
</script>

If you would rather identify from your backend you can use the API endpoint defined here instead.

Request Body

[{"name"=>"user_email", "value"=>"", "datatype"=>"null"}, {"name"=>"user_external_id", "value"=>"", "datatype"=>"null"}, {"name"=>"company_name", "value"=>"", "datatype"=>"null"}, {"name"=>"company_external_id", "value"=>"", "datatype"=>"null"}]