Developer Quickstart
Five-minute path from zero to a working SociaHive integration via REST, SDKs, or the CLI.
Hit the REST API directly, install the official SDK in your language, or script with the CLI. Five minutes to first "oh-that-actually-works".
Get an API key
Settings → API Keys → Generate. Minimum useful scope set:
Copy the key — it starts with sk_ and is shown only once. Set it in your
shell:
Hit your first endpoint
You should get back JSON listing your connected social media accounts.
Save one of the id values — you'll need it to create posts.
Browse the reference
| Surface | URL |
|---|---|
| OpenAPI 3.1 spec (machine-readable) | /api/v1/openapi.json |
| Scalar UI (human-readable, try-it-now) | /api/v1/docs |
Drop the spec URL into Postman, ChatGPT Custom GPT Actions, or any OpenAPI-driven SDK generator.
Install an SDK
Both SDKs ship typed clients with the same resource grouping (accounts,
posts, flows, analytics), ergonomic error classes
(SociaHiveError with isAuthError, isRateLimited, etc.), and
auto-unwrapping of v1 response envelopes.
Use the CLI for ad-hoc operations
The sociahive CLI wraps the REST API for shell-friendly use:
Pipe-friendly JSON output by default. Useful inside CI/CD, cron jobs, and quick "what's the state of X" checks.
Generate types from OpenAPI (optional)
Our SDKs cover the high-traffic endpoints with hand-curated types. For endpoints beyond that surface, generate types directly from the spec:
You'll get fully typed request/response shapes for every endpoint in the
spec; combine with fetch or axios for surfaces the SDK doesn't yet wrap.
Authentication options
API key auth (above) is the fastest path. For multi-user applications where each end-user should authorize SociaHive access themselves, use OAuth 2.1 with Dynamic Client Registration:
| Surface | URL |
|---|---|
| Authorization endpoint | https://www.sociahive.com/api/oauth/authorize |
| Token endpoint | https://www.sociahive.com/api/oauth/token |
| Dynamic registration | https://www.sociahive.com/api/oauth/register |
| Discovery | https://www.sociahive.com/.well-known/oauth-authorization-server |
Both SDKs accept oauthToken as an alternative to apiKey:
Error handling
Every non-2xx response throws a SociaHiveError (Node) /
SociaHiveError (Python) carrying status, code, and the response body:
What to read next
- Flow patterns — the seven shapes most SociaHive
automation flows take. Useful when you're about to call
flows.create. - Cookbook — end-to-end recipes, including a "schedule a week of posts from a CSV" that exercises this SDK in Python and Node.
- MCP setup guide — if you also want your AI assistant to drive the API alongside your own application code.