Send an event
https://api.smsedge.com/v2/email/eventsTells SMSEdge that something happened to a person, so an automatic email (a trigger) can start.
Use events for emails that follow something in your app, such as a signup, a paid order or a cart left without checkout. The email can wait first and check conditions, and you can change it without changing your code.
- Make an API campaign with the template (see Send an email).
- On that campaign, add a trigger: When = API event (from your backend), Event name = the name you send here, for example
order_paid. Set the wait and the follow-up. - Call this endpoint when the event happens. The values in
datafill{{{data.key}}}in the template.
- Triggers check for new events every minute.
- Each event is acted on once. The same person can get the email again with a new event.
- Send an
event_idto make a retry safe: the same ID is acted on once. Send the same body with the same ID. - Unsubscribed, blacklisted and bounced addresses are skipped.
- An event that no trigger listens to is kept for 90 days.
Body params (JSON)
eventstringrequiredEvent name (letters, digits, _ . : -, maximum 64). It must be the same as the trigger's event name.
emailstringrequiredEmail address of the person.
datastringoptionalJSON object of key: value for {{{data.key}}} in the template. Same rules as in Send an email.
event_idstringoptionalYour ID for this event (letters, digits, _ . : -, maximum 128). Without it, every call is a new event.
Responses
- 202The event is stored. triggers = the active triggers that listen to this event name.
- 422A parameter is missing or not valid.
- 403Triggers are not turned on for your account. Ask your account manager.
curl -X POST "https://api.smsedge.com/v2/email/events" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"event":"order_paid","email":"ann@example.com"}'{
"success": true,
"data": {
"event": "order_paid",
"event_id": "order-A-17-paid",
"email": "ann@example.com",
"received_at": "2026-11-30 10:15:02",
"triggers": 1
},
"errors": [],
"response": {
"code": 202,
"description": "Accepted",
"date": "2026-11-30 10:15:02"
}
}All requests need your API key in the X-API-KEY header. See Authentication.