Global configuration
Default client
After configuring globally, create a client without options:WhatsrbCloudClient.resetConfiguration().
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Configure the WhatsRB Cloud TypeScript SDK.
import { WhatsrbCloudClient } from '@whatsrb/cloud';
WhatsrbCloudClient.configure({
apiKey: process.env.WHATSRB_API_KEY,
baseUrl: 'https://whatsrb.com', // default
timeout: 30_000, // ms, default
});
WhatsrbCloudClient.configure({
apiKey: process.env.WHATSRB_API_KEY,
});
const client = new WhatsrbCloudClient();
await client.agents.list();
await client.webhooks.list();
WhatsrbCloudClient.resetConfiguration().
const client = new WhatsrbCloudClient({
apiKey: 'wrb_live_xxx',
baseUrl: 'https://whatsrb.com',
timeout: 60_000,
});
// lib/whatsrb.ts
import { WhatsrbCloudClient } from '@whatsrb/cloud';
export const whatsrb = new WhatsrbCloudClient({
apiKey: process.env.WHATSRB_API_KEY,
});
| Option | Default | Description |
|---|---|---|
apiKey | — | Your WhatsRB API key (required) |
baseUrl | https://whatsrb.com | API base URL |
timeout | 30000 | Request timeout in milliseconds |
