SDK
Advanced Features
Idempotency, retries, and advanced SDK usage
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Idempotency, retries, and advanced SDK usage
const result = await client.events.create(
{
channelName: 'payments',
title: 'Payment Received',
metadata: { paymentId: 'pay_123' }
},
{ idempotencyKey: 'payment-pay_123-webhook' }
);
console.log('Was replayed:', result.wasReplayed);
const result = await client.events.create({...});
console.log(result.rateLimit);
// Access last known rate limit
console.log(client.rateLimit);