Node.js
Official SDK for Node.js 18+ and TypeScript.
Install
npm
npm install xurelUsage
index.ts
import { Xurel } from 'xurel';
const xurel = new Xurel(process.env.XUREL_API_KEY);
const email = await xurel.emails.send({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Hello',
html: '<p>Sent from Node</p>',
type: 'transactional',
});
console.log(email.id);Client options
| Option | Default | Description |
|---|---|---|
apiKey | — | Required. xrl_prd_… or xrl_dev_…. |
baseUrl | https://api.xurel.co | Override for proxies. |
timeoutMs | 30000 | Request timeout. |