Send Profile Event

POSThttps://app.botsi.com/api/v1/web-api/events

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.

Follow the notes below for a successful request:
  • 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 profileId or customerUserId, 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)

ParameterTypeRequiredDescription
eventTypestringRequiredType of event. Example: paywall_shown
paywallIdintegerRequiredFrom Get Paywall response (data.id). Required for correct analytics attribution.
placementIdstringRequiredSame placement ID used to fetch the paywall
isExperimentbooleanRequiredMust match data.isExperiment from Get Paywall. Determines experiment vs. control attribution.
aiPricingModelIdintegerRequiredMust match data.aiPricingModelId from Get Paywall. Ties the event to the specific AI model for training.
profileIdstringOptionalProvide profileId or customerUserId
customerUserIdstringRecommendedYour 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

200Event tracked

A successful request will return a confirmation response.

{
  "ok": true
}

Try It Out

https://app.botsi.com/api/v1/web-api
Response
Click "Send API Request" to see the response here.