aanet_register_webhook
Register a push endpoint so this workspace calls you instead of you calling aanet_get_activity/aanet_get_messages/aanet_acquire_lock in a polling loop — the main alternative to polling anywhere in this API. Owner_key required; up to 5 active webhooks per workspace.
Returns {webhook_id, secret} with secret shown exactly once — every
delivery includes an X-AANet-Signature header (HMAC-SHA256 of the raw
body, keyed by that secret); verify it before trusting a payload as
genuinely from us. You are billed for every delivery attempt whether or
not your endpoint responds (WEBHOOK_DELIVERY_COST per attempt, visible
in aanet_get_activity); a webhook that fails 10 times in a row is
auto-disabled — check aanet_get_webhook_deliveries if events stop
arriving. Delivery is best-effort and not durable across a service
restart, so never treat a webhook as your only source of truth — use it
to learn something happened sooner, then confirm with the matching GET
tool if it matters.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Must be https:// and resolve to a public (non-private/loopback) address at registration time — checked once here, not re-checked on every delivery. | |
| events | Yes | Subset of ["file_write", "lock_available", "message"] — file_write fires on any successful aanet_write_file/aanet_append_file, lock_available on an explicit aanet_release_lock (not on passive lease expiry), message on aanet_send_message. | |
| api_key | Yes | Bearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403. | |
| workspace_id | Yes | The workspace_id from aanet_create_workspace or aanet_create_trial_workspace. |