@postsider/node SDK. Each entry documents the method signature, its parameters, the value it returns, and a usage example. For installation and setup instructions, see the SDK Overview.
new Postsider(apiKey, instanceUrl?)
Creates a new SDK client. Instantiate this once and reuse it across your application.
Your organization’s API key. Generate one from Settings → API Keys in the Volta dashboard.
The base URL of your Volta instance (e.g.
"https://your-instance.com"). Defaults to "https://api.postsider.com" for the Volta hosted service.client.post(posts)
Schedules a post or saves it as a draft. Maps to POST /public/v1/posts.
The post configuration object.
"schedule" to publish at the specified time, or "draft" to save without scheduling.ISO 8601 publish time (e.g.
"2025-01-15T10:00:00"). Required when type is "schedule".Array of per-channel content objects. Each entry targets one connected channel.
The ID of the target channel. Retrieve IDs from
client.integrations().Promise<{ id: string; status: string }> — the new post’s ID and its initial status.
client.postList(filters)
Retrieves a paginated list of posts for your organization. Maps to GET /public/v1/posts.
Promise<Post[]> — an array of post objects matching the filters.
client.upload(file, extension)
Uploads a media file to the Volta media library. Maps to POST /public/v1/upload. The SDK handles multipart form encoding and MIME type mapping for you.
A Node.js
Buffer containing the raw file bytes.The file extension that determines the MIME type. Accepted values:
'png', 'jpg', 'jpeg', 'gif', 'mp4'.Promise<{ id: string; url: string }> — the uploaded file’s ID and public URL.
client.integrations()
Returns all channels currently connected to your organization. Maps to GET /public/v1/integrations.
Promise<Channel[]> — an array of channel objects, each with id, name, providerIdentifier, profile, and picture.
client.listConnectors()
Returns all connector types available on your Volta instance, including their authorization status and supported capabilities. Maps to GET /public/v1/connectors. Useful in agent workflows to discover which platforms are ready before attempting to authorize or post.
Promise<Connector[]> — an array of connector descriptors with id, name, authorized, and capabilities.
client.authorizeConnector(connectorId)
Starts the OAuth authorization flow for a connector. Maps to POST /public/v1/connectors/:id/authorize. Returns an OAuth redirect URL if authorization is required, or confirms immediately if the connector is already authorized.
The connector identifier (e.g.
"x", "linkedin", "instagram"). Retrieve valid IDs from client.listConnectors().Promise<{ url: string } | { authorized: true }> — either an OAuth URL to redirect to, or a confirmation that the connector is already authorized.
client.connectorAnalytics(connectorId, date)
Fetches analytics for a connected channel on a given date. Maps to GET /public/v1/connectors/:id/analytics. The response shape is platform-specific.
The ID of the connected channel. Use the
id field from client.integrations().The date for which to retrieve analytics, formatted as
YYYY-MM-DD (e.g. "2025-01-15").Promise<Record<string, unknown>> — a platform-specific analytics object. Common fields include impressions, likes, reposts, and followers.
client.deletePost(id)
Deletes a post by its ID. Maps to DELETE /public/v1/posts/:id.
The unique identifier of the post to delete. Use the
id returned when creating the post or from client.postList().Promise<Response> — the raw node-fetch Response object. A 200 status indicates success.
Postsider.verifyWebhookSignature(signature, body, secret) static
Verifies the HMAC-SHA256 signature on an inbound Volta webhook request. Call this at the top of your webhook handler before processing any event data. The method uses a timing-safe comparison to prevent timing attacks.
The X-Postsider-Signature header value is formatted as sha256=<hex-digest>.
The value of the
X-Postsider-Signature header from the incoming request (e.g. "sha256=abc123...").The raw request body as a string. If your framework parses JSON automatically, serialize it back with
JSON.stringify(req.body) to ensure the string matches what was signed.Your webhook signing secret. Configure this in the Volta dashboard when setting up the webhook subscription.
boolean — true if the signature is valid, false otherwise. Always reject requests that return false.
