@postsider/node version 2.x. Each entry documents the signature, parameters, return value, and a usage example. For installation and setup, see the SDK Overview.
SDK 2.0.0 changed
deletePost() to return the parsed response body (or null for a 204) instead of the raw fetch Response. Failed calls throw PostsiderApiError with status and details. See the Changelog.post, postList, upload, integrations, deletePost, and webhook signature verification. For queue slots, status changes, analytics, groups, notifications, and import-from-URL, call the REST API directly.
new Postsider(apiKey, instanceUrl?, options?)
Creates a new client. Instantiate it once and reuse it.string
required
Your organization API key. Generate one from Settings → API in the dashboard.
string
The instance origin. Pass
https://api.postsider.com for Cloud or your self-hosted origin. Do not rely on a package default because Cloud and OSS releases may differ. The SDK appends /public/v1 after the configured path prefix.string
Optional path prefix. Set
/api for the bundled self-hosted Compose deployment.client.post(posts)
Creates a post. Maps toPOST /public/v1/posts.
CreatePostDto
required
The post configuration.
string
required
now publishes immediately, schedule books the post for date, draft saves without publishing.string
required
ISO 8601 publish time in UTC, for example
2026-07-01T10:00:00Z.Promise<unknown[]> - an array with one entry per target channel: { postId, integration }. The full post is available via the REST API afterwards.
client.postList(filters)
Lists posts in a date range. Maps toGET /public/v1/posts.
GetPostsDto
required
Promise<{ posts: Post[] }>.
client.upload(file, extension)
Uploads a media file. Maps toPOST /public/v1/upload. The SDK handles multipart encoding and MIME type mapping.
Buffer
required
A Node.js
Buffer with the raw file bytes.string
required
The file extension, used to set the MIME type. Image types:
png, jpg, jpeg, gif.Promise<object> with the media id and path. Pass the object straight into a post’s image array.
client.integrations()
Lists connected channels. Maps toGET /public/v1/integrations.
Promise<Channel[]>, each with id, name, identifier, profile, picture, and disabled.
client.deletePost(id)
Deletes a post by id. Maps toDELETE /public/v1/posts/:id.
string
required
The id of the post to delete.
null for an empty response. Errors throw PostsiderApiError with the HTTP status and request details.
Postsider.verifyWebhookSignature(signature, body, secret)
Static method. Verifies a timestamped HMAC SHA-256 signature on an inboundpost.published webhook before you process it. Use it only when the delivery includes the signature and timestamp headers. It uses a timing-safe comparison and rejects timestamps older than five minutes by default.
The X-Postsider-Signature header value is formatted as sha256=<hex-digest>.
string
required
The
X-Postsider-Signature header value, for example sha256=abc123....string
required
The exact raw request body as a string or buffer converted to UTF-8. Do not re-serialize a parsed JSON object; key order or whitespace changes invalidate the signature.
string
required
Your webhook signing secret, configured when you create the webhook subscription.
string
required
The
X-Postsider-Timestamp header value. The signature covers timestamp + "." + rawBody.boolean, true if the signature is valid. Always reject requests that return false.

