Webhooks API
List Webhooks
GET /api/webhooksResponse:
json
{
"items": [
{
"id": "whk_xxx",
"name": "My Webhook",
"url": "https://example.com/webhook",
"secret": "whsec_xxx",
"events": ["license.created", "license.activated"],
"enabled": true,
"lastTriggeredAt": "2025-01-15T12:00:00.000Z",
"createdAt": "2025-01-01T00:00:00.000Z"
}
],
"events": [
"license.created",
"license.activated",
"license.deactivated",
"license.expired",
"license.revoked",
"customer.created",
"customer.updated",
"payment.completed",
"payment.refunded",
"subscription.created",
"subscription.cancelled",
"subscription.renewed"
]
}Get Webhook
GET /api/webhooks/:idCreate Webhook
POST /api/webhooksjson
{
"name": "My Webhook",
"url": "https://example.com/webhook",
"events": ["license.created", "license.activated"]
}A signing secret is auto-generated if not provided.
Update Webhook
PUT /api/webhooks/:idjson
{
"name": "Updated Name",
"url": "https://example.com/new-webhook",
"events": ["license.created"],
"enabled": false
}Regenerate Secret
POST /api/webhooks/:id/regenerate-secretGenerates a new signing secret. The old secret immediately stops working.
Test Webhook
POST /api/webhooks/:id/testSends a test payload to the webhook URL.
Response:
json
{
"success": true,
"status": 200,
"statusText": "OK"
}Delete Webhook
DELETE /api/webhooks/:id