Developers · Events API

Stream your store events straight into journeys

Create a workspace API key, POST cart and order events, drop one tracking tag on your site — and let them trigger automated email journeys with revenue attribution built in.

Built for developers

Connect your store or app in an afternoon

DialonCloud ingests the events that matter for lifecycle marketing — product views, cart adds, checkouts and orders. Send them from your backend with a single authenticated POST and they attach to the matching contact, ready to segment on and automate against.

No middleware and no nightly CSV exports. Events land in real time, abandoned-cart journeys fire on your schedule, and a single tracking tag posts conversions back so every campaign reports the revenue it actually produced.

STEP 01
Create a workspace API key

In the app, go to Settings › Integrations › Store Event API Keys and generate a secret key (sk_…). It is scoped to your workspace and shown once — keep it out of the browser.

STEP 02
POST your store events

Send batched events to the ingest endpoint as shoppers browse and buy. Events are keyed by email and attach to the matching contact, creating it if it is new.

STEP 03
Install the tracking script

Drop dct.js on your site from Settings › Integrations › Website Tracking. It stores the click id from campaign links and posts the sale back on your order page.

Send an event

One authenticated POST

curl -X POST https://dialoncloud.com/api/v1/ingest/events \
  -H 'x-api-key: sk_live_your_workspace_key' \
  -H 'content-type: application/json' \
  -d '{
    "events": [
      {
        "event": "started_checkout",
        "email": "[email protected]",
        "external_id": "chk_10482",
        "occurred_at": "2026-01-14T09:22:11Z",
        "properties": {
          "cart_total": 89.00,
          "items": [{ "name": "Trail Runner", "qty": 1 }]
        }
      }
    ]
  }'

# → { "accepted": 1, "duplicates": 0, "errors": [] }

Batch as many events as you like in a single call. Authentication is a workspace secret key in the x-api-key header — send it from your server, never the browser.

Fields. event and email are required — the email resolves to an existing contact or creates one. Optional: occurred_at (defaults to now), external_id, source and a free-form properties object you can merge into the email.

Retries are safe. Reuse the same external_id and a redelivery is counted as a duplicate instead of a second event. One bad event never fails the batch — it comes back in errors while the rest are accepted.
Supported events

The four events lifecycle marketing runs on

The event name is a free-form string — send whatever your store emits. These four are the names the built-in journey templates trigger on, so use them if you want the ready-made recipes to fire without configuration.

viewed_product

A shopper opened a product page.

added_to_cart

An item was added to the cart.

started_checkout

Checkout began — the cart-abandonment trigger.

placed_order

The order completed; stops cart journeys.

Abandoned cart is derived, not sent: a contact with started_checkout and no placed_order inside your chosen window enters the recovery journey — and the order event stops it.
Attribution

Website tracking & conversions

Two tags and every sale reports back against the campaign that earned it. Works on any stack — Shopify, WordPress, Laravel, a static site — with no build step. Copy-paste versions of both snippets live in the app under Settings › Integrations › Website Tracking.

1. Add the script site-wide

Put it on every page, not just checkout — the click id is captured wherever the shopper lands, which is rarely the order page.

<!-- Every page of your site, not just checkout -->
<script src="https://dialoncloud.com/dct.js"
        data-endpoint="https://dialoncloud.com/api/v1/track/conversion" async></script>
2. Record the sale on your order page

Fire once with the real order values. orderId de-duplicates, so a refreshed thank-you page never double-counts revenue.

<!-- Once on your order / thank-you page -->
<script>
  dct.conversion({
    orderId: 'ORDER_ID',   // your unique order id (de-duplicates)
    revenue: 49.90,        // order total
    currency: 'USD'
  });
</script>
How the click id works. Every link in a tracked campaign carries a signed click id (dc_cid). On landing, the script stores it in a first-party cookie (_dc_cid) on a 60-day last-touch window, falling back to utm_content if the parameter was renamed. When you call dct.conversion(), that id is posted back and the revenue is attributed to the exact campaign and step. No API key is involved — the signed id identifies the recipient on its own, which is why the script is safe to ship in the browser.
Turn link tracking on first. The click id is only added to links when Link tracking & UTMs is enabled for that campaign — the cog in campaign settings, also flagged on the Review step. With it off there is no dc_cid to store and conversions will not attribute, even with the script installed correctly. UTM parameter names are yours to choose; the click id is appended alongside them.
No JavaScript on your order page?

Post the conversion from your server instead. The same endpoint accepts GET or POST, and takes the click id directly.

POST https://dialoncloud.com/api/v1/track/conversion
{ "cid": "<dc_cid from the landing URL>",
  "orderId": "ORDER_ID", "revenue": 49.90, "currency": "USD" }

Developer FAQs

What can I do with the DialonCloud API?+
You can stream store and app events — product views, cart adds, checkouts and orders — into DialonCloud. They attach to the matching contact, feed your segments, and can trigger automated email journeys such as abandoned-cart recovery.
How do I get an API key?+
In the app, open Settings › Integrations › Store Event API Keys and create a key. The secret (sk_…) is displayed once, so copy it then. It authenticates server-side calls to the ingest endpoint — send it only from your backend, never from the browser.
How does abandoned-cart detection work?+
Send a started_checkout event when checkout begins and a placed_order event when it completes. A contact with started_checkout and no placed_order within your chosen window enters the abandoned-cart journey; the order event stops the flow.
Which events can I send?+
The event name is a free-form string, so you can send whatever your store emits. The four names the built-in journey templates trigger on are viewed_product, added_to_cart, started_checkout and placed_order — use those if you want the ready-made recipes to work out of the box. Every event carries the contact email plus a free-form properties object you can merge into the email.
Do I need the tracking script?+
Only for on-site conversions and revenue. Opens and clicks are tracked from the email itself and need nothing on your website. To report order value back against a campaign, install dct.js and call dct.conversion() on your order page — or post to the conversion endpoint from your server.
Why is my conversion not being attributed?+
Four usual causes: Link tracking & UTMs is off for that campaign, so no click id was ever added to the links; the script is not on the landing page the shopper arrived at (it must be site-wide, not checkout-only); the visit is older than the 60-day last-touch window; or the orderId was already recorded, so the repeat was de-duplicated.
Does the API cost extra?+
No. Event ingestion, website tracking, conversion attribution and UTM tagging are included on every plan — you are billed on email volume, not API calls. See Pricing for the current tiers.

Wire up your first event today

Create a key, POST a checkout event, and watch an abandoned-cart journey fire.