Skip to main content

Idempotency

Prevent duplicate events with idempotency keys:
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);

Rate Limit Tracking

const result = await client.events.create({...});

console.log(result.rateLimit);
// Access last known rate limit
console.log(client.rateLimit);
See TypeScript SDK for complete documentation.