Files
kumomta/docs/reference/http/api_admin_bounce_v1.md
T
Wez Furlong 3d521a6468 fix reporting of bounce totals
A significant portion are bounced as they move through the queues,
not just those swept up in the direct application of the API call.

Pass in a shared hash map to track the counts and report on that
at the end of the call instead.
2023-03-01 19:57:47 -07:00

1.4 KiB

POST /api/admin/bounce/v1

Making a POST request to this endpoint allows the system operator to administratively bounce messages that match certain criteria, or if no criteria are provided, ALL messages.

There is no way to undo the actions carried out by this request!

The body of the post request must be a JSON object; here's an example:

{
    "domain": "gmail.com",
    "reason": "no time to explain!11!"
}

and the response will look something like this, with an entry for each matching queue name and the count of matching messages that were bounced:

{"bounced":{"gmail.com":42}, "total_bounced":42}

The following fields are possible in the request:

domain

Optional string. The domain name to match. If omitted, any domain will match.

campaign

Optional string. The campaign name to match. If omitted, any campaign will match.

tenant

Optional string. The tenant to match. If omitted, any tenant will match.

If you specify none of `domain`, `campaign` or `tenant`, then
*ALL* queues will be bounced.

With great power, comes great responsibility!

reason

Required. Reason to log in the delivery log.

duration

Optional duration string. Defaults to "5m". Specifies how long this bounce directive remains active.

While active, newly injected messages that match the bounce criteria will also be bounced.