v1

latestOpenAPI 3.1.02026-07-134488210.8 KB
Custom Events

Create custom event

Create a custom event to trigger flows with merchant-defined event names and properties.

Custom events allow merchants to trigger flows based on events from their own systems. Events can include custom properties that are accessible in email and SMS templates, and are persisted for segmentation and historical queries.

Identity Resolution

The API resolves customers using the following priority order:

  1. customer.id — Redo customer ObjectId (highest priority)
  2. customer.email — customer email address
  3. customer.phoneNumber — customer phone number

At least one identifier must be provided. If no matching customer is found, one will be created automatically. If customer.id is provided but not found, the API falls back to email/phone rather than returning 404.

Datetime Formatting

All datetime values must be formatted as ISO 8601 (RFC 3339) strings, e.g., 2026-04-02T12:00:00Z. This applies to eventTimestamp, any date-valued properties in data, and any date-valued customFields. Strings matching this format are automatically detected and indexed as dates for segmentation.

Rate Limiting

This endpoint is rate-limited to 100 requests per second per store.

Requires the customer_events_write scope.

post/stores/{storeId}/events

Path parameters

storeIdstring required
Example:64e5a8a1af49a89df37e4ee7

Store ID

Request body

eventNamestring required

The name of the custom event (e.g., 'User Registered', 'Loyalty Reward Earned').

eventTimestampstring date-time

ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.

valuenumber

Monetary or conversion value associated with the event (e.g., purchase amount).

valueCurrencystring

ISO 4217 currency code for the value field (e.g., "USD", "EUR").

uniqueIdstring

Merchant-controlled deduplication key (1-255 characters). If provided, subsequent events with the same uniqueId for the same store are silently deduplicated. Use this for safe retries and at-least-once delivery patterns.

Response

Event accepted and queued for processing. No response body is returned.