Core concepts
Notifications
Send SMS, WhatsApp, and email through the same company-user token. Delivery is asynchronous.
SMS and WhatsApp
POST /api/notifications/sms queues a message and returns 202. WhatsApp uses the same endpoint with channel: "whatsapp".
json
{
"channel": "sms",
"phone_number": "+2250700000001",
"message": "Your code is 00990"
}phone_number must be E.164 and start with +. message is limited to 255 characters.
POST /api/notifications/email also returns 202. Attachments are optional (max 10): filename, content_base64, optional mime_type.
json
{
"email": "jane@acme.test",
"subject": "Document ready",
"body": "<p>Hello</p>",
"attachments": [
{
"filename": "signed.pdf",
"content_base64": "JVBERi0xLjQ…",
"mime_type": "application/pdf"
}
]
}Modules and quotas
A user token is gated by the company notification modules (email_notifications, sms_notifications, whatsapp_notifications). A license in read-only grace returns 403 LICENSE_READONLY.
SMS and WhatsApp consume company quota before the job is queued. When the quota is exhausted:
json
{
"status": "error",
"error_code": "SMS_QUOTA_REACHED",
"message": "Notification quota reached for this company",
"remaining": 0,
"limit": 1000
}