SDKs
The official Node and Python clients, generated types, and what each resource covers.
SociaHive has two official clients for the REST API (/api/v1): @sociahive/sdk for Node and sociahive for Python. Both cover every scheduler endpoint, and their request and response types are generated from the same OpenAPI document the API serves at /api/v1/openapi.json, so they cannot drift from it.
A few scheduler features depend on your plan: AI images and client review and invite links are on Studio, Pro and Agency, and plugs on every paid plan. A call your plan does not include fails with status 403 and code feature_disabled.
Install
This page describes version 0.2.0 of both packages. The Node package needs Node.js 18 or later.
Authenticate with an API key from Settings → API keys, or an OAuth token. Pass one, not both.
Schedule into the next free slot
The slot is held for you for 10 minutes; create the post with scheduled_at set to at to keep it.
Resources
| Node | Python | Endpoints |
|---|---|---|
accounts | accounts | GET /connected-accounts |
posts | posts | posts CRUD, schedule, publish, cancel, bulk, duplicate |
media | media | GET /media-library, uploads (presign, verify, uploadFromUrl, one-call upload), AI images (generateImage, imageAllowance) |
signatures | signatures | /signatures list, create, update, delete |
postingSlots | posting_slots | /posting-slots CRUD, occurrences, findSlot (GET /find-slot) |
linkClicks | link_clicks | GET /posts/{id}/link-clicks |
reviewLinks | review_links | /posts/{id}/review-links list, create, revoke |
plugs | plugs | /posts/{id}/plugs list, arm, delete |
calendar | calendar | GET /calendar, duplicate, quick stats |
clientInvites | client_invites | /client-invites list, create, revoke |
rssFeeds | rss_feeds | /rss-feeds list, create, update, pause |
webhooks | webhooks | /webhooks list, create, update, delete |
flows, analytics | flows, analytics | automation flows and analytics |
Review links and client invites return their URL once, when created. Store it; it is never returned again.
Arming a plug acts on a real audience when it fires (a repost or a comment), so confirm with the person before you call plugs.arm.
Types
Node exports every schema and operation of the spec under the Api namespace:
Platform ids are typed KnownPlatform | (string & {}) in Node and str in Python, so a platform added after your SDK version still type-checks.
Python returns TypedDicts from sociahive.api.
Errors
Every non-2xx response raises SociaHiveError with status, code (for example no_slots, feature_disabled, allowance_exhausted) and the response body.
Verify webhook deliveries
See Webhooks for the events and payloads, and n8n for the no-code node.