> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Event

> Tracks a conversion or engagement event for a company.



## OpenAPI

````yaml /openapi/api-v1-native.yml post /events
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema
    at build time.
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.whop.com/api/v1
security: []
paths:
  /events:
    post:
      tags:
        - Events
      summary: Create Event
      description: Tracks a conversion or engagement event for a company.
      operationId: createEvent
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action_source:
                  oneOf:
                    - type: string
                      enum:
                        - email
                        - website
                        - app
                        - phone_call
                        - chat
                        - physical_store
                        - system_generated
                        - business_messaging
                        - other
                      description: The channel where an event originated
                    - type: 'null'
                  description: Where the event originated.
                company_id:
                  type: string
                  description: The company to associate with this event.
                  example: biz_xxxxxxxxxxxxxx
                context:
                  type:
                    - object
                    - 'null'
                  properties:
                    fbc:
                      type:
                        - string
                        - 'null'
                      description: >-
                        Facebook click cookie (_fbc, format
                        fb.1.{timestamp}.{fbclid}).
                    fbclid:
                      type:
                        - string
                        - 'null'
                      description: Facebook click ID.
                    fbp:
                      type:
                        - string
                        - 'null'
                      description: Facebook browser pixel ID.
                    ga:
                      type:
                        - string
                        - 'null'
                      description: Google Analytics client ID.
                    gbraid:
                      type:
                        - string
                        - 'null'
                      description: Google Ads gbraid click ID (iOS privacy).
                    gclid:
                      type:
                        - string
                        - 'null'
                      description: Google click ID.
                    ig_sid:
                      type:
                        - string
                        - 'null'
                      description: Instagram session ID.
                    li_fat_id:
                      type:
                        - string
                        - 'null'
                      description: LinkedIn click ID.
                    msclkid:
                      type:
                        - string
                        - 'null'
                      description: Microsoft Advertising (Bing) click ID.
                    rdt_cid:
                      type:
                        - string
                        - 'null'
                      description: Reddit click ID.
                    sccid:
                      type:
                        - string
                        - 'null'
                      description: Snapchat click ID.
                    ttclid:
                      type:
                        - string
                        - 'null'
                      description: TikTok click ID.
                    ttp:
                      type:
                        - string
                        - 'null'
                      description: TikTok pixel ID.
                    twclid:
                      type:
                        - string
                        - 'null'
                      description: X (Twitter) click ID.
                    wbraid:
                      type:
                        - string
                        - 'null'
                      description: Google Ads wbraid click ID (iOS privacy).
                    ip_address:
                      type:
                        - string
                        - 'null'
                      description: IP address.
                    user_agent:
                      type:
                        - string
                        - 'null'
                      description: Browser user agent string.
                    fingerprint:
                      type:
                        - string
                        - 'null'
                      description: Client-side device fingerprint.
                    fingerprint_confidence:
                      type:
                        - number
                        - 'null'
                      description: Confidence score (0-1) for the device fingerprint.
                      example: 6.9
                    language:
                      type:
                        - string
                        - 'null'
                      description: Browser language (e.g. en-US).
                    screen_resolution:
                      type:
                        - string
                        - 'null'
                      description: Screen resolution (e.g. 1920x1080).
                    timezone:
                      type:
                        - string
                        - 'null'
                      description: IANA timezone (e.g. America/New_York).
                    ad_campaign_id:
                      type:
                        - string
                        - 'null'
                      description: Ad campaign ID.
                    ad_id:
                      type:
                        - string
                        - 'null'
                      description: Ad ID.
                    ad_set_id:
                      type:
                        - string
                        - 'null'
                      description: Ad set ID.
                    utm_campaign:
                      type:
                        - string
                        - 'null'
                      description: UTM campaign parameter.
                    utm_content:
                      type:
                        - string
                        - 'null'
                      description: UTM content parameter.
                    utm_id:
                      type:
                        - string
                        - 'null'
                      description: UTM ID parameter.
                    utm_medium:
                      type:
                        - string
                        - 'null'
                      description: UTM medium parameter.
                    utm_source:
                      type:
                        - string
                        - 'null'
                      description: UTM source parameter.
                    utm_term:
                      type:
                        - string
                        - 'null'
                      description: UTM term parameter.
                  required: []
                  description: Tracking and attribution context.
                currency:
                  oneOf:
                    - type: string
                      enum:
                        - 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
                      description: The available currencies on the platform
                    - type: 'null'
                  description: ISO 4217 currency code.
                custom_name:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Custom event name when event_name is 'custom'. Maximum 35
                    chars for this value.
                duration:
                  type:
                    - integer
                    - 'null'
                  description: >-
                    For 'leave' events: milliseconds the visitor spent on the
                    page.
                  example: 42
                event_id:
                  type:
                    - string
                    - 'null'
                  description: >-
                    Client-provided identifier for deduplication. Generated if
                    omitted.
                  example: evnt_xxxxxxxxxxxxx
                event_name:
                  type: string
                  enum:
                    - lead
                    - submit_application
                    - contact
                    - complete_registration
                    - schedule
                    - view_content
                    - add_to_cart
                    - custom
                    - page
                  description: The type of conversion or engagement event
                event_time:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When the event occurred. Defaults to now.
                  example: '2023-12-01T05:00:00.401Z'
                plan_id:
                  type:
                    - string
                    - 'null'
                  description: The plan associated with the event.
                  example: plan_xxxxxxxxxxxxx
                product_id:
                  type:
                    - string
                    - 'null'
                  description: The product associated with the event.
                  example: prod_xxxxxxxxxxxxx
                referrer_url:
                  type:
                    - string
                    - 'null'
                  description: The referring URL.
                resumed:
                  type:
                    - boolean
                    - 'null'
                  description: >-
                    For 'page' events: true when the page was restored from the
                    back/forward cache.
                source:
                  type:
                    - string
                    - 'null'
                  description: >-
                    For 'identify' events: where the identity was captured (url,
                    form, manual, iframe).
                title:
                  type:
                    - string
                    - 'null'
                  description: 'For ''page'' events: the document title.'
                url:
                  type:
                    - string
                    - 'null'
                  description: The URL where the event occurred.
                user:
                  type:
                    - object
                    - 'null'
                  properties:
                    anonymous_id:
                      type:
                        - string
                        - 'null'
                      description: An anonymous identifier for the user.
                    linked_anonymous_id:
                      type:
                        - string
                        - 'null'
                      description: >-
                        A second anonymous identifier to link to this user (e.g.
                        captured across an iframe boundary).
                    linked_wuid:
                      type:
                        - string
                        - 'null'
                      description: >-
                        A wuid from a linked frame, captured across an iframe
                        boundary.
                    external_id:
                      type:
                        - string
                        - 'null'
                      description: An external identifier for the user.
                    member_id:
                      type:
                        - string
                        - 'null'
                      description: The Whop member ID.
                      example: mber_xxxxxxxxxxxxx
                    membership_id:
                      type:
                        - string
                        - 'null'
                      description: The Whop membership ID.
                      example: mem_xxxxxxxxxxxxxx
                    user_id:
                      type:
                        - string
                        - 'null'
                      description: The Whop user ID.
                      example: user_xxxxxxxxxxxxx
                    birthdate:
                      type:
                        - string
                        - 'null'
                      description: Date of birth (YYYY-MM-DD).
                      example: '1990-01-15'
                    city:
                      type:
                        - string
                        - 'null'
                      description: City.
                    country:
                      type:
                        - string
                        - 'null'
                      description: Country.
                    email:
                      type:
                        - string
                        - 'null'
                      description: Email address.
                    first_name:
                      type:
                        - string
                        - 'null'
                      description: First name.
                    gender:
                      oneOf:
                        - type: string
                          enum:
                            - male
                            - female
                          description: Gender
                        - type: 'null'
                      description: Gender.
                    last_name:
                      type:
                        - string
                        - 'null'
                      description: Last name.
                    name:
                      type:
                        - string
                        - 'null'
                      description: Full display name.
                    phone:
                      type:
                        - string
                        - 'null'
                      description: Phone number.
                    postal_code:
                      type:
                        - string
                        - 'null'
                      description: Postal code.
                    state:
                      type:
                        - string
                        - 'null'
                      description: State or region.
                    username:
                      type:
                        - string
                        - 'null'
                      description: Username.
                  required: []
                  description: User identity and profile data.
                value:
                  type:
                    - number
                    - 'null'
                  description: Monetary value associated with the event.
                  example: 6.9
              required:
                - company_id
                - event_name
              description: Parameters for CreateConversion
      responses:
        '200':
          description: event created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                required:
                  - id
      security:
        - bearerAuth:
            - event:create
        - {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        An account API key, account scoped JWT, app API key, or user OAuth
        token.

````