Take a batch of events
https://api.torvathmail.com/v1/eventsEvents must be turned on under Admin → API → Events first. How the queue works is in Events queue; the fields of each event type are in Webhooks.
Returns up to limit events, oldest first, and hides them for 60 seconds. Acknowledge each one you handled with its receipt; the rest come back. With wait, the request waits up to that many seconds for events to arrive.
Query parameters
waitintegeroptional0 to 20default 0limitintegeroptional1 to 100default 50typesstringoptionalComma-separated event types; others are left for other consumers.
Response
eventsarray of objectsrequiredFields inside events
idstringrequiredtypestringrequiredOne of
email.sentemail.deliveredemail.bouncedemail.complainedemail.failedemail.openedemail.clickedcreatedAtintegerrequiredemailIdstringrequiredrecipientstringrequiredmetadataobjectrequiredstring valuesattemptintegerrequiredHow many times this event has been fetched
receiptstringrequiredAcknowledge with this
categorystringoptionalemail.bounced, email.failed
reasonstringoptionalemail.bounced, email.failed
titlestringoptionalsmtpCodeinteger or nulloptionalstatusstring or nulloptionaldiagnosticstring or nulloptionalfeedbackTypestring or nulloptionalemail.complained
machinebooleanoptionalemail.opened, email.clicked: likely a machine, not a person
urlstringoptionalemail.clicked
Status codes
200A batch (empty when none arrived)401No API key, or it isn't valid or was revoked.unauthorized403The key or plan doesn't allow this.forbiddenapi_offneeds_business409Your organisation's settings or state stop it.events_offdomain_blockedstorage_fullorg_inactive
Refusals share one shape. See errors.