Appearance
Account
APIs for managing your Lindris account.
As a reminder, all requests must be authenticated and use the base URL: https://api.lindris.com
Get account details
GETapi/accountRetrieve details about the account associated with the authenticated API key. This endpoint is useful for integration services to verify account information and display relevant account details in their interface.
Response Fields
dataarrayidinteger optional - The unique identifier for the account. Example: 12345companystring optional - The account company name. Example: Awesome Companyemailstring optional - The account's primary email address. No-examplephonestring optional - The account's primary phone number. Example: +1234567890statusstring optional - The account's current status. Enum: active,suspended,cancelled Example: activecreatedAtstring optional - ISO 8601 datetime when the account was created. Example: 2024-01-19T08:30:00Ztimezonestring optional - The account's timezone in IANA format. Example: America/New_Yorkplanstring[] optional - The account's marketing plan data. Example:logoUrlstring optional - The account's logo URL. Empty string if no logo is set. Example: https://example.com/uploads/logos/logo.png
Request
bash
curl --request GET \
--get "https://api.lindris.com/api/account" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/account';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/account"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Responses
json
{
"data": {
"id": "123aBc",
"company": "Awesome Company",
"email": "[email protected]",
"phone": "+1234567890",
"status": "active",
"createdAt": "2024-01-19T08:30:00Z",
"timezone": "America/New_York",
"logoUrl": "https://cdn.lindris.com/uploads/logos/company-logo.png",
"plan": {
"marketing": "free"
}
}
}json
{
"message": "Unauthenticated"
}Verify connection and authentication
GETapi/authenticatedThis endpoint allows you to verify that you have successfully connected to the API and are authenticated.
Request
bash
curl --request GET \
--get "https://api.lindris.com/api/authenticated" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/authenticated';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/authenticated"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Response
json
{
"data": {
"authenticated": true
}
}Get website tracker javascript
GETapi/account/website-tracker/{mode?}This endpoint gives you the website tracker javascript code and details. Returns the appropriate JavaScript snippet based on your needs, defaulting to the modern mode.
URL Parameters
modestring optional - The mode of the tracker code to return:- modern (default): Smaller modularized build using ES modules. Best for modern browsers.
- legacy: Larger build compatible with older browsers.
- compat: Most compatible mode that auto-selects between modern/legacy based on browser support using module/nomodule pattern. Example:
modern
- Must be one of:
modernlegacycompat
Request
bash
curl --request GET \
--get "https://api.lindris.com/api/account/website-tracker/modern" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/account/website-tracker/modern';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/account/website-tracker/modern"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Response
json
{
"data": {
"mode": "modern",
"snippet": "<script>...",
"lastEventTrackedAt": 1709306226
}
}