Zernio social connections
Domain-scoped social account connect and publish via Zernio, stored in domain-chatbot under the /zernio API. This is separate from Instagram / Meta DM messaging and from Engagement Hub WhatsApp (Zernio inbox).
Admin UI
Settings → Domain Settings → Social accounts (Zernio)
- Connect platforms with headless OAuth (Facebook, Instagram, LinkedIn, X/Twitter, TikTok, YouTube, Threads)
- For Facebook pages / LinkedIn orgs, complete selection in the admin modal (Zernio-hosted picker is not used)
- Disconnect accounts
- Posting is not done in admin; other apps call domain-chatbot
POST /zernio/posts
The existing Instagram / Meta channel card is unchanged and continues to manage Meta DM OAuth only.
Tenant model
- One Zernio profile per domain (
domain_{domain_name}) - Connected social accounts mapped in domain-chatbot (
domain_zernio_social_accounts) - Publish requests only accept
account_idsowned by that domain
API (domain-chatbot)
Auth: admin JWT (same domain ACL as Meta status). Public: OAuth callback and webhook.
| Method | Path | Purpose |
|---|---|---|
POST | /zernio/connect/start | Start headless OAuth (headless=true always). Body: domain_name, platform, locale → { authorization_url } |
GET | /zernio/callback | OAuth return; redirects to admin with ?zernio=connected|select|error |
GET | /zernio/status/{domain_name} | Profile + connected accounts |
GET | /zernio/pending/{pending_id}/options | List pages/orgs for headless selection |
POST | /zernio/pending/{pending_id}/select | Complete selection; body { selection_id } |
DELETE | /zernio/accounts/{domain_name}/{zernio_account_id} | Disconnect |
POST | /zernio/media/presign | Presign media upload |
POST | /zernio/posts | Create/queue post (x-request-id for idempotency) |
GET | /zernio/posts/{domain_name} | List local posts |
GET | /zernio/posts/{domain_name}/{zernio_post_id} | Get one post |
POST | /zernio/webhooks | Post/account lifecycle events (ignores WhatsApp inbox events) |
Example connect start:
POST /zernio/connect/start
{
"domain_name": "aventora",
"platform": "instagram",
"locale": "en"
}
Example create post:
POST /zernio/posts
{
"domain_name": "aventora",
"content": "Hello from Aventora",
"account_ids": ["ACCOUNT_ID"]
}
Environment
| Variable | Required | Description |
|---|---|---|
ZERNIO_API_KEY | Yes for social | Team API key |
ZERNIO_API_BASE_URL | No | Default https://zernio.com/api |
ZERNIO_OAUTH_REDIRECT_URI | Yes in prod | Must point at /zernio/callback |
ZERNIO_WEBHOOK_SECRET | Recommended | Signature verify for /zernio/webhooks |
ADMIN_APP_BASE_URL | Yes | Post-OAuth return to Domain Settings |
Do not reuse META_* for this flow. Do not replace the Hub WhatsApp Zernio webhook URL when adding the social webhook.
Isolation notes
- Meta Instagram DM (
/integrations/meta/*,/instagram/webhook*) is untouched - Hub WhatsApp Zernio (
/whatsapp/zernio/webhook) remains the WhatsApp inbox endpoint - Social profiles are named
domain_{slug}and never overwrite WhatsAppzernio_profile_idin Hub account settings
Changelog
| Date | Change |
|---|---|
| 2026-07-22 | Domain Settings UI is connect/disconnect only; posting stays on domain-chatbot /zernio/posts for other apps |
| 2026-07-22 | Added headless Zernio social connect + publish under /zernio, Domain Settings connect UI, and webhook receiver for post/account events |