Webhooks Management API
Create and manage webhook endpoints for receiving event notifications.
The Webhooks Management API lets you programmatically create, list, and delete webhook endpoints. For webhook event handling and verification, see Webhooks Overview.
List Webhooks
GET /v1/webhooksconst webhooks = await renta.webhooks.list();
for (const wh of webhooks.data) {
console.log(`${wh.url} — events: ${wh.events.join(', ')}`);
}curl https://api.getrenta.io/v1/webhooks \
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"data": [
{
"id": "wh_abc123",
"url": "https://example.com/webhooks/renta",
"events": ["booking.created", "booking.cancelled"],
"active": true,
"created_at": "2026-03-01T10:00:00Z"
}
]
}Create Webhook
POST /v1/webhooksBody Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | ✅ | Endpoint URL (must be HTTPS) |
events | string[] | ✅ | Events to subscribe to (see Event Types) |
const webhook = await renta.webhooks.create({
url: 'https://example.com/webhooks/renta',
events: ['booking.created', 'booking.cancelled', 'payment.received'],
});
// ⚠️ Save this — it's only shown once!
console.log(`Signing secret: ${webhook.signing_secret}`);curl -X POST https://api.getrenta.io/v1/webhooks \
-H "Authorization: Bearer renta_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/renta",
"events": ["booking.created", "booking.cancelled", "payment.received"]
}'Response:
{
"id": "wh_abc123",
"url": "https://example.com/webhooks/renta",
"events": ["booking.created", "booking.cancelled", "payment.received"],
"signing_secret": "whsec_abc123def456...",
"active": true,
"created_at": "2026-03-31T12:00:00Z"
}The signing_secret is only returned when the webhook is created. Store it securely — you'll need it to verify webhook signatures.
Delete Webhook
DELETE /v1/webhooks/:idawait renta.webhooks.del('wh_abc123');curl -X DELETE https://api.getrenta.io/v1/webhooks/wh_abc123 \
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"deleted": true,
"id": "wh_abc123"
}