Multi-tenant Setup
Create users with separate quotas and devices.
User management
Create user via Dashboard
Users can self-register through the dashboard, or an admin can create them via the PocketBase admin panel at /_/:
- Go to the PocketBase admin panel (
/_/) - Navigate to the users collection
- Click New record
- Enter email and password
Create user via API
Use the PocketBase collections API to create users programmatically:
curl -X POST https://your-server.com/api/collections/users/records \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "secret123456",
"passwordConfirm": "secret123456"
}' Quotas
Each user gets a quota tracked in the user_quotas collection. Quotas are managed through subscription plans:
| Field | Description |
|---|---|
sms_limit | Monthly SMS limit |
sms_used | SMS sent this period |
device_limit | Maximum registered devices |
Quotas reset automatically on a monthly cron cycle.
Devices
Each device is owned by the user who registered it. Users can only see and use their own devices. When sending SMS, Vendel automatically selects from the user's available devices via round-robin.
Subscription plans
Plans are defined in the user_plans collection and can be managed through the PocketBase admin panel. Each plan sets the SMS limit and device limit for subscribers.
Related
- Authentication - API keys per user
- Device Management - Manage devices