Add webhook
add_webhookRegister a webhook endpoint to receive signed POSTs for selected events, and return its signing secret so the receiving app can verify each request.
Instructions
Register a webhook endpoint that receives signed POSTs for the chosen events. Returns the endpoint and its whsec_ signing secret, shown only this once: put it in the receiving app's environment (e.g. APINATOR_WEBHOOK_SECRET) and verify each request with verifyWebhook from the server SDK. An app can have at most 10 endpoints; adding a URL that is already registered is refused (use edit_webhook instead).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Receiver URL, e.g. https://myapp.example.com/api/apinator-webhook. It must be reachable from the internet: private and loopback addresses (localhost, 10.x, 192.168.x) are refused. For a dev server on this machine, expose it with a tunnel (cloudflared, ngrok) and use the tunnel URL. | |
| events | Yes | Events to send: channel_occupied / channel_vacated (a channel got its first subscriber / lost its last), member_added / member_removed (presence channels; the body carries user_id). |