> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendkit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js

> Send emails from Node.js using the SendKit SDK.

> [card] [Source Code](https://github.com/sendkitdev/sendkit-node)
>
> View on GitHub

> [card] [Package](https://www.npmjs.com/package/@sendkitdev/sdk)
>
> View on npm

## Install

```bash npm theme={null}
npm install @sendkitdev/sdk
```

```bash yarn theme={null}
yarn add @sendkitdev/sdk
```

```bash pnpm theme={null}
pnpm add @sendkitdev/sdk
```

## Send email

```typescript theme={null}
import { SendKit } from '@sendkitdev/sdk';

const sendkit = new SendKit('sk_your_api_key');

const { data, error } = await sendkit.emails.send({
  from: 'Your Name <you@yourdomain.com>',
  to: 'recipient@example.com',
  subject: 'Hello from SendKit',
  html: '<h1>Welcome!</h1><p>Your first email with SendKit.</p>',
});

if (error) {
  console.error(error);
} else {
  console.log('Email sent:', data.id);
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.