Unified communication infrastructure for Sunhub Blues.
Build against one gateway for conversations, outbound messages, inbound events, workflows, market accounts, contacts, and communication connectors.
Quickstart
Create an API key from the app, call the gateway, then use the same key for server-side integrations.
Use /gateway to discover the API surface and /gateway/me to verify credentials.
Authentication
Browser users authenticate through the workspace/session path. External systems and channel adapters use API keys.
Server-side integrations
Send API keys in X-Sunhub-Api-Key or as a bearer token.
Browser app
Do not embed API keys in Lovable or browser code. Use user/session auth for frontend requests.
Messages
Use the v3 app API for the unified inbox. Each conversation row is a person thread and may contain iMessage, SMS, WhatsApp, and email messages.
Channel message resolves to iMessage when verified, with SMS fallback when needed.
Inbound events
All provider adapters normalize inbound messages into one channel-agnostic pipeline. This is for servers, agents, and webhooks, not browser UI.
Inbound messages are only shown when the contact exists and Sunhub initiated the conversation on that channel group. Gmail provider events should use push/history sync; worker polling is only a fallback.
Realtime
Subscribe once and merge durable events into the active thread.
Handle message.created, message.updated, job.updated, workflow.run.updated, and identity.verification.updated.
Market
Import and manage companies, contacts, segments, stages, custom fields, and target audiences.
Workflows
Workflows are graphs with backend validation, dry-run previews, pacing, branches, waits, and channel-specific send nodes.
Integrations
Connectors sit behind the gateway. Keep provider credentials out of the frontend.
A Zoho record link never marks a company won. Only a closed-won Deal or the explicit mark-won API changes lifecycle to Won.
API keys
API keys are created from the app and shown once. Store them in server-side environments only.
Errors
Responses use standard HTTP status codes. Error payloads return a useful detail, error, or validation object where available.
401
Missing or invalid authentication.
403
Authenticated but missing required role or API key scope.
404
Resource was not found in the current organization.
422
Payload failed validation.