Skip to main content

Database Schema Diagram

Open zoomable schema diagram

Visual Schema Overview​

Shared and Dedicated WABA Architecture​

Message Queue Flow​

Index Map​

Vendor planType

User vendorId
email

WabaAccount isShared
wabaId

PhoneNumber wabaId
phoneNumberId

Contact UNIQUE(vendorId, mobile)
vendorId
mobile

MessageLog UNIQUE(vendorId, idempotencyKey)
vendorId
phoneNumberId
wabaId
contactId
campaignId
status
createdAt
waMessageId
recipientMobile
recipientMobile, vendorId
source
priority
vendorId, createdAt
vendorId, status, createdAt
phoneNumberId, createdAt
wabaId, createdAt
campaignId, status
nextRetryAt
status, priority, nextRetryAt

Campaign vendorId
status
scheduledAt
vendorId, status
vendorId, scheduledAt

Wallet vendorId UNIQUE

Transaction walletId
type
createdAt

Template vendorId
wabaId
metaTemplateId
vendorId, status
wabaId, status

Webhook vendorId
eventType
vendorId, eventType

ApiLog vendorId
endpoint
createdAt
vendorId, createdAt

Tenant Isolation​

Tenant root:
Vendor

Direct tenant-owned tables:
User, Contact, Campaign, MessageLog, Wallet, Template, Webhook, ApiLog

Platform/WABA tables:
WabaAccount, PhoneNumber

Indirect tenant-owned billing rows:
Transaction through Wallet