Track Feature

post
Feature

https://:domain.customersuccessbox.com/api/v1_1/feature
POST Feature allows you to track a user event or activity within your application.
Request
Response
Request
Headers
Authentication
required
string
Bearer {api_key}
Content-Type
required
string
application/json
Body Parameters
total
optional
integer
Send "total" i.e. total number of times a feature has happened. If not set, default "total" is considered to be "1" We aggregate "total" for a feature daily at the start of each day (GMT) from features received with yesterday's timestamp.
message_id
optional
string
Generate a unique hash on client side for each event. We will use this to de-duplicate.
timestamp
required
string
ISO 8601 in GMT Timezone
account_id
required
string
Unique identifier for account
user_id
required
string
Unique user for account
feature_id
required
string
Unique feature name
module_id
required
string
Unique module name
product_id
required
string
Unique product name
Response
200: OK
Cake successfully retrieved.
{
"success": true
}

post
‚Äč

https://:domain.customersuccessbox.com/api/v1_1/feature
Request
Response
Request
Body Parameters
total
optional
integer
If not set, we consider default total as "1" for a feature. This is useful
Response
200: OK
If not set, we consider default total as "1" for a feature. This is useful

Parameter

Context

Example

feature_id

Event or Activity performed by a user

Account Viewed

module_id

Parent group for Feature. It's recommended to hardcode this in case Modules are not applicable for your application.

Accounts

product_id

Parent group for Module. It's recommended to hardcode this in case you do not offer multi-products under a single tenant/instance.

CustomerSuccessBox

Body example

{
"account_id": "ID of an Account for which you want to log data",
"user_id": "john.doe@acme.com",
"product_id": "CustomerSuccessBox",
"module_id": "Accounts",
"feature_id": "Account Viewed",
"timestamp": "2017-11-15T17:01:57+0530",
"total": 20
}

CURL example

curl --location --request POST "https://{{domain}}.customersuccessbox.com/api/v1_1/feature" \
--header "Authorization: Bearer {{api_key}}" \
--header "Content-Type: application/json" \
--data "{
\"account_id\": \"ACME343rq\",
\"user_id\": \"john.doe@acme.com\",
\"timestamp\": \"2017-11-15T17:01:57+0530\",
\"feature_id\": \"Account Viewed\",
\"module_id\": \"Accounts\",
\"product_id\": \"CustomerSuccessBox\",
\"total\": \20\,
}"