Self-Host / Server
Rebuild the campaigns model for self-hosting.
In Sendity Cloud, a campaign is the configuration boundary between a website and the verification backend. Self-hosted installations need the same concept, even if you expose it through your own admin UI or seed it from configuration.
Required fields
- public_app_id
- The Campaign ID. Safe to expose in markup as the
public-keyattribute. Used by the Client when creating challenges. - client_secret
- Server-side credential for adapters and trusted backend calls. Show it once when created; store only a hashed form where possible.
- allowed_origins
- Origins allowed to create browser challenges for this campaign.
- verification_channel
- The campaign’s single channel: email or phone. Channel recipients remain server configuration.
For each AuthRequest, the server derives verification_action. Email actions contain the configured inbox and a complete mailto: URL. Phone actions specify the configured WhatsApp or SMS/RCS transport, its recipient and a complete action URL. WhatsApp uses the official Meta platform and remains part of the phone channel. The browser Client must not reconstruct any of these values.
Secret handling
Client secrets are operational credentials. Generate them with enough entropy, show them once, allow rotation and never render them back to users as copyable masked values. The browser Client only needs the Campaign ID.