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.
Request
Call it with a POST to https://api.modulify.ai/v1/get_webhook_delivery_stats, sending the inputs below as a JSON object. The token needs the config:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/get_webhook_delivery_stats \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the get_webhook_delivery_stats tool.
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. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.