WebhooksResource
Access via urblock.webhooks.
Register, list, and manage webhook endpoints for real-time event notifications.
Methods
create(params)
Register a new webhook endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS endpoint URL |
events | string[] | Yes | Event types to subscribe to |
const endpoint = await urblock.webhooks.create({
url: "https://example.com/webhooks/urblock",
events: ["token.deployed", "transaction.confirmed", "transaction.failed"],
});
console.log(endpoint.id); // "whe_abc123"
console.log(endpoint.secret); // HMAC signing secret — store securely
Returns: WebhookEndpointResponse
list()
List all webhook endpoints.
const endpoints = await urblock.webhooks.list();
for (const ep of endpoints.data) {
console.log(`${ep.id}: ${ep.url} — ${ep.events.join(", ")}`);
}
Returns: ListResponse<WebhookEndpointListItem>
delete(id)
Delete a webhook endpoint. Stops all future event deliveries.
await urblock.webhooks.delete("whe_abc123");
Returns: WebhookEndpointDeleteResponse
See Also
- Webhooks API — full endpoint reference
- Webhook Integration Guide — setup and signature verification
- Webhooks Overview — architecture and retry policy