Introduction
Understand general concepts, response codes, and authentication methods for working with the Litlyx API.
We welcome all types of contributions for building SDKs in various tech stacks or developing use cases with the Litlyx API. For requests, join our Discord and talk with the team, or send an email to: help@litlyx.com.
Base URL
The Litlyx API is built on REST principles. We recommend using HTTPS for every request to enhance data security and privacy. The API does not support HTTP.
The base URL is:
https://api.litlyx.com/api/v1
Authentication
All API endpoints are authenticated using Bearer tokens, which are picked up from the specification file.
Authorization: Bearer lit_123456789
To get your Api Key
, open the project’s settings tab on Litlyx Cloud.
Response Codes
Litlyx uses standard HTTP codes to indicate the success or failure of your requests.
Code | Description |
---|---|
200 | Successful request. |
400 | Check that the parameters were correct. |
401 | The API key used was missing. |
403 | The API key used was invalid. |
404 | The resource was not found. |
429 | The rate limit was exceeded. |
500 | Indicates an error with Litlyx servers. |
Concepts
To optimize API performance, our return value is dynamic. You need to specify rows
with specific names, and the API will return only the values you request. Here is the list of row names
to include in the body of your requests:
Row names for Visits
Name | Description |
---|---|
website | Website domain. |
page | Page path (url) |
referrer | External source from where the visit originates. |
browser | Browser used by your visitor. |
country | Visitor country. |
continent | Visitor continent. |
os | Visitor operative system. |
device | Visitor device. |
created_at | When the visit was made. |
session | Session formula: hash(daily_salt + strip(website_domain) + strip(ip_address) + user_agent) |
flowHash | *Internal use. |
Row names for Events
Name | Description |
---|---|
name | Event name. |
metadata | Event metadata. |
created_at | When the event was made. |
session | Session formula: hash(daily_salt + strip(website_domain) + strip(ip_address) + user_agent) |
How to extract metadata fields?
metadata
: Get all the event’s metadata.
metadata.custom_field
: Get only the metadata custom_field
field.
Start integrating your data collected with Litlyx into your proprietary apps today!