Skip to main content
Data direction: This is a destination — Upstack sends event and conversion data out to this platform via server-side APIs.

How do I send Upstack events to my webhook URL?

  1. In Upstack, click Destinations in the sidebar.
  2. Under Available destinations, find Webhook and click Connect.
  3. In Webhook URL, paste your endpoint. It must start with https://.
  4. Optional: in Signing Secret, enter a secret. Upstack then signs every request. See How do I check that a request came from Upstack?
  5. Click Create Destination.

Which URLs can I use?

A public address that starts with https:// and answers without a redirect.

Which events does Upstack send?

These events are sent by default, under their Upstack names:

How do I send an event that is not on the list?

Add a custom trigger. Upstack sends it with the event name you choose.
  1. In Upstack, click Destinations, then click your webhook destination.
  2. Click the Event Mappings tab.
  3. Click Add Custom Trigger.
  4. Fill in Display name, Base event, and Destination event name. Your endpoint receives the Destination event name as eventName.
  5. Click Save custom event.
  6. Click Save Changes.
Full walkthrough: Destination event mappings

What does each request look like?

Each event is one POST with a JSON body. Example body for a purchase:
Every field is listed in Which fields can a request contain?.

Which fields can a request contain?

Only these fields. A field with no value is left out, so every field below can be missing. user_data and data are always sent, even when empty. Top level user_data When Upstack has no email, phone or address for the visitor, user_data holds externalId only. user_data.location data: value and orders data.items data: accounts, plans and subscriptions Sent on account, trial, subscription, payment and invoice events.

How do I check that a request came from Upstack?

Recompute the signature with your Signing Secret and compare it with X-Upstack-Signature.
  1. Read the raw request body before you parse the JSON.
  2. Join the X-Upstack-Timestamp value, a dot, and the raw body.
  3. Compute an HMAC-SHA256 of that text with your signing secret, as hex.
  4. Put sha256= in front and compare it with X-Upstack-Signature. If they differ, reject the request.
  5. To block replayed requests, also reject a timestamp more than 5 minutes old. Every retry gets a new timestamp and signature.
Example in Node.js:

What happens when my endpoint returns an error?

Upstack tries the event up to 3 more times, about a minute apart, then drops it.

Why did I get the same event twice?

Upstack sent it again after a failed try. A retry resends every request for that event, including ones your endpoint already accepted. Use id to drop events you have already processed.