Supa Hub targets are self-hosted Supa Social instances — community hubs like Orbit —
rather than a third-party social network. Because you (or your user) run the hub, there is
no OAuth dance: an account is connected with credentials in a single API call, and the
connection never expires.
Connecting
Pass credentials directly to POST /api/v1/accounts/connect and get the account back in the
same response — 201, no user redirect:Instead of a raw apiKey, credentials may carry a one-time connectCode the hub user
generated in their hub settings. Chirio redeems the code against the hub for a freshly minted
key, so the end user never handles a secret:The key — supplied or redeemed — is validated against the hub before the account is stored,
and encrypted at rest exactly like OAuth tokens. Hub keys don't expire, so these accounts
never need reconnecting unless the key is revoked on the hub.
Publishing
Target a Supa Hub account like any other. Hub posts require a title and a space:
Title — the first line of content becomes the post title (truncated to 200 chars).
Space — defaults to the spaceSlug set at connect time; override it per target with
spaceSlug on the platforms[] entry. One request can post to several spaces through the
same account.
Sending spaceSlug on a non-supahub target is a 400.
Limits
Supa Hub
Text limit
2,500
Media
images only — 1 = single image, 2–10 = carousel
Video
**rejected** — publish video through the hub directly
First comment
**not supported** — reports `unsupported`
Units per write
1
Connection lasts
until the key is revoked on the hub
Choosing a space
To render a space picker for spaceSlug, list the connected hub's spaces — Chirio holds the
hub URL and key, so the call is proxied and paginated by the hub:Calling it on a non-supahub account answers 400 platform_mismatch. Full request/response
detail is in the Accounts reference.
{
"platform": "supahub",
"credentials": {
"baseUrl": "https://hub.example.com", // the hub deployment
"apiKey": "sh_...", // hub API key with the posts:write scope
"spaceSlug": "general" // default space this account publishes into
}
}
{
"platform": "supahub",
"credentials": {
"baseUrl": "https://hub.example.com",
"connectCode": "H7QK9-MN3PX", // one-time, 15-minute code from the hub
"spaceSlug": "general"
}
}