Skip to main content

duplicate_detected

Ten identical messages already reached this recipient inside the last 60 seconds, so the eleventh was refused. It was not sent and was not charged.

Status: 422

{
"status": 422,
"type": "duplicate_detected",
"message": "Detected 10 identical emails to the recipient in 60 seconds. Set allow_duplicate to true to override.",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/duplicate_detected"
}

Why you got this

  • Identical means the same sender, recipient, subject and body. One character of difference makes it a different message.
  • A retry loop is resending a request whose response your code never read, so every attempt looks like a fresh send.
  • A queue redelivered the same job to several workers at once.
  • The send is genuinely repeated, such as a one-time code the recipient asked for again.

How to fix it

Look for the loop first. This check exists to catch code that retries on a timeout or a network error without knowing whether the first call succeeded, which is exactly what Idempotency-Key is for: a replay returns the original response instead of sending again.

When the repeat is intended, set allow_duplicate to true on that one request. Set it per request rather than everywhere, because a default of true removes the only guard against a runaway loop reaching a real mailbox.

Is it safe to retry

Not as it stands. The same body inside the same 60 seconds is refused again. Retry with allow_duplicate set to true when the send is intended, or wait for the window to pass.