v24

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-014382230.2 KB

Import custom events

Imports multiple custom events in a single batch operation. Maximum 50 events per request. Auto-creates contacts if they don't exist.

post/api/customEvents.import

Request body

workspace_idstring required

The ID of the workspace

Example request

{
  "workspace_id": "ws_1234567890",
  "events": [
    {
      "event_name": "orders/fulfilled",
      "external_id": "shopify_order_12345",
      "email": "customer@example.com",
      "properties": {
        "order_total": 129.99,
        "product_name": "Premium Subscription"
      },
      "occurred_at": "2023-05-15T14:30:00Z"
    },
    {
      "event_name": "payment/succeeded",
      "external_id": "stripe_payment_67890",
      "email": "customer@example.com",
      "properties": {
        "amount": 129.99,
        "currency": "USD"
      },
      "occurred_at": "2023-05-15T14:29:00Z"
    }
  ]
}

Response

Custom events imported successfully

event_idsstring[]

External IDs of successfully imported events

countinteger

Number of events created

Example response

{
  "event_ids": [
    "shopify_order_12345",
    "stripe_payment_67890"
  ],
  "count": 2
}