curl --request POST \
--url https://api.whop.com/api/v1/conversions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": "biz_xxxxxxxxxxxxxx",
"event_name": "lead",
"action_source": "email",
"context": {
"fbclid": "<string>",
"fbp": "<string>",
"ga": "<string>",
"gclid": "<string>",
"ig_sid": "<string>",
"ttclid": "<string>",
"ttp": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"ad_campaign_id": "<string>",
"ad_id": "<string>",
"ad_set_id": "<string>",
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_id": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>"
},
"currency": "usd",
"custom_name": "<string>",
"event_id": "evnt_xxxxxxxxxxxxx",
"event_time": "2023-12-01T05:00:00.401Z",
"plan_id": "plan_xxxxxxxxxxxxx",
"product_id": "prod_xxxxxxxxxxxxx",
"referrer_url": "<string>",
"url": "<string>",
"user": {
"anonymous_id": "<string>",
"external_id": "<string>",
"member_id": "mber_xxxxxxxxxxxxx",
"membership_id": "mem_xxxxxxxxxxxxxx",
"user_id": "user_xxxxxxxxxxxxx",
"birthdate": "1990-01-15",
"city": "<string>",
"country": "<string>",
"email": "<string>",
"first_name": "<string>",
"gender": "male",
"last_name": "<string>",
"name": "<string>",
"phone": "<string>",
"postal_code": "<string>",
"state": "<string>",
"username": "<string>"
},
"value": 6.9
}
'{
"id": "<string>"
}Track a conversion or engagement event for a company.
Required permissions:
event:createcurl --request POST \
--url https://api.whop.com/api/v1/conversions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": "biz_xxxxxxxxxxxxxx",
"event_name": "lead",
"action_source": "email",
"context": {
"fbclid": "<string>",
"fbp": "<string>",
"ga": "<string>",
"gclid": "<string>",
"ig_sid": "<string>",
"ttclid": "<string>",
"ttp": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"ad_campaign_id": "<string>",
"ad_id": "<string>",
"ad_set_id": "<string>",
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_id": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>"
},
"currency": "usd",
"custom_name": "<string>",
"event_id": "evnt_xxxxxxxxxxxxx",
"event_time": "2023-12-01T05:00:00.401Z",
"plan_id": "plan_xxxxxxxxxxxxx",
"product_id": "prod_xxxxxxxxxxxxx",
"referrer_url": "<string>",
"url": "<string>",
"user": {
"anonymous_id": "<string>",
"external_id": "<string>",
"member_id": "mber_xxxxxxxxxxxxx",
"membership_id": "mem_xxxxxxxxxxxxxx",
"user_id": "user_xxxxxxxxxxxxx",
"birthdate": "1990-01-15",
"city": "<string>",
"country": "<string>",
"email": "<string>",
"first_name": "<string>",
"gender": "male",
"last_name": "<string>",
"name": "<string>",
"phone": "<string>",
"postal_code": "<string>",
"state": "<string>",
"username": "<string>"
},
"value": 6.9
}
'{
"id": "<string>"
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Parameters for CreateConversion
The company to associate with this event.
"biz_xxxxxxxxxxxxxx"
The type of event.
lead, submit_application, contact, complete_registration, schedule, custom Where the event originated.
email, website, app, phone_call, chat, physical_store, system_generated, business_messaging, other Tracking and attribution context.
Show child attributes
ISO 4217 currency code.
usd, sgd, inr, aud, brl, cad, dkk, eur, nok, gbp, sek, chf, hkd, huf, jpy, mxn, myr, pln, czk, nzd, aed, eth, ape, cop, ron, thb, bgn, idr, dop, php, try, krw, twd, vnd, pkr, clp, uyu, ars, zar, dzd, tnd, mad, kes, kwd, jod, all, xcd, amd, bsd, bhd, bob, bam, khr, crc, xof, egp, etb, gmd, ghs, gtq, gyd, ils, jmd, mop, mga, mur, mdl, mnt, nad, ngn, mkd, omr, pyg, pen, qar, rwf, sar, rsd, lkr, tzs, ttd, uzs, rub, btc, cny, usdt Custom event name when event_name is 'custom'.
Client-provided identifier for deduplication. Generated if omitted.
"evnt_xxxxxxxxxxxxx"
When the event occurred. Defaults to now.
"2023-12-01T05:00:00.401Z"
The plan associated with the event.
"plan_xxxxxxxxxxxxx"
The product associated with the event.
"prod_xxxxxxxxxxxxx"
The referring URL.
The URL where the event occurred.
User identity and profile data.
Show child attributes
Monetary value associated with the event.
6.9
A successful response
A tracked conversion event
The unique identifier for the conversion
Was this page helpful?