SendSetsDocs

SDKs

Official SendSets client libraries for JavaScript, Python, and Go.

SendSets publishes official, fully typed SDKs for JavaScript and TypeScript, Python, and Go. Each one wraps the same surface: the REST API, the OAuth2 authorization flows, and the realtime gateway. You get typed resources, auto-pagination, automatic retries, and a live event stream without hand-rolling HTTP. All three are open source and track the v1 API.

Official libraries

LanguagePackageRuntimeRealtime
JavaScript and TypeScriptsendsets (npm)Node 20+, Bun, Deno, browsers, edgeyes
Pythonsendsets (PyPI)Python 3.10+, sync and asyncyes
Gogithub.com/AddisonHoff/SendSets-goGo 1.23+yes

Install

npm install sendsets

Also available on pnpm, yarn, and bun (pnpm add sendsets, yarn add sendsets, bun add sendsets). On Node older than 22 the gateway needs a WebSocket: install the optional ws peer and the SDK picks it up automatically.

pip install sendsets

Interactive OAuth2 flows and secure token storage are an optional extra: pip install "sendsets[oauth]". Requires Python 3.10+.

go get github.com/AddisonHoff/SendSets-go

Requires Go 1.23+ (the auto-paging iterator uses range-over-func).

Quickstart

Create an API key in the dashboard under Settings, expose it as SENDSETS_API_KEY, then:

import { SendSets } from "sendsets";

const sendsets = new SendSets({ apiKey: process.env.SENDSETS_API_KEY });

// List campaigns (auto-paginated)
for await (const campaign of await sendsets.campaigns.list()) {
  console.log(campaign.id, campaign.name);
}
import os
from sendsets import SendSets

client = SendSets(api_key=os.environ["SENDSETS_API_KEY"])

for key in client.api_keys.list():
    print(key.name, key.status)

SendSets() reads SENDSETS_API_KEY from the environment on its own, and every method has an awaitable twin on AsyncSendSets.

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/AddisonHoff/SendSets-go"
)

func main() {
	client, err := sendsets.New(sendsets.WithAPIKey("ssk_..."))
	if err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()
	page, err := client.Campaigns.List(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	for campaign, err := range page.All(ctx) {
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(campaign.Name)
	}
}

Authentication

Every SDK takes a bearer credential, and both credential types run through the same permission gates:

  • an API key for your own scripts (prefixed ssk_)
  • an OAuth access token for apps acting on behalf of a workspace (prefixed ssat_)
// sendsets-js
new SendSets({ apiKey: "ssk_..." });       // API key
new SendSets({ accessToken: "ssat_..." });   // OAuth access token
# sendsets-py (falls back to SENDSETS_API_KEY when omitted; any bearer token works)
SendSets(api_key="ssk_...")
// sendsets-go
sendsets.New(sendsets.WithAPIKey("ssk_..."))
sendsets.New(sendsets.WithAccessToken("..."))

For the full authorization-code and client-credentials flows (PKCE and automatic token refresh), see OAuth. For key format, scoping, and rotation, see Authentication.

What every SDK gives you

  • Typed REST resources across the whole API: mailboxes, campaigns, contacts, the unibox, analytics, templates, CRM, integrations, and webhooks.
  • OAuth2 flows built in: authorization-code with PKCE and client-credentials, plus programmatic OAuth application management.
  • A realtime gateway on one resilient WebSocket, with heartbeats, automatic reconnect, and session resume, delivering typed events. See Realtime.
  • Resilience by default: automatic retries with exponential backoff and jitter, Retry-After support, and idempotency keys for safe mutation retries.
  • Cursor pagination with auto-paging iterators, so you loop over every record without tracking cursors yourself.
  • Typed errors carrying the request_id and a machine-readable code, matchable against named sentinels. See Error codes.
  • A small footprint: sendsets-js and sendsets-go ship with zero runtime dependencies.

No-code and automation

Prefer a visual builder? SendSets also ships a community n8n node, n8n-nodes-sendsets, and has first-class Zapier and Make guides.

See also

On this page