Track Your First Custom Event
Custom events allow you to record specific actions your contacts take — like abandoning a cart or making a purchase — and associate those actions with additional metadata. This guide walks you through sending your first custom event using the SendX REST API.1. Prerequisites
Before you begin:- Create a SendX account
- Create a contact (events must be associated with a contact)
- Get your Team API Key from
Settings → API & Webhooks → Team API Key
Your API Key is required for authentication. Keep it private and secure.
2. Push a Custom Event
Use the/events/custom
endpoint to track a user action with optional metadata.
What This Does
This request records an event namedabandoned_cart
for the contact john.doe@example.com
, along with additional metadata:
- price: 29.99
- currency: USD
- item_count: 3
- time: 1669990400 (optional - if omitted, server will use current time)
Custom Events API
Learn more about how to track custom events with additional data.
3. Next Steps
Once you’ve recorded events, you can:- Segment contacts based on event properties
- Trigger automations using event names
- Analyze custom events in your dashboard
- Explore the full API Reference to see what’s possible.