Getting started

The UserLog API can be used in different ways: from simple Javascript snippets to SDKs for Node, NextJS, React, PHP and more. You can implement it by sendng a POST request to the /api/v1/log endpoint, via Javasript (from CDN) or SDKs (Node, NextJS, React, PHP).

API Reference

Our API Endpoints are the core of UserLog. They are used to track events in your application, send pageviews or log user related information. These events could be interactive user actions, or server events.

Endpoints

  • /api/v1/log: Track user events such as clicks, feature usage or server-side actions.
  • /api/v1/page: Pageviews (only for web) - coming soon.
  • /api/v1/profile: User related information like user ID, email address, name and more. - coming soon.

To publish an event to UserLog, use the following POST request:

POST https://api.getuserlog.com/api/v1/log

Required Request Headers

NameTypeDescription
Content-TypeStringapplication/json
AuthorizationStringBearer <API_KEY>

Request Body

NameTypeRequiredDescription
projectStringyesProject name
channelStringyesChannel name
eventStringyesEvent name
user_idStringyesUser ID, e.g. abc@example.com
descriptionStringoptionalEvent description
tagskey/value pairs as StringoptionalEvent tags
iconEmojioptionalSingle Emoji, e.g. 💰
notifyBooleanyesSend push notification

Example Response

{
  "status": "ok",
}