SDK
SDK Overview
Install and configure the @nilovonjs/connect TypeScript SDK.
The official TypeScript SDK for the Connect API. Fully typed — your editor will autocomplete every method, parameter, and return type.
Service endpoints
- Homepage:
https://connect.nilovon.com - API host:
https://api.connect.nilovon.com - API reference:
https://api.connect.nilovon.com/v1 - SMTP relay:
smtp.connect.nilovon.com
Install
npm install @nilovonjs/connectCreate a client
import { createClient } from "@nilovonjs/connect";
const connect = createClient({
apiKey: process.env.CONNECT_API_KEY!,
});The API key is scoped to your organization — Connect resolves it automatically.
Configuration
| Option | Required | Description |
|---|---|---|
apiKey | Yes | Your API key (starts with sk_) |
Client namespaces
The client is organized into namespaces that mirror the API:
| Namespace | Methods |
|---|---|
connect.message | send, list, get |
connect.contact | create, list, get, update, delete, bulkCreate |
connect.template | create, list, get, update, delete |
connect.webhook | create, list, get, update, delete, test, listEvents |
connect.segment | create, list, get, update, delete |
connect.emailDomain | list, get, add, verify, delete, setDefault |
connect.phoneNumber | list, get, searchAvailable, purchase, release, update |
TypeScript types
The SDK exports types you can use to annotate your code:
import type { ConnectClient, ConnectConfig } from "@nilovonjs/connect";ConnectClient is the return type of createClient() — useful when passing the client as a function parameter.