Custom Events

Import custom events

POST https://demo.notifuse.com/api/customEvents.import

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

Authorizations

Authorization string header required

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Body application/json

workspace_id string required

The ID of the workspace

Example ws_1234567890
events object[] required

Array of custom events to import (1-50 events)

Max items 50
Show 11 child attributes Hide 11 child attributes
event_name string required

Event type name

Max length 100 Example orders/fulfilled
external_id string required

External system identifier

Max length 255 Example shopify_order_12345
email string<email> required

Contact email address

Example customer@example.com
properties object

The complete state of the resource. Omit the field to leave the stored properties untouched; send an empty object to clear them all. Including it replaces the stored set rather than merging into it, so restate every property you want kept.

occurred_at string<date-time>

When this version of the resource was produced. On an entry naming an existing resource it is also the ordering guard: unless deleted_at also changes, an entry whose occurred_at is not strictly newer than the stored one is discarded in full and still counted as imported. Defaults to the time of the request.

Example 2023-05-15T14:30:00Z
source string

Origin to record, defaulting to 'api' when the entry omits it. It applies only where the entry creates the resource: an entry naming one that already exists leaves the stored origin alone, so re-importing cannot relabel a resource an integration created.

Options api, integration, import Example api
integration_id string

Integration reference. Preserved when the entry omits it, so re-importing does not unlink a resource from the integration that owns it.

Example shopify_integration_123
goal_type string

Type of goal for conversion tracking. Kept when the entry omits it; once set it can be changed but not cleared.

Options purchase, subscription, lead, signup, booking, trial, other Example purchase
goal_name string

Optional goal name for categorization. Kept when the entry omits it; once set it can be changed but not cleared.

Max length 100 Example first_purchase
goal_value number<double>

Monetary value (required for purchase/subscription, can be negative for refunds). Kept when the entry omits it; once set it can be changed but not cleared.

Example 99.99
deleted_at string<date-time>

Soft delete timestamp

Response

201 Custom events imported successfully object
event_ids string[]

External IDs of successfully imported events

count integer

Number of events created

Example 2
400 Bad request - validation failed object
error string required

Error message

401 Unauthorized - invalid or missing authentication token object
error string required

Error message

403 Forbidden - missing required permission object
error string required

Error message

500 Internal server error object
error string required

Error message