Count webhook deliveries over time
get_webhook_delivery_stats
Counts the webhook deliveries of a site over a period, split into delivered, in progress and failed.
In progress means pending or still being retried, and failed means the delivery gave up. The response holds totals for the whole window and days, one entry per hour, day or month as interval says, each with total, delivered, inProgress and failed. Entries with no deliveries come back as zeros, so the list always covers the full window, and windowDays says how many days it spans.
period takes the same choices as the date pickers in Modulify. Send from and to instead for a custom range, at most 3,660 days apart, and leave all three out for 30d.
Pass a webhookId to count one webhook only. Test deliveries are counted, and deliveries removed from the log are not. See Webhooks.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
webhookId |
string | No | Only this webhook, by its id from list_site_webhooks. Leave it out for every webhook on the site. |
period |
string | No | day is today so far, from midnight UTC, 24h the current hour and the 23 before it, 7d, 30d and 90d the last 7, 30 and 90 days counting today, 12mo this month and the 11 before it, and all everything back to the first delivery. Leave it out when sending from and to. Defaults to 30d. |
from |
string | No | The first day of a custom range as YYYY-MM-DD in UTC. Send it together with to. |
to |
string | No | The last day of a custom range as YYYY-MM-DD in UTC, included in the range. Send it together with from. |