Skip to main content
@postsider/node is the official Node.js client for the Volta API. It wraps every public API endpoint in a typed, async method, handles authentication and request encoding for you, and ships with full TypeScript declarations — so you get autocomplete and compile-time safety for all request and response shapes. The SDK is designed to work equally well in traditional Node.js backends, TypeScript applications, and AI agent runtimes like Claude Code or Codex that invoke it through tool calls.

Installation

npm install @postsider/node

Quick Start

Import the default export, instantiate the client with your API key, and start making calls:
import Postsider from '@postsider/node';

const client = new Postsider(
  'your-api-key',
  'https://your-instance.com'  // omit for the postsider.com hosted service
);

// List all connected channels
const channels = await client.integrations();
console.log(channels);

// Schedule a post to a channel
await client.post({
  type: 'schedule',
  date: '2025-01-15T10:00:00',
  posts: [
    {
      integration: { id: 'channel-id' },
      value: [{ content: 'Hello from Volta!' }]
    }
  ]
});

Configuration

The Postsider constructor accepts two arguments:
apiKey
string
required
Your organization’s API key. Generate one from Settings → API Keys in the Volta dashboard.
instanceUrl
string
The base URL of your Volta instance, e.g. "https://your-instance.com". Omit this argument when using the Volta hosted service — the SDK defaults to https://api.postsider.com.
If you are self-hosting Volta, always pass your instance’s public URL as the second argument. The SDK appends /public/v1 automatically when constructing request paths.
The SDK is written in TypeScript and ships with .d.ts declarations in the dist/ folder. You do not need to install a separate @types/ package. All request and response types (including CreatePostDto and GetPostsDto) are re-exported from the compiled output.

Uploading Media

To attach an image to a post, upload it first and then reference the returned ID:
import { readFileSync } from 'fs';

const buffer = readFileSync('./banner.png');
const media = await client.upload(buffer, 'png');

await client.post({
  type: 'schedule',
  date: '2025-02-01T09:00:00',
  posts: [
    {
      integration: { id: 'channel-id' },
      value: [
        {
          content: 'Our new banner is live!',
          image: [media.id]
        }
      ]
    }
  ]
});

Verifying Webhooks

Volta sends signed webhook payloads when posts are published. Use the static verifyWebhookSignature method to validate inbound requests before processing them:
import Postsider from '@postsider/node';

const isValid = Postsider.verifyWebhookSignature(
  req.headers['x-postsider-signature'] as string,
  JSON.stringify(req.body),
  process.env.WEBHOOK_SECRET!
);
For the full method signatures, parameter types, and examples for every SDK method, see the SDK Reference.