What happens when API calls fail mid-trigger?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
Your automation fired. A customer did something you care about. But the API call to your ESP never made it through. The welcome sequence? Never started. The cart abandonment flow? Silently skipped. The customer has no idea, and neither do you.
This is the failure mode that stings the most, because it doesn't throw an error you'll notice. It just quietly disappears.
What actually goes wrong
There are three ways an API-triggered automation can fail mid-process. First, the trigger fires but the API call never reaches your ESP. The automation never starts and no email sends. Second, the call reaches the ESP but fails partway through. Some steps run, some don't. Your subscriber ends up in a weird state, maybe tagged but not sequenced, or sequenced but missing the first email. Third, a retry sends the same event twice, and your subscriber gets duplicate emails for a single action.
All three feel different to a subscriber. None of them show up as a visible error on your end unless you've built something to catch them.
The three things you actually need in place
Retry logic with exponential backoff. If an API call fails, your system should automatically try again. But you don't want it hammering the endpoint every second. Exponential backoff means each retry waits a bit longer than the last (5 seconds, then 30, then 2 minutes). Most modern platforms and middleware tools like Twilio or Zapier and n8n handle this natively if you configure it. Set a maximum retry count. Somewhere between 3 and 5 attempts is sensible.
Unique event IDs (this is what idempotency means in practice). Every event your system sends to the ESP should carry a unique ID. If the ESP sees the same ID twice because of a retry, it ignores the second one instead of triggering the automation again. Without this, retries cause duplicates. With it, retries are safe. If your ESP supports idempotency keys, use them. Postmark and Customer.io both support this natively. Worth checking whether yours does too.
A dead letter queue (or its equivalent). This is just a holding place for API calls that failed every retry attempt. Instead of vanishing, they land somewhere you can inspect them. Some teams use a dedicated Slack channel with automated alerts. Others use a database table that flags unprocessed events for review. The point is that failed events don't disappear. They wait for you to fix the underlying issue and reprocess them.
Monitoring you should actually set up
Retry logic helps prevent failures from hurting subscribers. Monitoring helps you catch when something is systematically wrong. These are two different problems.
At minimum, track your API error rate over time. A few failures here and there are normal. A spike, especially after a deployment or a list import, is a signal something broke. Set an alert if your error rate exceeds a threshold you're comfortable with (2-5% is a reasonable starting point for most setups).
Also track automation enrollment rate relative to the events that should trigger it. If 500 cart abandonment events fired today but only 300 automation enrollments happened, that gap is your first sign that something upstream is dropping events silently. Tools like Braze and Iterable have built-in event stream monitoring. If you're using a lighter-weight ESP, you may need to build this tracking yourself via your CRM or a middleware layer.
If you're not sure where to start with all of this, our SOS hotline is free and we're happy to look at your specific setup with you.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.