Reporting Valid Users
As an advertiser, one of your primary concerns is the conversion rate of your ads, which refers to the proportion of users completing a conversion.
We recommend reporting Conversion events to effectively optimize your ad conversion rate.
Conversion Event Reporting API
Request Method
POST https://app.ton.ai/api/v2/openapi/ad/event/report/conversion
Request Parameters
Parameter | Location | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | Yes | How to Get APP Key |
The request body should be in JSON format and include the following fields:
Field Name | Type | Required | Description |
---|---|---|---|
eventType | string | Yes | Event type, fixed value as "conversion" |
eventData | object | Yes | Event data, includes the following fields |
The eventData object includes the following field:
Field Name | Type | Required | Description |
---|---|---|---|
telegramUserId | string | Yes | The unique Telegram ID of the user |
Complete Request Example
Initiate the request:
curl --request POST \
--url https://staging.ton.ai/api/v2/openapi/ad/event/report/conversion \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY_HERE' \
--data '
{
"eventType": "conversion",
"eventData": {
"telegramUserId": "1728125519"
}
}
'
A successful response will return a status of successfully uploaded, with a status code of 200. The response format is as follows:
{
"status": "success"
}
Important Notes
- Ensure this API is called only when a user has genuinely completed a conversion action.
- In case of network issues leading to a failed report, you may retry within a short time frame, but avoid excessive retries.
- The telegramUserId should be the user's unique Telegram ID; do not use any other identifiers.