Renta Docs

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/webhooks
const 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/webhooks

Body Parameters:

ParameterTypeRequiredDescription
urlstringEndpoint URL (must be HTTPS)
eventsstring[]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/:id
await 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"
}