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"],
  "enabled": true
}
FieldRequiredTypeDescription
nameYesstringDisplay name
urlYesstringHTTPS endpoint that receives the POSTed events
eventsNostring[]Event types to subscribe to; omit or [] for all events (see Events)
enabledNobooleanDefault: true

Response

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

Store the secret now

The plaintext signing secret is returned once 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"]
  }'