Skip to main content
POST
/
email
/
events
Ingest a custom event
curl --request POST \
  --url http://localhost/public/v1/email/events \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_name": "contact.saved",
  "occurred_at": "2023-12-25",
  "idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "jsmith@example.com",
  "payload": [
    "<string>"
  ]
}
'
{
  "ok": true,
  "event_id": "<string>"
}

Body

application/json

IngestEventData

event_name
enum<string>
required

Required. Name of the event. Must be one of: contact.saved, contact.unsubscribed, lead.created, sale.created

Available options:
contact.saved,
contact.unsubscribed,
lead.created,
sale.created
occurred_at
string<date> | null

Optional. Timestamp when the event occurred. Format: Y-m-d H:i:s (e.g., "2024-01-15 14:30:00")

idempotency_key
string<uuid> | null

Optional. Unique idempotency key to prevent duplicate events. Must be a valid UUID. For lead.created and sale.created events, this should strictly be the tracking_id value

email
string<email> | null

Optional. Email address associated with the event. Required if idempotency_key is not provided

payload
string[] | null

Optional. Additional payload data associated with the event. For sale.created events, it's recommended to include an "amount" key for conversion amount

Response

ok
boolean
required
event_id
string
required