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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
event_name | string | Yes | The name of the custom event, for example app-installed |
email, first_name, last_name, company, title | string | No | Information 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:
- In the Syft app, open Signals and create a new signal.
- Choose the Others tab, which is for custom events.
- Under Activity names, enter the event name exactly as you send it, for example
app-installed. Add one entry per event name. - 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.
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.