Send Profile Event
After the paywall has been shown to the user, call Send Profile Events to track the paywall impression. This data is used for analytics and to optimize paywall selection over time.
This request should be triggered from the app, immediately after the paywall is displayed.
Paywall impressions are counted uniquely per user. If the same paywall impression event is sent multiple times for the same user, it will be counted only once.
-
The request body must be an array of event objects. For tracking a paywall view, send a single event in the array.
-
You must identify the user by providing either
profileIdorcustomerUserId, and include values returned by the Get Paywall response.
Critical: Experiment Attribution
The isExperiment and aiPricingModelId fields below must match the exact values returned by the Get Paywall response. These fields tell Botsi whether this impression came from the AI Pricing experiment or the control group.
If these values are missing or incorrect, the impression will be misattributed — experiment analytics will be inaccurate, and the AI model's training data will be corrupted, leading to degraded pricing predictions over time.
Request Body
application/json (array of objects)
| Parameter | Type | Required | Description |
|---|---|---|---|
eventType | string | Required | Type of event. Example: paywall_shown |
paywallId | integer | Required | From Get Paywall response (data.id). Required for correct analytics attribution. |
placementId | string | Required | Same placement ID used to fetch the paywall |
isExperiment | boolean | Required | Must match data.isExperiment from Get Paywall. Determines experiment vs. control attribution. |
aiPricingModelId | integer | Required | Must match data.aiPricingModelId from Get Paywall. Ties the event to the specific AI model for training. |
profileId | string | Optional | Provide profileId or customerUserId |
customerUserId | string | Recommended | Your internal user ID. Provide either profileId or customerUserId |
Example Request
[
{
"eventType": "paywall_shown",
"paywallId": 42,
"placementId": "ai-placement-id",
"isExperiment": true,
"aiPricingModelId": 32,
"profileId": "0072102a-c00c-4ea5-9271-1b6e975f2d63"
}
]
cURL Example
curl -X POST "https://app.botsi.com/api/v1/web-api/events" -H "Authorization: {{secret_key}}" -H "Content-Type: application/json" -d '[
{
"eventType": "paywall_shown",
"paywallId": 42,
"placementId": "ai-placement-id",
"isExperiment": true,
"aiPricingModelId": 32,
"profileId": "0072102a-c00c-4ea5-9271-1b6e975f2d63"
}
]'
Response
A successful request will return a confirmation response.
{
"ok": true
}
Try It Out
Click "Send API Request" to see the response here.