The WhatsApp integration sends messages via a configured WhatsApp Business API provider. Templates must be pre-approved by Meta before they can be used.
WhatsApp must be enabled and configured in Admin → Settings → Integrations → WhatsApp before these endpoints are available. You will need a WhatsApp Business API URL, API token, and Phone Number ID from your provider (e.g. Twilio, 360dialog, or the Meta Cloud API).
Send a WhatsApp message
POST /api/whatsapp/send
Sends a WhatsApp message to a recipient on behalf of a job using a pre-configured template.
Required permission: api.whatsapp.send
Rate limit: 20 requests per minute
Method: POST only
Requires CSRF token.
ID of the job the message relates to. Used to log the communication against the job record.
Recipient’s phone number in E.164 format (e.g. +447700900123).
ID of the approved WhatsApp message template to use. Retrieve available templates from GET /api/whatsapp/get-options.
curl -X POST "https://propops.yourcompany.com/api/whatsapp/send" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"job_id": 1050,
"phone_number": "+447700900123",
"template_id": 3
}'
{
"success": true,
"data": {
"message_id": "wamid.abcdef123456",
"status": "sent",
"recipient": "+447700900123",
"template": "appointment_reminder"
},
"message": "WhatsApp message sent successfully"
}
Error responses:
{
"success": false,
"error": "Job ID is required"
}
{
"success": false,
"error": "Invalid phone number format. Use E.164 format, e.g. +447700900123"
}
{
"success": false,
"error": "WhatsApp integration is not configured"
}
Get available templates
GET /api/whatsapp/get-options
Returns the list of WhatsApp message templates available for sending.
Required permission: api.whatsapp.send
curl -X GET "https://propops.yourcompany.com/api/whatsapp/get-options" \
-H "Authorization: Bearer <token>"
{
"success": true,
"data": [
{
"id": 1,
"name": "job_created",
"display_name": "Job Created Notification",
"description": "Notify the tenant that a new job has been raised for their property",
"language": "en_GB",
"category": "UTILITY",
"status": "APPROVED",
"variables": ["job_ref", "property_address", "job_type"]
},
{
"id": 2,
"name": "contractor_assigned",
"display_name": "Contractor Assigned",
"description": "Inform the tenant of the contractor who will attend",
"language": "en_GB",
"category": "UTILITY",
"status": "APPROVED",
"variables": ["contractor_name", "contractor_phone", "scheduled_date"]
},
{
"id": 3,
"name": "appointment_reminder",
"display_name": "Appointment Reminder",
"description": "Remind the tenant of an upcoming appointment the day before",
"language": "en_GB",
"category": "UTILITY",
"status": "APPROVED",
"variables": ["tenant_first_name", "appointment_date", "time_window"]
},
{
"id": 4,
"name": "job_completed",
"display_name": "Job Completed",
"description": "Notify the tenant that their repair has been completed",
"language": "en_GB",
"category": "UTILITY",
"status": "APPROVED",
"variables": ["job_ref", "completion_date"]
}
]
}
Code examples
# 1. Get available templates
curl -X GET "https://propops.yourcompany.com/api/whatsapp/get-options" \
-H "Authorization: Bearer <token>"
# 2. Send a message using template ID 3
curl -X POST "https://propops.yourcompany.com/api/whatsapp/send" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"job_id": 1050,
"phone_number": "+447700900123",
"template_id": 3
}'
Notes
- Messages are sent asynchronously. A
success: true response means the message was accepted by the WhatsApp API provider, not that it has been delivered to the recipient’s device.
- All messages sent via this API are automatically logged as a case note on the associated job, including the recipient number, template used, and delivery status.
- Phone numbers must be in E.164 format — international dialling code followed by the subscriber number, no spaces or dashes. For UK numbers:
+44 followed by the 10-digit number (e.g. +447700900123).
- Rate limiting is enforced per user account, not per job. You can send up to 20 messages per minute across all jobs.