Sendable Docs
Node.js

Introduction

Get started with Sendable in Node.js applications.

Prerequisites

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

Installation

Install the official TypeScript SDK:

npm install @sendable-dev/sdk

Basic Setup

Create a .env file:

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

Quick Example

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('[email protected]', 'Hello from Node.js!')

Available Guides

Environment Variables

VariableRequiredDescription
SENDABLE_API_KEYYesYour session API key
SENDABLE_API_URLNoAPI base URL (default: https://api.sendable.dev)
SENDABLE_WEBHOOK_SECRETNoFor verifying webhooks

On this page