Send an event to a destination again
Asks for the event behind this attempt to be delivered to the same destination again. Needs sending: write. The same action as the retry button beside that attempt in the delivery portal.
It re-delivers the event, it does not resend the attempt. What comes back is a new attempt against the same event and the same destination, numbered one higher and marked manual: true. The attempt this was called on is unchanged.
Reach for it when a delivery failed for a reason you have since fixed and the delivery service has stopped retrying on its own. It is not the way to catch up after an outage: those retries happen without being asked, and replaying an event a consumer already processed is a duplicate they have to handle.
A 202 means the delivery service has the request. The delivery happens after the response, and the attempt it produces appears in the log shortly afterwards rather than immediately.
A destination that has been switched off answers 422, since a disabled destination is skipped rather than queued. Switch it back on in the portal first.
Takes no body: which event and which destination are both properties of the attempt. It does take ?newsletter=, for the reason GET /delivery-attempts/{attempt} does. Leave it out if your credential reaches exactly one newsletter.
Request
- Base URL: https://api.usecommune.com
- URL: https://api.usecommune.com/delivery-attempts/{attempt}/replay
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://usecommune.com/api/oauth/authorize, token URL https://usecommune.com/api/oauth/token, scopes: sending:write)
Query parameters
Which newsletter this request is for, by id or by handle.
Most operations never need this. A credential reaches a list of newsletters, and an operation that acts on one of them normally works out which from the object in its path: an article, a thread, a subscriber and a key each belong to a newsletter, so naming one is naming the other. This parameter is for the operations whose subject is not a Commune object, where there is nothing to work it out from.
Leave it out if your credential reaches exactly one newsletter, which is the usual case: it is that one. If your credential reaches several and you leave it out, the answer is 400 naming this parameter, because picking one for you would be picking wrong most of the time.
GET /newsletters lists the newsletters your credential reaches, and is where the value for this comes from.
Response
The delivery service has the request. The delivery has not happened yet, so no attempt is returned; find it afterwards in the delivery log, filtered to the same event.
Example response
{
"attempt": {
"object": "newsletter",
"id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
},
"destination": {
"object": "newsletter",
"id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.