developers.customerlabs.com Open in urlscan Pro
54.172.48.65  Public Scan

URL: https://developers.customerlabs.com/
Submission: On October 05 via automatic, source certstream-suspicious — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

Public


Documentation Settings
Environment
Data API Variables
Layout
Double Column
Language
cURL



CUSTOMERLABS DATA API

 * Introduction

POST
Get User Profile
POST
Get User Events
POST
Get Account Events
POST
Get User Source Engaged
POST
Get Account Profile
CustomerLabs Data API

The CustomerLabs Data API a single API to read user-level and account-level
customer data. CustomerLabs allows you to query the entire user or account
object programmatically, including the external_ids, user_id, account_id and
events.


AUTHENTICATION

Authenticate to the Data API by sending your account's API KEY along with a
request. Authentication uses API Key Auth, where X-API-KEY value should be sent
in the request header.


CONTENT-TYPE

In order to send data to our HTTP API, a content-type header must be set to
application/json.


ERRORS

CustomerLabs uses conventional HTTP response codes to indicate the success or
failure of an API request. In general, codes in the 2xx range indicate success,
codes in the 4xx range indicate an error that failed given the information
provided and codes in the 5xx range indicate an error with CustomerLabs'
servers.


REQUEST BODY

Each request endpoint for User or Account support POST method with asscoiated
JSON body.

To call User endpoint, request body should contain either CustomerLabs user_id
or User External ID parameters.

To call Account endpoint, request body should contain either CustomerLabs
account_id or Account External ID parameters.

AUTHORIZATIONAPI Key
Key
<key>
Value
your-api-key

POST

Get User Profile


https://data.api.customerlabs.co/user/get_profile

Get a single user profile’s traits, acquisition details and other user related
properties using user_or or external_id parameter.

AUTHORIZATIONAPI Key
This request is using API Key from collectionCustomerLabs Data API
HEADERS
x-api-key
your-api-key

BODYraw

{
    "user_id": "user_id"
}



Get User Profile using identify parameters
Example Request

curl --location --request POST 'https://data.api.customerlabs.co/user/get_profile' \
--data-raw '{
    "identify_by_key": "identify_by_email",
    "identify_by_value": "jhon@mail.com"
}'

Example Response
200 OK
Body
Header(0)
View More

{
  "traits": {
    "email": "jhon@mail.com",
    "first_name": "Jhon",
    "stage": "Lead"
  },
  "additional_info": {
    "city": "London",
    "country": "United Kingdom"
  },
  "acquisition": {

POST

Get User Events


https://data.api.customerlabs.co/user/events

Fetch user events based on CustomerLabs user_id or identify_by property. Events
can be filtered using events and date range properties. Returns total number of
events and requested page_id. Each page request returns 25 event records.

AUTHORIZATIONAPI Key
This request is using API Key from collectionCustomerLabs Data API
HEADERS
x-api-key
your-api-key
BODYraw
View More

{
    
    "identify_by_key": "identify_by_key",
    "identify_by_value": "identify_by_value",
    "page_id": 4,
    "order": "desc",
    "filter": {
        "events": [
            "lead_created", "lead_updated"
        ],
        "date_filter": {



Get User Events using user_id
Example Request
View More

curl --location --request POST 'https://data.api.customerlabs.co/user/events' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": "cl3666t3g4s6ot61eb0995-db96-4b56-85fa-a6b0c67f2df0",
    "filter": {
        "events": [
            "user_registered", "subscribed"
        ],
        "date_filter": {
            "from": "2020-09-10",
            "to": "2020-09-15"

Example Response
200 OK
Body
Header(0)
View More

{
  "events": [
    {
      "action": "user_registered",
      "user_id": "cl3666t3g4s6ot61eb0995-db96-4b56-85fa-a6b0c67f2df0",
      "cl_triggered_ts": "2020-09-30T04:41:55.701Z",
      "event_from": "server",
      "city": "nil",
      "country": "nil",
      "state": "nil",
      "timezone": "nil",

POST

Get Account Events


https://data.api.customerlabs.co/account/events

Fetch user events based on CustomerLabs account_id or identify_by properties.
User events and date range filters can be applied. Returns total number of
events and requested page_id. Each page request returns 25 event records.

AUTHORIZATIONAPI Key
This request is using API Key from collectionCustomerLabs Data API
HEADERS
x-api-key
your-api-key
BODYraw
View More

{
    "account_id": "account_id",
    "page_id": 4,
    "order": "desc",
    "filter": {
        "events": [
            "user_created", "user_updated"
        ],
        "date_filter": {
            "from": "2020-10-11",
            "to": "2020-10-15"



Get account Events using account_id
Example Request
View More

curl --location --request POST 'https://data.api.customerlabs.co/account/events' \
--header 'Content-Type: application/json' \
--data-raw '{
    "account_id": "cl23424fdfsdf",
    "filter": {
        "event": [
            "user_registered", "subscribed"
        ],
        "date_filter": {
            "from": "2020-09-10",
            "to": "2020-09-20"

Example Response
200 OK
Body
Header(0)
View More

{
  "events": [
    {
      "action": "user_registered",
      "user_id": "cl3666t3g4s6ot61eb0995-db96-4b56-85fa-a6b0c67f2df0",
      "cl_triggered_ts": "2020-09-30T04:41:55.701Z",
      "event_from": "server",
      "city": "nil",
      "country": "nil",
      "state": "nil",
      "timezone": "nil",

POST

Get User Source Engaged


https://data.api.customerlabs.co/user/get_source_engaged

Fetch user source engaged data using CustomerLabs user_id or identify parameters

AUTHORIZATIONAPI Key
This request is using API Key from collectionCustomerLabs Data API
HEADERS
x-api-key
your-api-key
BODYraw

{
    "user_id": "user_id",
    "filter": {
        "date_filter": {
            "from": "2010-09-18"
        }
    }
}



Get user source engaged using user_id
Example Request
View More

curl --location --request GET 'https://data.api.customerlabs.co/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": "cl23424fdfsdf",
    "filter": {
        "date_filter": {
            "from": "2010-10-01"
        }
    }
}'

Example Response

Body
Header(0)
View More

{
  "sources": [
    {
      "source": "www.google.com",
      "total_session": 20,
      "mobile_session": 2,
      "desktop_session": 10,
      "other_session": 8,
      "last_engaged_date": "10/08/2019 07:35"
    },
    {

POST

Get Account Profile


https://data.api.customerlabs.co/account/get_profile

Get Account properties using CustomerLabs account_id or identify_by properties.

AUTHORIZATIONAPI Key
This request is using API Key from collectionCustomerLabs Data API
HEADERS
x-api-key
your-api-key
BODYraw

{
    "account_id": "account_id"
}



Get account profile using identify parameters
Example Request

curl --location --request GET 'https://data.api.customerlabs.co/account/get_profile' \
--header 'Content-Type: application/json' \
--data-raw '{
    "identify_by_key": "company_name",
    "identify_by_value": "customerlabs.co"
}
'

Example Response

Body
Header(0)

{
  "traits": {
    "company_name": "customerlabs.co",
    "size": "100",
    "founded": 2014
  }
}