Create Webhook
create_webhookRegister a webhook endpoint to receive signed JSON payloads from Porkbun for subscribed events. Returns a secret for verifying the X-Porkbun-Signature header.
Instructions
Register a webhook endpoint. Porkbun will POST a signed JSON payload to url whenever a subscribed event occurs. Returns the new endpoint including its secret — store it securely; it's used to verify the X-Porkbun-Signature header (HMAC-SHA256 over {timestamp}.{rawBody}). url must be a publicly reachable HTTPS endpoint: https:// on port 443, no credentials embedded in the URL, and a hostname that resolves to a public internet address. Private, loopback (including tricks like 127.0.0.1.sslip.io), link-local, CGNAT and reserved addresses are rejected with INVALID_WEBHOOK_URL — do not try to point this at localhost or an internal host. For local development use a public HTTPS tunnel (ngrok, Cloudflare Tunnel) or a sandbox key with sandbox_trigger_webhook. A hostname that does not resolve yet is accepted so you can register before the receiver is deployed, but the rules are re-checked before every delivery. Omit events (or pass ['*']) to subscribe to all event types; you can also pass prefix wildcards like dns.*.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Publicly reachable HTTPS URL Porkbun will POST event payloads to. Port 443 only; the hostname must resolve to a public internet address (private/loopback/reserved targets are rejected). | |
| events | No | Event types to subscribe to, e.g. `['domain.registered','dns.*']`. Omit or use `['*']` for all events. Call get_webhook_event_types for the catalog. |