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

# Create Events



## OpenAPI

````yaml /api-reference/openapi/storefront.json post /create-events
openapi: 3.1.0
info:
  title: Depict Platform API
  version: '1.0'
  description: >-
    The Depict platform API at api.depict.ai: storefront-facing search,
    listings, recommendations and event tracking for headless integrations. Not
    to be confused with the storefront search API (runway.depict.ai) used by the
    Search by Depict Shopify app.
servers:
  - url: https://api.depict.ai
security: []
paths:
  /create-events:
    post:
      tags:
        - Events
        - V2
      summary: Create Events
      operationId: create_events_create_events_post
      parameters:
        - name: referer
          in: header
          required: false
          schema:
            type: string
            title: Referer
        - name: user-agent
          in: header
          required: false
          schema:
            type: string
            title: User-Agent
        - name: x-forwarded-for
          in: header
          required: false
          schema:
            type: string
            title: X-Forwarded-For
        - name: x-forwarded-host
          in: header
          required: false
          schema:
            type: string
            title: X-Forwarded-Host
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Event'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Event:
      properties:
        tenant:
          type: string
          title: Tenant
        market:
          type: string
          title: Market
        deduplication_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Deduplication Id
        type:
          $ref: '#/components/schemas/EEventType'
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        dsid:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Dsid
        ab_test_group:
          anyOf:
            - type: string
            - type: 'null'
          title: Ab Test Group
        product_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Id
        variant_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Variant Ids
        entity_identifiers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Entity Identifiers
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        entity_price:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Price
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        document_referrer:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Referrer
        document_width:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Width
        attribution_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Attribution Id
        recommendation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Recommendation Id
        search_result_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Result Id
        product_listing_result_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Product Listing Result Id
        click_location:
          anyOf:
            - type: string
            - type: 'null'
          title: Click Location
        page_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Url
        recommendation_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Recommendation Type
        collection_handle:
          anyOf:
            - type: string
            - type: 'null'
          title: Collection Handle
        shopify_collection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Shopify Collection Id
        grid_item_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Grid Item Id
        grid_item_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Grid Item Link
        depict_ab_variant:
          anyOf:
            - type: string
            - type: 'null'
          title: Depict Ab Variant
      type: object
      required:
        - tenant
        - market
        - type
      title: Event
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EEventType:
      type: string
      enum:
        - page_view
        - click
        - add_to_cart
        - purchase
        - element_visible
        - ws_click
        - recommendations_inserted
        - native_shopify_collection_click
        - native_shopify_collection_view
        - native_shopify_grid_item_click
        - shopify_search_item_click
        - shopify_search_add_to_cart
        - shopify_search_purchase
      title: EEventType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````