Appearance
Create Webhook
Create a webhook subscriber for a product. Requires a paid plan (free-tier products get 402).
POST /v1/products/:id/webhooksRequest Body
json
{
"name": "Slack notifier",
"url": "https://hooks.example.com/packedge",
"events": ["license.created", "payment.completed"],
"enabled": true
}| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Display name |
url | Yes | string | HTTPS endpoint that receives the POSTed events |
events | No | string[] | Event types to subscribe to; omit or [] for all events (see Events) |
enabled | No | boolean | Default: 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"]
}'