Build with Mobitech APIs
Send SMS and WhatsApp messages from your own website, app or system. Simple REST APIs with JSON, and copy-paste samples in cURL, PHP, Python, Node.js, Java and C#.
Bulk SMS API
Send single or bulk SMS to all Kenyan networks, schedule messages and fetch delivery reports. KES 0.35 per SMS.
Read the docs →WhatsApp Business API
Templates, text, media, buttons, OTP codes, broadcasts, contacts and signed webhooks on the official WhatsApp platform.
Read the docs →Shortcodes & Premium SMS
Dedicated and shared shortcodes, premium-rate content and subscriptions, with revenue share and pricing.
Read the docs →Quick start
Pick a language once and every sample on these pages follows it.
Send an SMS
curl -X POST "https://textapi.mobitechtechnologies.com/sms/sendsms" \
-H "h_api_key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mobile": "254712345678",
"message": "Hello from Mobitech!",
"sender_name": "MOBITECH",
"service_id": 0
}' <?php
$ch = curl_init('https://textapi.mobitechtechnologies.com/sms/sendsms');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'h_api_key: YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'mobile' => '254712345678',
'message' => 'Hello from Mobitech!',
'sender_name' => 'MOBITECH',
'service_id' => 0
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result); import requests
response = requests.post(
"https://textapi.mobitechtechnologies.com/sms/sendsms",
headers={
"h_api_key": "YOUR_API_KEY"
},
json={
"mobile": "254712345678",
"message": "Hello from Mobitech!",
"sender_name": "MOBITECH",
"service_id": 0
},
)
print(response.json()) // Node.js 18+ (built-in fetch)
const response = await fetch("https://textapi.mobitechtechnologies.com/sms/sendsms", {
method: "POST",
headers: {
h_api_key: "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
mobile: "254712345678",
message: "Hello from Mobitech!",
sender_name: "MOBITECH",
service_id: 0
}),
});
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 = """
{
"mobile": "254712345678",
"message": "Hello from Mobitech!",
"sender_name": "MOBITECH",
"service_id": 0
}
""";
HttpRequest request = HttpRequest.newBuilder(URI.create("https://textapi.mobitechtechnologies.com/sms/sendsms"))
.header("h_api_key", "YOUR_API_KEY")
.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://textapi.mobitechtechnologies.com/sms/sendsms");
request.Headers.TryAddWithoutValidation("h_api_key", "YOUR_API_KEY");
request.Content = new StringContent(@"{
""mobile"": ""254712345678"",
""message"": ""Hello from Mobitech!"",
""sender_name"": ""MOBITECH"",
""service_id"": 0
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); Send a WhatsApp template
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": "order_update",
"language": "en",
"params": ["Jane", "#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' => 'template',
'template' => [
'name' => 'order_update',
'language' => 'en',
'params' => ['Jane', '#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": "template",
"template": {
"name": "order_update",
"language": "en",
"params": ["Jane", "#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: "template",
template: {
name: "order_update",
language: "en",
params: ["Jane", "#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": "template",
"template": {
"name": "order_update",
"language": "en",
"params": ["Jane", "#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"": ""template"",
""template"": {
""name"": ""order_update"",
""language"": ""en"",
""params"": [""Jane"", ""#1024""]
}
}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync()); Get your API keys
Sign up, then copy the key from your company profile in the Bulk SMS portal.
Create a key under Developers in the WhatsApp portal.
No account yet? Sign up for Bulk SMS (500 free SMS) or create a WhatsApp workspace.
Integration support: email info@mobitechtechnologies.com or call (+254) 710 986455, Mon - Sat: 9:00 - 18:00.