# Introduction

> Get started with Sendable in Node.js applications.

Source: https://wav1.recrav.com/docs/quickstart/nodejs

## Prerequisites [#prerequisites]

* Node.js 18 or higher
* A Sendable account with an active session
* An API key from your dashboard

### Installation [#installation]

Install the official TypeScript SDK:

```bash
npm install @sendable-dev/sdk
```

### Basic Setup [#basic-setup]

Create a `.env` file:

```bash
SENDABLE_API_KEY=your_api_key_here
SENDABLE_API_URL=https://api.sendable.dev
```

### Quick Example [#quick-example]

```typescript
import { Sendable } from '@sendable-dev/sdk'

const sendable = new Sendable({
  apiKey: process.env.SENDABLE_API_KEY!,
  apiKeyScope: 'session',
  baseUrl: process.env.SENDABLE_API_URL,
})

export async function sendMessage(chatId: string, text: string) {
  return sendable.messages.send({
    chatId,
    text: { content: text },
  })
}

// Usage
await sendMessage('6281234567890@s.whatsapp.net', 'Hello from Node.js!')
```

### Available Guides [#available-guides]

* [TypeScript SDK](/docs/quickstart/nodejs/sdk) - Install and use the official SDK
* [Next.js Integration](/docs/quickstart/nodejs/nextjs) - Full-stack Next.js app with Sendable
* [Express Integration](/docs/quickstart/nodejs/express) - REST API with Express and Sendable

### Environment Variables [#environment-variables]

| Variable                  | Required | Description                                                                  |
| ------------------------- | -------- | ---------------------------------------------------------------------------- |
| `SENDABLE_API_KEY`        | Yes      | Your session API key                                                         |
| `SENDABLE_API_URL`        | No       | API base URL (default: [https://api.sendable.dev](https://api.sendable.dev)) |
| `SENDABLE_WEBHOOK_SECRET` | No       | For verifying webhooks                                                       |
