List what was delivered where, and how it went
Every time Commune handed one of this newsletter's events to one of its destinations, newest first: which event, which destination, what came back, and whether it was a first try or a retry. Needs sending: read.
This is the answer to "my endpoint never received that event". Each row names an event_id, which is the same string the consumer sees in the Commune-Event-Id header and in the envelope's id, so a line in your own logs and a row here can be matched up. ?event_id= goes the other way: give it an id and get every attempt at delivering that one event.
An event is delivered once per destination, so one event with three destinations produces at least three rows here. ?destination_id= narrows to one of them, and ?status=failed is the usual first read.
A retry is a new row, not an edit. attempt is 1 on the first try and one higher on each retry, and the delivery service retries a failed delivery on its own with backoff, so a row with status: failed is not yet a lost event. manual says whether somebody asked for the attempt rather than it being automatic.
Attempts are recorded shortly after delivery rather than instantly, so an attempt made a moment ago may not be on this page yet. Read again rather than concluding nothing was tried. The log is a recent record rather than an archive, so keep anything you need to hold on to.
Two things are never returned: whatever a destination authenticates with, and the response body your endpoint answered with, since a refusing endpoint routinely echoes the request back inside it, headers included. response_status stands in for the body, and the delivery portal has the rest.
Request
- Base URL: https://api.usecommune.com
- URL: https://api.usecommune.com/newsletters/{newsletter}/delivery-attempts
- 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:read)
Query parameters
The pagination.next_cursor value from the previous page. Omit it to read the first page. A cursor is opaque, is only valid for the same operation with the same filters, and is not a durable identifier.
How many items to return in this page. This is a page size, not an offset. Fewer items than requested may come back and that does not mean the collection is exhausted, only an absent next_cursor does.
Comma-separated list of relationship paths to inline in the response. Unexpanded relationships are returned as a reference object carrying only id and object. Each operation documents the paths it accepts, and an unknown path answers 400. Nested paths use a dot, for example article.newsletter.
Comma-separated allow-list of top level properties to return on each object, so a client can trim a response it does not need in full. id and object are always returned. An unknown property name answers 400. Properties omitted by an operation, such as content on any article list, cannot be brought back with fields.
How one attempt ended. succeeded is a 2xx from the destination. failed is anything else, including no answer at all, and is not final: the delivery service retries on its own.
Return only attempts that ended this way. Omit for both.
Return only attempts at delivering this event, by the id from the envelope and from the Commune-Event-Id header.
Return only attempts at this destination, by the id from GET /newsletters/{newsletter}/destinations.
Response
A page of delivery attempts, most recent first.
Example response
{
"pagination": {
"next_cursor": "Y3Vyc29yOjE3NTY0MjM2MDAwMDA6MDE5MmM4"
},
"data": [
{
"newsletter": {
"object": "newsletter",
"id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
},
"destination": {
"object": "newsletter",
"id": "9a4c1c6e-0f2b-4f47-9d3f-6d1b1a2c3d4e"
},
"destination_type": "webhook",
"event_type": "article.published",
"response_status": 200,
"failure": "timeout"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.