Events

Send custom contact events such as trial.started from your app to trigger sequences, resume waiting steps and filter segments, with idempotency keys.

A custom event records something a contact did in your product: user.signed_up, trial.started, order:paid. Events start sequences, wake wait_for_event steps, and feed event conditions in segments.

Not email events

These are your app's events about contacts. Delivery events (delivered, bounced, opened…) are read at GET /events and GET /emails/:id/events; see Webhooks.

Track an event

curl https://api.stamp0.com/events \
  -H "Authorization: Bearer $STAMP0_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: trial-started-usr_123" \
  -d '{
    "name": "trial.started",
    "email": "maya@northwind.dev",
    "properties": { "plan": "pro", "trial_end": "2026-11-03" }
  }'

It answers 202 with the event id, the contact_id and created.

  • Name the contact with contact_id or email, not both. An unknown address creates the contact (it counts toward the plan's contact limit); set create_contact: false to refuse instead.
  • name uses letters, digits, spaces and _ . : / -, up to 128 characters. Resend's event field works as an alias.
  • properties (or Resend's payload) is a JSON object of up to 50 keys and 32 KiB. A sequence the event starts can use them as template variables.
  • occurred_at (ISO 8601) backdates the event; it defaults to now.
  • An idempotency_key in the body or an Idempotency-Key header makes a retry return the first event with created: false. The key names one event: reusing it for a different event (another name, contact or properties) answers 409 invalid_idempotent_request instead of dropping it.

POST /events/batch records up to 100 events at once, all or none. POST /events/send is Resend's Send Event: the same body, answering Resend's { object, event } plus the id.

Read events

  • GET /contacts/:id/events: one contact's events, newest first; filter by name or since.
  • GET /events/custom: every custom event of the project, with the same filters plus contact_id.

Events also appear in the contact's activity timeline (GET /contacts/:id/activity).

Reference: Contact events.

On this page