List a webhook endpoint's deliveries
const url = 'https://api.emite.cr/v1/webhooks/example/deliveries?outcome=succeeded&limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.emite.cr/v1/webhooks/example/deliveries?outcome=succeeded&limit=25' \ --header 'Authorization: Bearer <token>'Every POST made to this endpoint in the last 30 days, newest first: each attempt of each delivery (retried until it succeeds or its window ends — then an expired record says so), the tests (isTest) and the redeliveries (redeliveryOf) — with what was sent (event), what came back (statusCode, responseExcerpt), why it failed (failure) and when it is tried again (nextAttemptAt). Paged by cursor: pass the previous page's nextCursor. A disabled endpoint still lists what it received; one that is not the company's, or was removed, answers 404 WEBHOOK_ENDPOINT_NOT_FOUND.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Only the deliveries with this outcome; all of them when omitted.
The nextCursor of the previous page; omitted for the first page.
How many per page, from 1 to 100.
Responses
Section titled “Responses”A page of deliveries.
object
The deliveries of this page.
object
Identifier of this attempt — what sending it again takes.
The event's id: the same in every attempt of one delivery, and in a redelivery.
The event's type.
The event's environment.
Which attempt of its delivery this was: 1 for the first, then each retry. A redelivery counts from 1 again. On an expired record, how many attempts were made (0 when it only ever waited for a paused endpoint).
Whether it was a webhook.test sent on request.
The delivery this one sent again, when a person asked for it; null otherwise.
succeeded: the endpoint answered with a 2xx. failed: anything else.
The HTTP status the endpoint answered; null when it never answered.
Why it failed, in the same terms as a test (url_invalid, timeout, tls, connection, http_status), or expired: its window ended without a success, so nothing was sent then and it is not tried again on its own — send it again from here. null when it succeeded.
The reason of url_invalid or the system code of a tls or connection failure; null otherwise.
The first 500 characters of what the endpoint answered; null when nothing.
How long it took, in milliseconds.
On a failed attempt, when the delivery is tried again on its own. null when it is not: it succeeded, it was the last attempt of its window, it is a test, or it waits for the paused endpoint.
The event exactly as it was sent: the envelope, with its data.
object
When it was attempted.
What to pass as cursor for the next page; null when this is the last one.
Example
{ "items": [ { "eventType": "invoice.accepted", "environment": "sandbox", "attempt": 1, "outcome": "succeeded", "statusCode": 200, "failure": "url_invalid", "failureDetail": "ECONNREFUSED", "durationMs": 184 } ]}