# Confluence Webhooks — Agent Guidance

Covers `src/tools/webhooks.ts` (9 tools, all `admin_`-prefixed). Confirmed live 2026-08-20 with a
full real lifecycle (create → get → update → invocation history → statistics → delete); see
`docs/plans/2026-08-20-full-api-coverage.md` batch 11.

## `admin_test_webhook` makes a real outbound HTTP call

It doesn't simulate anything — it sends a real `POST` with a `{"test": true}` body and
`X-Event-Key: diagnostics:ping` to whatever URL you give it, and returns the real request and
response (including the far end's actual status code and body). Confirmed live against
`https://example.com`, which correctly returned a real 405. Use this to validate a webhook
endpoint is reachable and responds sanely *before* creating a real webhook pointed at it with
`admin_create_webhook` — it doesn't require an existing webhook to exist first.

## Update replaces, it doesn't patch

`admin_update_webhook` takes the full desired configuration (`name`, `url`, `events`, `active`) —
call `admin_get_webhook` first if you only want to change one field, then pass everything back.

## Statistics are windowed, not lifetime

`admin_get_webhook_statistics`/`admin_get_webhook_statistics_summary` return counts within a
rolling time window (`window.start`/`window.duration` in the response), not all-time totals. The
summary variant breaks the same counts down per event type.
