OpenAPI 3.1.02026-08-143874115.7 MB

a84d4905fdbb

Events

Create Event

Tracks a conversion or engagement event for an account.

post/events

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

account_idstring required

The account to associate with this event.

action_source'email' | 'website' | 'app' | 'phone_call' | 'chat' | 'physical_store' | 'system_generated' | 'business_messaging' | 'other' nullable

The channel where an event originated

currency'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' | 'kzt' | 'awg' | 'whop_usd' | 'xau' nullable

The available currencies on the platform

custom_namestring nullable

Custom event name when event_name is 'custom'. Maximum 35 chars for this value.

durationinteger nullable

For 'leave' events: milliseconds the visitor spent on the page.

event_idstring nullable

Client-provided identifier for deduplication. Generated if omitted.

event_namestring required

The type of event.

Use a standard event (lead, submit_application, contact, complete_registration, schedule, view_content, add_to_cart) or pass your own name directly for a custom event.

event_timestring date-time nullable

When the event occurred. Defaults to now.

plan_idstring nullable

The plan associated with the event.

product_idstring nullable

The product associated with the event.

referrer_urlstring nullable

The referring URL.

resumedboolean nullable

For 'page' events: true when the page was restored from the back/forward cache.

sourcestring nullable

For 'identify' events: where the identity was captured (url, form, manual, iframe).

titlestring nullable

For 'page' events: the document title.

urlstring nullable

The URL where the event occurred.

valuenumber nullable

Monetary value associated with the event.

Example request

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "action_source": "website",
  "context": {
    "ad_campaign_id": "23851234567890123",
    "ad_id": "23851234567890125",
    "ad_set_id": "23851234567890124",
    "fbc": "fb.1.xxxxxxxxxx.IwAR0shine",
    "fbclid": "IwAR0shineTimeAutoDetailing",
    "fbp": "fb.1.xxxxxxxxxx.xxxxxxxxxx",
    "fingerprint": "fp_4d19c7",
    "fingerprint_confidence": 6.9,
    "ga": "GA1.1.xxxxxxxxxx.xxxxxxxxxx",
    "gbraid": "0AAAAA-shinetime",
    "gclid": "Cj0KCQiAshinetime",
    "ig_sid": "ig_shinetime_1",
    "ip_address": "1.2.3.4",
    "language": "en-US",
    "li_fat_id": "lifat-shinetime",
    "msclkid": "a1b2c3d4shine",
    "rdt_cid": "t2_shinetime",
    "sccid": "sccid-shinetime",
    "screen_resolution": "390x844",
    "timezone": "America/Chicago",
    "ttclid": "E.C.P.ttclid.shine",
    "ttp": "2ShineTimeTtp",
    "twclid": "twclid-shinetime",
    "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15",
    "utm_campaign": "ceramic-coating-spring",
    "utm_content": "carousel-a",
    "utm_id": "utm_88213",
    "utm_medium": "cpc",
    "utm_source": "google",
    "utm_term": "ceramic coating austin",
    "wbraid": "Cj0KCQjw-wbraid-shine"
  },
  "currency": "usd",
  "custom_name": "coating_deposit_paid",
  "duration": 42,
  "event_id": "evnt_xxxxxxxxxxxxx",
  "event_name": "coating_deposit_paid",
  "event_time": "2023-12-01T05:00:00.401Z",
  "plan_id": "plan_xxxxxxxxxxxxx",
  "product_id": "prod_xxxxxxxxxxxxx",
  "referrer_url": "https://www.google.com/",
  "source": "website",
  "title": "Ceramic coating quote request",
  "url": "https://shinetime.example/quote",
  "user": {
    "anonymous_id": "anon_8f2c41",
    "birthdate": "1990-01-15",
    "city": "Austin",
    "country": "US",
    "email": "marcus@shinetime.example",
    "external_id": "crm_8842",
    "first_name": "Dana",
    "gender": "female",
    "last_name": "Whitfield",
    "linked_anonymous_id": "anon_1b9de0",
    "linked_wuid": "user_xxxxxxxxxxxxxx",
    "member_id": "mber_xxxxxxxxxxxxx",
    "membership_id": "mem_xxxxxxxxxxxxxx",
    "name": "Dana Whitfield",
    "phone": "+xxxxxxxxxxx",
    "postal_code": "78756",
    "state": "TX",
    "user_id": "user_xxxxxxxxxxxxx",
    "username": "danawhitfield"
  },
  "value": 6.9
}

Response

event created

idstring required

Example response

{
  "id": "evnt_xxxxxxxxxxxxxx"
}