Contact admin to create a tenant account. You'll receive a unique API key for authentication.
Open the Tenant Portal, scan the QR code with your phone, and your WhatsApp is linked.
Use any of the SDK libraries below, or call the API directly from your application.
All API requests require the x-api-key header:
// Add this header to every request
x-api-key: your-api-key-here
Send a WhatsApp message to any phone number.
{
"recipientPhone": "60123456789",
"message": "Hello! Your booking is confirmed.",
"messageType": "text"
}
Phone formats accepted: 60123456789, +60 12-345 6789, 012-345 6789
Dispatch a work job to a worker. They receive a formatted WhatsApp message with reply options.
{
"workerPhone": "60123456789",
"clientName": "Puan Siti",
"task": "Deep cleaning - 3BR apartment",
"location": "123 Jalan Ampang, KL",
"mapLink": "https://maps.google.com/..."
}
Check your WhatsApp connection status.
Get your daily token usage and remaining balance.
List your dispatched jobs. Filter by status: PENDING, IN_PROGRESS, DONE, ISSUE, DELAYED.
Check message delivery status for a specific phone number.
Retry all failed messages in your queue.
| Message Type | Token Cost |
|---|---|
| Text message | 1 token |
| Image | 2 tokens |
| Voice note | 2 tokens |
Tokens reset daily at midnight UTC. Contact admin to increase your daily limit.
' Initialize Dim wa As New MessageAPI("https://messageapi.onebloc.io", "your-api-key") ' Send a message Dim result = Await wa.SendMessage("60123456789", "Booking confirmed!") If result.Success Then MessageBox.Show("Message sent!") End If ' Send a job Dim job = Await wa.SendJob( _ workerPhone:="60123456789", _ clientName:="Puan Siti", _ task:="Deep cleaning - 3BR apartment", _ location:="Jalan Ampang, KL" _ ) ' Check usage Dim usage = Await wa.GetUsage()
Download: MessageAPI.vb
// Initialize const wa = new MessageAPI('https://messageapi.onebloc.io', 'your-api-key'); // Send a message const result = await wa.sendMessage('60123456789', 'Booking confirmed!'); console.log(result.data); // Send a job const job = await wa.sendJob( '60123456789', 'Puan Siti', 'Deep cleaning', 'Jalan Ampang KL' ); // Check usage const usage = await wa.getUsage();
Download: MessageAPI.js
// Initialize $wa = new MessageAPI('https://messageapi.onebloc.io', 'your-api-key'); // Send a message $result = $wa->sendMessage('60123456789', 'Booking confirmed!'); if ($result['success']) { echo "Sent!"; } // Send a job $job = $wa->sendJob( '60123456789', 'Puan Siti', 'Deep cleaning', 'Jalan Ampang KL' ); // Check usage $usage = $wa->getUsage();
Download: MessageAPI.php
# Send a message curl -X POST https://messageapi.onebloc.io/send-message \ -H "Content-Type: application/json" \ -H "x-api-key: your-api-key" \ -d '{"recipientPhone":"60123456789","message":"Hello!","messageType":"text"}' # Check status curl https://messageapi.onebloc.io/tenant/status \ -H "x-api-key: your-api-key" # Get usage curl https://messageapi.onebloc.io/tenant/usage \ -H "x-api-key: your-api-key"
When workers receive a job via WhatsApp, they can reply with:
| Reply | Action |
|---|---|
DONE | Mark job as completed |
ISSUE | Flag a problem with the job |
DELAY 30 | Delay job by 30 minutes |
START | Mark job as in progress |
ARRIVED | Confirm arrival at location |
| Send a photo | Attached as proof to the job |
| Send a voice note | Transcribed and logged |