Getting started
A simple REST API over the official WhatsApp Business Platform (Cloud API). If you already use Mobitech Bulk SMS, the flow is the same: authenticate with an API key, POST messages and receive delivery reports on your webhook.
https://wa.mobitechtechnologies.com/api/v1JSON (UTF-8)Bearer API key- Create a WhatsApp workspace, connect your WhatsApp number and wait for Mobitech to approve the account.
- In the portal, open Developers and create an API key (and, optionally, your webhook URL).
- Send a message. Numbers can be written as
0712345678,+254712345678or254712345678.
WhatsApp rules you need to know
- You can only start a conversation with an approved template.
- Free-form messages (text, media, buttons) are allowed within 24 hours of the customer's last message.
- Contacts who reply STOP are opted out automatically and won't receive templates.
Authentication
Create an API key under Developers in the portal and send it as a Bearer token. Keys start with
mbt_live_. Check your key with GET /account, which returns your organization, wallet balance,
per-category rates and connected numbers.
https://wa.mobitechtechnologies.com/api/v1/account curl "https://wa.mobitechtechnologies.com/api/v1/account" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/account');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
],
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.get(
"https://wa.mobitechtechnologies.com/api/v1/account",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/account", {
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/account"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://wa.mobitechtechnologies.com/api/v1/account");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); https://wa.mobitechtechnologies.com/api/v1/phone-numbers Lists your connected WhatsApp numbers. Pass a number's id as phone_number_id to send from it.
Send a text message
https://wa.mobitechtechnologies.com/api/v1/messages
Queues a message and returns 202 Accepted with the message id. The delivery status arrives on your webhook or from
GET /messages/:id.
Body
-
tostring required - Recipient phone number in any common format.
-
typestring required text,template,image,document,video,audio,sticker,location,reactionorinteractive.-
textstring optional - The message, for
type: text. -
phone_number_idstring optional - Send from this number; defaults to your default number.
-
client_referencestring optional - Your own id, returned in responses and webhooks.
curl -X POST "https://wa.mobitechtechnologies.com/api/v1/messages" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "0712345678",
"type": "text",
"text": "Hello Jane, your order has shipped π",
"client_reference": "order-1024"
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/messages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'to' => '0712345678',
'type' => 'text',
'text' => 'Hello Jane, your order has shipped π',
'client_reference' => 'order-1024'
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/messages",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"to": "0712345678",
"type": "text",
"text": "Hello Jane, your order has shipped π",
"client_reference": "order-1024"
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/messages", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
to: "0712345678",
type: "text",
text: "Hello Jane, your order has shipped π",
client_reference: "order-1024"
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"to": "0712345678",
"type": "text",
"text": "Hello Jane, your order has shipped π",
"client_reference": "order-1024"
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/messages"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/messages");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""to"": ""0712345678"",
""type"": ""text"",
""text"": ""Hello Jane, your order has shipped π"",
""client_reference"": ""order-1024""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); {
"data": {
"id": 5812,
"status": "queued",
"to": "254712345678",
"type": "text",
"category": "service",
"cost": "0.0000",
"client_reference": "order-1024",
"created_at": "2026-09-29T10:15:02Z"
}
} Send a template
Templates start conversations and are charged by category (marketing, utility, authentication). Variables are passed in order.
curl -X POST "https://wa.mobitechtechnologies.com/api/v1/messages" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "254712345678",
"type": "template",
"template": {
"name": "order_update",
"language": "en",
"params": {
"body": ["Jane", "#1024"],
"header": ["October"],
"header_media": "https://cdn.example.co.ke/banner.jpg",
"buttons": {
"0": ["track/1024"]
}
}
}
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/messages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'to' => '254712345678',
'type' => 'template',
'template' => [
'name' => 'order_update',
'language' => 'en',
'params' => [
'body' => ['Jane', '#1024'],
'header' => ['October'],
'header_media' => 'https://cdn.example.co.ke/banner.jpg',
'buttons' => [
'0' => ['track/1024']
]
]
]
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/messages",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"to": "254712345678",
"type": "template",
"template": {
"name": "order_update",
"language": "en",
"params": {
"body": ["Jane", "#1024"],
"header": ["October"],
"header_media": "https://cdn.example.co.ke/banner.jpg",
"buttons": {
"0": ["track/1024"]
}
}
}
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/messages", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
to: "254712345678",
type: "template",
template: {
name: "order_update",
language: "en",
params: {
body: ["Jane", "#1024"],
header: ["October"],
header_media: "https://cdn.example.co.ke/banner.jpg",
buttons: {
"0": ["track/1024"]
}
}
}
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"to": "254712345678",
"type": "template",
"template": {
"name": "order_update",
"language": "en",
"params": {
"body": ["Jane", "#1024"],
"header": ["October"],
"header_media": "https://cdn.example.co.ke/banner.jpg",
"buttons": {
"0": ["track/1024"]
}
}
}
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/messages"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/messages");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""to"": ""254712345678"",
""type"": ""template"",
""template"": {
""name"": ""order_update"",
""language"": ""en"",
""params"": {
""body"": [""Jane"", ""#1024""],
""header"": [""October""],
""header_media"": ""https://cdn.example.co.ke/banner.jpg"",
""buttons"": {
""0"": [""track/1024""]
}
}
}
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Shortcut: "params": ["Jane", "#1024"] is treated as the body parameters. Advanced users can pass raw Meta
components instead of params.
Media & interactive messages
Allowed inside the 24-hour customer service window. Media must be a public https link.
Image or document
curl -X POST "https://wa.mobitechtechnologies.com/api/v1/messages" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "0712345678",
"type": "document",
"document": {
"link": "https://example.co.ke/invoice.pdf",
"filename": "Invoice-1024.pdf"
}
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/messages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'to' => '0712345678',
'type' => 'document',
'document' => [
'link' => 'https://example.co.ke/invoice.pdf',
'filename' => 'Invoice-1024.pdf'
]
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/messages",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"to": "0712345678",
"type": "document",
"document": {
"link": "https://example.co.ke/invoice.pdf",
"filename": "Invoice-1024.pdf"
}
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/messages", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
to: "0712345678",
type: "document",
document: {
link: "https://example.co.ke/invoice.pdf",
filename: "Invoice-1024.pdf"
}
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"to": "0712345678",
"type": "document",
"document": {
"link": "https://example.co.ke/invoice.pdf",
"filename": "Invoice-1024.pdf"
}
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/messages"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/messages");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""to"": ""0712345678"",
""type"": ""document"",
""document"": {
""link"": ""https://example.co.ke/invoice.pdf"",
""filename"": ""Invoice-1024.pdf""
}
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); For an image use "type": "image", "image": { "link": "β¦", "caption": "Your receipt" }.
Reply buttons (up to 3)
curl -X POST "https://wa.mobitechtechnologies.com/api/v1/messages" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "0712345678",
"type": "interactive",
"buttons": {
"body": "Would you like to confirm your appointment?",
"buttons": [
{
"id": "yes",
"title": "Confirm"
},
{
"id": "no",
"title": "Reschedule"
}
]
}
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/messages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'to' => '0712345678',
'type' => 'interactive',
'buttons' => [
'body' => 'Would you like to confirm your appointment?',
'buttons' => [
[
'id' => 'yes',
'title' => 'Confirm'
],
[
'id' => 'no',
'title' => 'Reschedule'
]
]
]
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/messages",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"to": "0712345678",
"type": "interactive",
"buttons": {
"body": "Would you like to confirm your appointment?",
"buttons": [
{
"id": "yes",
"title": "Confirm"
},
{
"id": "no",
"title": "Reschedule"
}
]
}
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/messages", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
to: "0712345678",
type: "interactive",
buttons: {
body: "Would you like to confirm your appointment?",
buttons: [
{
id: "yes",
title: "Confirm"
},
{
id: "no",
title: "Reschedule"
}
]
}
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"to": "0712345678",
"type": "interactive",
"buttons": {
"body": "Would you like to confirm your appointment?",
"buttons": [
{
"id": "yes",
"title": "Confirm"
},
{
"id": "no",
"title": "Reschedule"
}
]
}
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/messages"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/messages");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""to"": ""0712345678"",
""type"": ""interactive"",
""buttons"": {
""body"": ""Would you like to confirm your appointment?"",
""buttons"": [
{
""id"": ""yes"",
""title"": ""Confirm""
},
{
""id"": ""no"",
""title"": ""Reschedule""
}
]
}
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); List menu (up to 10 rows)
{
"to": "0712345678",
"type": "interactive",
"list": {
"body": "Choose a service",
"button": "Services",
"sections": [
{
"title": "Popular",
"rows": [
{
"id": "sms",
"title": "Bulk SMS",
"description": "From KES 0.35"
},
{
"id": "wa",
"title": "WhatsApp API"
}
]
}
]
}
} Also supported: video, audio, sticker, location and reaction.
OTP / authentication codes
Create an Authentication template in the portal (Meta writes the wording and adds a copy-code button), then send the code:
curl -X POST "https://wa.mobitechtechnologies.com/api/v1/messages" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "0712345678",
"type": "template",
"template": {
"name": "login_otp",
"language": "en",
"otp": "482913"
}
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/messages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'to' => '0712345678',
'type' => 'template',
'template' => [
'name' => 'login_otp',
'language' => 'en',
'otp' => '482913'
]
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/messages",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"to": "0712345678",
"type": "template",
"template": {
"name": "login_otp",
"language": "en",
"otp": "482913"
}
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/messages", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
to: "0712345678",
type: "template",
template: {
name: "login_otp",
language: "en",
otp: "482913"
}
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"to": "0712345678",
"type": "template",
"template": {
"name": "login_otp",
"language": "en",
"otp": "482913"
}
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/messages"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/messages");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""to"": ""0712345678"",
""type"": ""template"",
""template"": {
""name"": ""login_otp"",
""language"": ""en"",
""otp"": ""482913""
}
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); Message status
https://wa.mobitechtechnologies.com/api/v1/messages/:id https://wa.mobitechtechnologies.com/api/v1/messages curl "https://wa.mobitechtechnologies.com/api/v1/messages?status=failed&since=2026-09-01T00%3A00%3A00Z&limit=100" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/messages?status=failed&since=2026-09-01T00%3A00%3A00Z&limit=100');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
],
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.get(
"https://wa.mobitechtechnologies.com/api/v1/messages",
params={
"status": "failed",
"since": "2026-09-01T00:00:00Z",
"limit": 100
},
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/messages?status=failed&since=2026-09-01T00%3A00%3A00Z&limit=100", {
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/messages?status=failed&since=2026-09-01T00%3A00%3A00Z&limit=100"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://wa.mobitechtechnologies.com/api/v1/messages?status=failed&since=2026-09-01T00%3A00%3A00Z&limit=100");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); Query filters
-
statusoptional queued,sent,delivered,read,failedorreceived.-
directionoptional inboundoroutbound.-
phoneoptional - Only messages to or from this number.
-
client_referenceoptional - Your own id.
-
sinceoptional - ISO-8601 time, e.g.
2026-09-01T00:00:00Z. -
before_idoptional - Pagination cursor: pass the last id you received.
-
limitoptional - Up to 500.
Lifecycle: queued β sent β delivered β read, or failed with an error object. Failed
messages are refunded automatically.
Bulk broadcasts
https://wa.mobitechtechnologies.com/api/v1/broadcasts
Sends one template to up to 10,000 recipients per request, each with their own parameters. Add scheduled_at
(ISO-8601, UTC) to send later.
curl -X POST "https://wa.mobitechtechnologies.com/api/v1/broadcasts" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "October promo",
"template": {
"name": "october_offer",
"language": "en",
"params": {
"body": ["Customer"]
}
},
"recipients": [
{
"to": "0712345678",
"name": "Jane",
"params": {
"body": ["Jane"]
}
},
{
"to": "0722000111"
},
"0733000222"
],
"scheduled_at": "2026-10-01T06:00:00Z"
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/broadcasts');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'October promo',
'template' => [
'name' => 'october_offer',
'language' => 'en',
'params' => [
'body' => ['Customer']
]
],
'recipients' => [
[
'to' => '0712345678',
'name' => 'Jane',
'params' => [
'body' => ['Jane']
]
],
[
'to' => '0722000111'
],
'0733000222'
],
'scheduled_at' => '2026-10-01T06:00:00Z'
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/broadcasts",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"name": "October promo",
"template": {
"name": "october_offer",
"language": "en",
"params": {
"body": ["Customer"]
}
},
"recipients": [
{
"to": "0712345678",
"name": "Jane",
"params": {
"body": ["Jane"]
}
},
{
"to": "0722000111"
},
"0733000222"
],
"scheduled_at": "2026-10-01T06:00:00Z"
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/broadcasts", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "October promo",
template: {
name: "october_offer",
language: "en",
params: {
body: ["Customer"]
}
},
recipients: [
{
to: "0712345678",
name: "Jane",
params: {
body: ["Jane"]
}
},
{
to: "0722000111"
},
"0733000222"
],
scheduled_at: "2026-10-01T06:00:00Z"
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"name": "October promo",
"template": {
"name": "october_offer",
"language": "en",
"params": {
"body": ["Customer"]
}
},
"recipients": [
{
"to": "0712345678",
"name": "Jane",
"params": {
"body": ["Jane"]
}
},
{
"to": "0722000111"
},
"0733000222"
],
"scheduled_at": "2026-10-01T06:00:00Z"
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/broadcasts"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/broadcasts");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""name"": ""October promo"",
""template"": {
""name"": ""october_offer"",
""language"": ""en"",
""params"": {
""body"": [""Customer""]
}
},
""recipients"": [
{
""to"": ""0712345678"",
""name"": ""Jane"",
""params"": {
""body"": [""Jane""]
}
},
{
""to"": ""0722000111""
},
""0733000222""
],
""scheduled_at"": ""2026-10-01T06:00:00Z""
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); https://wa.mobitechtechnologies.com/api/v1/broadcasts/:id https://wa.mobitechtechnologies.com/api/v1/broadcasts/:id/cancel The full cost is reserved at launch and failures are refunded when the broadcast completes.
Contacts
https://wa.mobitechtechnologies.com/api/v1/contacts?q=jane&tag=vip&group_id=3&page=1 https://wa.mobitechtechnologies.com/api/v1/contacts https://wa.mobitechtechnologies.com/api/v1/contacts/:id https://wa.mobitechtechnologies.com/api/v1/contacts/:id https://wa.mobitechtechnologies.com/api/v1/contact-groups curl -X POST "https://wa.mobitechtechnologies.com/api/v1/contacts" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"phone": "0712345678",
"name": "Jane Wanjiku",
"email": "jane@example.com",
"tags": ["vip"],
"attributes": {
"city": "Nairobi"
},
"group_ids": [3]
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/contacts');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'phone' => '0712345678',
'name' => 'Jane Wanjiku',
'email' => 'jane@example.com',
'tags' => ['vip'],
'attributes' => [
'city' => 'Nairobi'
],
'group_ids' => [3]
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/contacts",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"phone": "0712345678",
"name": "Jane Wanjiku",
"email": "jane@example.com",
"tags": ["vip"],
"attributes": {
"city": "Nairobi"
},
"group_ids": [3]
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/contacts", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
phone: "0712345678",
name: "Jane Wanjiku",
email: "jane@example.com",
tags: ["vip"],
attributes: {
city: "Nairobi"
},
group_ids: [3]
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"phone": "0712345678",
"name": "Jane Wanjiku",
"email": "jane@example.com",
"tags": ["vip"],
"attributes": {
"city": "Nairobi"
},
"group_ids": [3]
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/contacts"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/contacts");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""phone"": ""0712345678"",
""name"": ""Jane Wanjiku"",
""email"": ""jane@example.com"",
""tags"": [""vip""],
""attributes"": {
""city"": ""Nairobi""
},
""group_ids"": [3]
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); Templates
https://wa.mobitechtechnologies.com/api/v1/templates?status=APPROVED Each template includes an inputs object describing the variables it needs.
https://wa.mobitechtechnologies.com/api/v1/templates curl -X POST "https://wa.mobitechtechnologies.com/api/v1/templates" \
-H "Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "order_update",
"language": "en",
"category": "UTILITY",
"header_type": "TEXT",
"header_text": "Order update",
"body": "Hi {{1}}, your order {{2}} is on the way.",
"body_examples": ["Jane", "#1024"],
"footer": "Mobitech Shop",
"buttons": [
{
"type": "URL",
"text": "Track",
"url": "https://shop.co.ke/t/{{1}}",
"url_example": "https://shop.co.ke/t/1024"
}
]
}' <?php
$ch = curl_init('https://wa.mobitechtechnologies.com/api/v1/templates');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'order_update',
'language' => 'en',
'category' => 'UTILITY',
'header_type' => 'TEXT',
'header_text' => 'Order update',
'body' => 'Hi {{1}}, your order {{2}} is on the way.',
'body_examples' => ['Jane', '#1024'],
'footer' => 'Mobitech Shop',
'buttons' => [
[
'type' => 'URL',
'text' => 'Track',
'url' => 'https://shop.co.ke/t/{{1}}',
'url_example' => 'https://shop.co.ke/t/1024'
]
]
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://wa.mobitechtechnologies.com/api/v1/templates",
headers={
"Authorization": "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx"
},
json={
"name": "order_update",
"language": "en",
"category": "UTILITY",
"header_type": "TEXT",
"header_text": "Order update",
"body": "Hi {{1}}, your order {{2}} is on the way.",
"body_examples": ["Jane", "#1024"],
"footer": "Mobitech Shop",
"buttons": [
{
"type": "URL",
"text": "Track",
"url": "https://shop.co.ke/t/{{1}}",
"url_example": "https://shop.co.ke/t/1024"
}
]
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://wa.mobitechtechnologies.com/api/v1/templates", {
method: "POST",
headers: {
Authorization: "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "order_update",
language: "en",
category: "UTILITY",
header_type: "TEXT",
header_text: "Order update",
body: "Hi {{1}}, your order {{2}} is on the way.",
body_examples: ["Jane", "#1024"],
footer: "Mobitech Shop",
buttons: [
{
type: "URL",
text: "Track",
url: "https://shop.co.ke/t/{{1}}",
url_example: "https://shop.co.ke/t/1024"
}
]
}),
});
const data = await response.json();
console.log(data); // Java 17+
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"name": "order_update",
"language": "en",
"category": "UTILITY",
"header_type": "TEXT",
"header_text": "Order update",
"body": "Hi {{1}}, your order {{2}} is on the way.",
"body_examples": ["Jane", "#1024"],
"footer": "Mobitech Shop",
"buttons": [
{
"type": "URL",
"text": "Track",
"url": "https://shop.co.ke/t/{{1}}",
"url_example": "https://shop.co.ke/t/1024"
}
]
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://wa.mobitechtechnologies.com/api/v1/templates"))
.header("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
} // .NET 6+
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://wa.mobitechtechnologies.com/api/v1/templates");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer mbt_live_xxxxxxxxxxxxxxxxxxxx");
request.Content = new StringContent(@"{
""name"": ""order_update"",
""language"": ""en"",
""category"": ""UTILITY"",
""header_type"": ""TEXT"",
""header_text"": ""Order update"",
""body"": ""Hi {{1}}, your order {{2}} is on the way."",
""body_examples"": [""Jane"", ""#1024""],
""footer"": ""Mobitech Shop"",
""buttons"": [
{
""type"": ""URL"",
""text"": ""Track"",
""url"": ""https://shop.co.ke/t/{{1}}"",
""url_example"": ""https://shop.co.ke/t/1024""
}
]
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); https://wa.mobitechtechnologies.com/api/v1/templates/sync Fetches the latest template statuses from Meta.
Webhooks
Set your endpoint under Developers in the portal. We POST JSON and retry with exponential backoff (8 attempts over about a day) until your server answers with a 2xx status.
{
"event": "message.received",
"organization_id": 12,
"timestamp": "2026-09-29T10:16:40Z",
"data": {
"id": 5813,
"wamid": "wamid.HBgM...",
"direction": "inbound",
"type": "text",
"from": "254712345678",
"body": "Hi, is this in stock?",
"reply": {
"id": null,
"text": "Hi, is this in stock?"
},
"conversation_id": 311,
"created_at": "2026-09-29T10:16:39Z"
}
} {
"event": "message.status",
"data": {
"id": 5812,
"status": "delivered",
"client_reference": "order-1024",
"delivered_at": "2026-09-29T10:15:05Z",
"error": null
}
} Verify the signature
Every webhook carries X-Mobitech-Signature: sha256=<hex>, an HMAC-SHA256 of the raw request body using your
signing secret. Reject requests where it doesn't match.
<?php
$body = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $body, getenv('MOBITECH_WEBHOOK_SECRET'));
$given = $_SERVER['HTTP_X_MOBITECH_SIGNATURE'] ?? '';
if (!hash_equals($expected, $given)) {
http_response_code(401);
exit;
}
$event = json_decode($body, true);
error_log($event['event']);
http_response_code(200); # Flask
import hashlib, hmac, os
from flask import Flask, request, abort
app = Flask(__name__)
@app.post("/webhooks/mobitech")
def mobitech_webhook():
secret = os.environ["MOBITECH_WEBHOOK_SECRET"].encode()
expected = "sha256=" + hmac.new(secret, request.get_data(), hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, request.headers.get("X-Mobitech-Signature", "")):
abort(401)
event = request.get_json()
print(event["event"], event["data"])
return "", 200 // Express: use the raw body, not the parsed JSON
const crypto = require("crypto");
app.post("/webhooks/mobitech", express.raw({ type: "application/json" }), (req, res) => {
const expected = "sha256=" + crypto
.createHmac("sha256", process.env.MOBITECH_WEBHOOK_SECRET)
.update(req.body)
.digest("hex");
const given = req.get("X-Mobitech-Signature") || "";
if (given.length !== expected.length ||
!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(given))) {
return res.sendStatus(401);
}
const event = JSON.parse(req.body);
console.log(event.event, event.data);
res.sendStatus(200);
}); // Java 17+: verify before parsing the body
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HexFormat;
static boolean validSignature(byte[] rawBody, String header, String secret) throws Exception {
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
String expected = "sha256=" + HexFormat.of().formatHex(mac.doFinal(rawBody));
return header != null && MessageDigest.isEqual(
expected.getBytes(StandardCharsets.UTF_8), header.getBytes(StandardCharsets.UTF_8));
} // ASP.NET Core minimal API
using System.Security.Cryptography;
using System.Text;
app.MapPost("/webhooks/mobitech", async (HttpRequest req) =>
{
using var reader = new StreamReader(req.Body);
var body = await reader.ReadToEndAsync();
var secret = Encoding.UTF8.GetBytes(Environment.GetEnvironmentVariable("MOBITECH_WEBHOOK_SECRET")!);
var hash = HMACSHA256.HashData(secret, Encoding.UTF8.GetBytes(body));
var expected = "sha256=" + Convert.ToHexString(hash).ToLowerInvariant();
var given = req.Headers["X-Mobitech-Signature"].ToString();
if (!CryptographicOperations.FixedTimeEquals(Encoding.UTF8.GetBytes(expected), Encoding.UTF8.GetBytes(given)))
return Results.Unauthorized();
return Results.Ok();
}); Errors & limits
{
"error": {
"code": "window_closed",
"message": "The 24-hour customer service window is closed..."
}
} | HTTP | code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key |
402 | insufficient_balance | Top up your wallet |
403 | organization_pending | Account awaiting Mobitech approval |
422 | window_closed | Use a template: the 24-hour window has closed |
422 | invalid_recipient | Phone number could not be parsed |
422 | recipient_opted_out | Contact replied STOP |
422 | validation_failed | See details for field errors |
429 | rate_limited | More than 50 requests per second per key |
502 | meta_error | WhatsApp rejected the request |
Need help? Email info@mobitechtechnologies.com or chat with us on WhatsApp.