# get_deploy_hook_call_stats

Source: https://modulify.ai/docs/mcp/deploy-hooks/get-deploy-hook-call-stats

Counts the calls to a site's deploy hooks over a period, split into builds started, already building and rejected.

- Title: Count deploy hook calls over time
- Scope: `config:read`
- Access: Read only

Rejected covers every call that started nothing for another reason, `disabled`, `refused`, `rate-limited` and `failed`. The response holds `totals` for the whole window and `days`, one entry per hour, day or month as `interval` says, each with `total`, `started`, `alreadyBuilding` and `rejected`. Entries with no calls 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 `hookId` to count one hook only. Calls removed from the log are not counted. See [Deploy hooks](https://modulify.ai/docs/automations/deploy-hooks#read-the-insights).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `hookId` | string | No | Only this hook, by its id from `list_deploy_hooks`. Leave it out for every hook 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 call. 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`. |