Skip to main content
@postsider/node is the official Node.js client for the supported subset of the PostSider public API. It ships with TypeScript declarations and handles authentication, JSON requests, media uploads, and API errors.

Installation

Quick Start

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

Configuration

The Postsider constructor accepts an API key, an optional instance origin, and optional path settings:
string
required
Your organization’s API key. Generate one from Settings → API in the PostSider dashboard.
string
The origin of your PostSider instance. Pass it explicitly for portable code: use https://api.postsider.com for Cloud and your self-hosted origin for OSS. Do not rely on a package default because Cloud and OSS releases may use different defaults.
string
Optional path prefix inserted before /public/v1. Cloud uses an empty path prefix. Use /api for the bundled self-hosted Compose proxy.
For the bundled self-hosted deployment, pass the origin and { apiBasePath: '/api' }. The SDK then calls https://your-domain.example/api/public/v1/....
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. Internal DTO names such as CreatePostDto and GetPostsDto are used by the implementation but are not guaranteed to be re-exported as public types.

Uploading Media

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

Verifying Webhooks

When a webhook endpoint has a signing secret, PostSider signs its post.published deliveries with X-Postsider-Signature and X-Postsider-Timestamp. Use the static verifyWebhookSignature method with both headers. The payload is a JSON array of post records, so verify the signature against the exact raw request body before parsing.
For the full method signatures, parameter types, and examples for every SDK method, see the SDK Reference.