Skip to main content

Events API

Use the Events API to send custom events to Syft from your own servers, for example when a user installs your app or upgrades their plan. Custom events can provide valuable insights into user intent.

Server-side only

The Events API uses your server secret key. Call it from your server, and never put this key in browser code. To send custom events from the browser, use the tag's syft.track() method instead.

Authentication​

Pass your server secret key in the Authorization header:

Authorization: Bearer sk_live_...

Endpoint​

POST https://e2.sy-d.io/log

Parameters​

ParameterTypeRequiredDescription
event_namestringYesThe name of the custom event, for example app-installed
email, first_name, last_name, company, titlestringNoInformation about the person, if available

Example​

curl -X POST https://e2.sy-d.io/log \
-H "Authorization: Bearer sk_live_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_name": "app-installed",
"email": "john@acme.com"
}'

Show custom events in the app​

Syft accepts any event name you send, but a custom event only appears on a visitor's timeline, and counts toward intent, once you create a signal for it. Until then the event is received and stored, but not displayed. If you send an event with an email, the visitor shows up as identified (for example, "Identified by Login") without the event itself being listed.

To make a custom event visible:

  1. In the Syft app, open Signals and create a new signal.
  2. Choose the Others tab, which is for custom events.
  3. Under Activity names, enter the event name exactly as you send it, for example app-installed. Add one entry per event name.
  4. Set the signal's weight and save.

Sessions that include the event will then show it on the visitor's timeline, and the signal counts toward the account's intent. Signals can also trigger motions. Syft re-evaluates existing data automatically when you save a signal, so events you already sent appear as well. See Backfill for details.

note

Enter each event name exactly as you send it, and create one signal entry per event name. Syft does not list the event names it has received, so you need to know the names in advance.