> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsider.com/llms.txt
> Use this file to discover all available pages before exploring further.

# @postsider/node SDK Overview: Install and Quick Start

> Install and configure @postsider/node to call the Volta API from Node.js or TypeScript. Includes quick start, upload, and webhook examples.

`@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

<CodeGroup>
  ```bash npm theme={null}
  npm install @postsider/node
  ```

  ```bash yarn theme={null}
  yarn add @postsider/node
  ```

  ```bash pnpm theme={null}
  pnpm add @postsider/node
  ```
</CodeGroup>

## Quick Start

Import the default export, instantiate the client with your API key, and start making calls:

```typescript theme={null}
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:

<ParamField body="apiKey" type="string" required>
  Your organization's API key. Generate one from **Settings → API Keys** in the Volta dashboard.
</ParamField>

<ParamField body="instanceUrl" type="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`.
</ParamField>

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.

<Note>
  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.
</Note>

## Uploading Media

To attach an image to a post, upload it first and then reference the returned ID:

```typescript theme={null}
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:

```typescript theme={null}
import Postsider from '@postsider/node';

const isValid = Postsider.verifyWebhookSignature(
  req.headers['x-postsider-signature'] as string,
  JSON.stringify(req.body),
  process.env.WEBHOOK_SECRET!
);
```

<Tip>
  For the full method signatures, parameter types, and examples for every SDK method, see the [SDK Reference](/sdk/reference).
</Tip>
