Skip to main content

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_ids owned by that domain

API (domain-chatbot)

Auth: admin JWT (same domain ACL as Meta status). Public: OAuth callback and webhook.

MethodPathPurpose
POST/zernio/connect/startStart headless OAuth (headless=true always). Body: domain_name, platform, locale{ authorization_url }
GET/zernio/callbackOAuth return; redirects to admin with ?zernio=connected|select|error
GET/zernio/status/{domain_name}Profile + connected accounts
GET/zernio/pending/{pending_id}/optionsList pages/orgs for headless selection
POST/zernio/pending/{pending_id}/selectComplete selection; body { selection_id }
DELETE/zernio/accounts/{domain_name}/{zernio_account_id}Disconnect
POST/zernio/media/presignPresign media upload
POST/zernio/postsCreate/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/webhooksPost/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

VariableRequiredDescription
ZERNIO_API_KEYYes for socialTeam API key
ZERNIO_API_BASE_URLNoDefault https://zernio.com/api
ZERNIO_OAUTH_REDIRECT_URIYes in prodMust point at /zernio/callback
ZERNIO_WEBHOOK_SECRETRecommendedSignature verify for /zernio/webhooks
ADMIN_APP_BASE_URLYesPost-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 WhatsApp zernio_profile_id in Hub account settings

Changelog

DateChange
2026-07-22Domain Settings UI is connect/disconnect only; posting stays on domain-chatbot /zernio/posts for other apps
2026-07-22Added headless Zernio social connect + publish under /zernio, Domain Settings connect UI, and webhook receiver for post/account events