Skip to content

Create Webhook ​

Create a webhook subscriber for a product. Requires a paid plan (free-tier products get 402).

POST /v1/products/:id/webhooks

Request Body ​

json
{
  "name": "Slack notifier",
  "url": "https://hooks.example.com/packedge",
  "events": ["license.created", "payment.completed"],
  "secret": "whsec_your_own_signing_secret",
  "enabled": true
}
FieldRequiredTypeDescription
nameYesstringDisplay name
urlYesstringHTTPS endpoint that receives the POSTed events
eventsNostring[]Event types to subscribe to (see Events). Omit to subscribe to all events; a given list must be non-empty. Only these events are delivered
secretNostringSigning secret, 16–128 characters, no whitespace. Omit to have one generated
enabledNobooleanDefault: true

Response ​

json
{
  "data": {
    "id": "whk_xxx",
    "secret": "whsec_xxx"
  }
}

Store the secret now

The signing secret (yours, or the generated one) is returned here. Use it to verify deliveries (see Security).

Example ​

bash
curl -X POST "https://api.packedge.dev/v1/products/prd_xxx/webhooks" \
  -H "Authorization: Bearer pk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Slack notifier",
    "url": "https://hooks.example.com/packedge",
    "events": ["license.created"]
  }'