curl -X GET \
'https://inlobo.com/api/v1/whatsapp/contacts/?opted_in=true' \
-H 'Authorization: Bearer wak_xxx...'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/contacts/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"phone_number":"+919876543210","name":"John","tags":["vip"],"is_opted_in":true}'
curl -X PUT \
'https://inlobo.com/api/v1/whatsapp/contacts/+919876543210/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"name":"John Updated","tags":["vip"]}'
curl -X DELETE \
'https://inlobo.com/api/v1/whatsapp/contacts/+919876543210/' \
-H 'Authorization: Bearer wak_xxx...'
curl -X GET \
'https://inlobo.com/api/v1/whatsapp/contact-groups/' \
-H 'Authorization: Bearer wak_xxx...'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/contact-groups/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"name":"VIP Customers","description":"Top tier"}'
curl -X PUT \
'https://inlobo.com/api/v1/whatsapp/contact-groups/<id>/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"name":"VIP Customers","description":"Top tier"}'
curl -X DELETE \
'https://inlobo.com/api/v1/whatsapp/contact-groups/<id>/' \
-H 'Authorization: Bearer wak_xxx...'
curl -X GET \
'https://inlobo.com/api/v1/whatsapp/auto-replies/?is_active=true' \
-H 'Authorization: Bearer wak_xxx...'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/auto-replies/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"name":"Welcome","trigger_type":"FIRST_MESSAGE","reply_type":"TEXT","reply_text":"Hi! Welcome."}'
curl -X PUT \
'https://inlobo.com/api/v1/whatsapp/auto-replies/<id>/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"is_active":false}'
curl -X DELETE \
'https://inlobo.com/api/v1/whatsapp/auto-replies/<id>/' \
-H 'Authorization: Bearer wak_xxx...'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/text/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","text":"Hello!"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/template/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","template_name":"your_template","language_code":"en_US"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/media/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","url":"https://example.com/brochure.pdf","caption":"Our brochure"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/image/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","image_url":"https://example.com/photo.jpg","caption":"Check this out"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/document/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","document_url":"https://example.com/file.pdf","filename":"invoice.pdf"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/audio/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","audio_url":"https://example.com/audio.mp3"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/video/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","video_url":"https://example.com/video.mp4","caption":"Watch this"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/location/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","latitude":28.6139,"longitude":77.2090,"name":"New Delhi","address":"India"}'
curl -X POST \
'https://inlobo.com/api/v1/whatsapp/messages/buttons/' \
-H 'Authorization: Bearer wak_xxx...' \
-H 'Content-Type: application/json' \
-d '{"to":"+919876543210","body":"Choose an option:","buttons":["Confirm","Cancel","Talk to agent"],"header":"Order #1234"}'
curl -X GET \
'https://inlobo.com/api/v1/whatsapp/conversations/+919876543210/messages/?limit=20' \
-H 'Authorization: Bearer wak_xxx...'
curl -X GET \
'https://inlobo.com/api/v1/whatsapp/templates/?status=APPROVED' \
-H 'Authorization: Bearer wak_xxx...'
curl -X GET \
'https://inlobo.com/api/v1/whatsapp/account/' \
-H 'Authorization: Bearer wak_xxx...'
import requests
API_KEY = "wak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
BASE = "https://inlobo.com/api/v1/whatsapp"
H = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
res = requests.get(
f"{BASE}/contacts/",
headers=H,
params={"opted_in": "true", "limit": 50},
)
contacts = res.json()["data"]
requests.post(
f"{BASE}/contacts/",
headers=H,
json={
"phone_number": "+919876543210",
"name": "John Doe",
"tags": ["vip", "lead"],
"is_opted_in": True,
},
)
requests.put(
f"{BASE}/contacts/+919876543210/",
headers=H,
json={"name": "John Updated", "tags": ["vip"]},
)
requests.delete(
f"{BASE}/contacts/+919876543210/",
headers=H,
)
groups = requests.get(f"{BASE}/contact-groups/", headers=H).json()["data"]
requests.post(
f"{BASE}/contact-groups/",
headers=H,
json={"name": "VIP Customers", "description": "Top tier"},
)
requests.put(
f"{BASE}/contact-groups/<id>/",
headers=H,
json={"name": "VIP Customers"},
)
requests.delete(f"{BASE}/contact-groups/<id>/", headers=H)
replies = requests.get(
f"{BASE}/auto-replies/",
headers=H,
params={"is_active": "true"},
).json()["data"]
requests.post(
f"{BASE}/auto-replies/",
headers=H,
json={
"name": "Welcome",
"trigger_type": "FIRST_MESSAGE",
"reply_type": "TEXT",
"reply_text": "Hi! Welcome to Inlobo.",
},
)
requests.put(
f"{BASE}/auto-replies/<id>/",
headers=H,
json={"is_active": False},
)
requests.delete(f"{BASE}/auto-replies/<id>/", headers=H)
res = requests.post(
f"{BASE}/messages/text/",
headers=H,
json={"to": "+919876543210", "text": "Hello from Python!"},
)
print(res.json()["data"]["message_id"])
requests.post(
f"{BASE}/messages/template/",
headers=H,
json={
"to": "+919876543210",
"template_name": "your_template",
"language_code": "en_US",
},
)
requests.post(
f"{BASE}/messages/media/",
headers=H,
json={"to": "+919876543210", "url": "https://example.com/brochure.pdf", "caption": "Our brochure"},
)
requests.post(
f"{BASE}/messages/image/",
headers=H,
json={"to": "+919876543210", "image_url": "https://example.com/photo.jpg", "caption": "Check this"},
)
requests.post(
f"{BASE}/messages/document/",
headers=H,
json={"to": "+919876543210", "document_url": "https://example.com/file.pdf", "filename": "invoice.pdf"},
)
requests.post(
f"{BASE}/messages/audio/",
headers=H,
json={"to": "+919876543210", "audio_url": "https://example.com/audio.mp3"},
)
requests.post(
f"{BASE}/messages/video/",
headers=H,
json={"to": "+919876543210", "video_url": "https://example.com/video.mp4", "caption": "Watch this"},
)
requests.post(
f"{BASE}/messages/location/",
headers=H,
json={"to": "+919876543210", "latitude": 28.6139, "longitude": 77.2090, "name": "New Delhi"},
)
requests.post(
f"{BASE}/messages/buttons/",
headers=H,
json={
"to": "+919876543210",
"body": "Choose an option:",
"buttons": ["Confirm", "Cancel", "Talk to agent"],
"header": "Order #1234",
},
)
msgs = requests.get(
f"{BASE}/conversations/+919876543210/messages/",
headers=H,
params={"limit": 20},
).json()["data"]
templates = requests.get(
f"{BASE}/templates/",
headers=H,
params={"status": "APPROVED"},
).json()["data"]
account = requests.get(f"{BASE}/account/", headers=H).json()["data"]
const axios = require('axios');
const client = axios.create({
baseURL: 'https://inlobo.com/api/v1/whatsapp',
headers: {
Authorization: 'Bearer wak_xxx...',
'Content-Type': 'application/json',
},
});
const { data } = await client.get('/contacts/', {
params: { opted_in: 'true', limit: 50 },
});
console.log(data.data);
await client.post('/contacts/', {
phone_number: '+919876543210',
name: 'John Doe',
tags: ['vip', 'lead'],
is_opted_in: true,
});
await client.put('/contacts/+919876543210/', {
name: 'John Updated', tags: ['vip'],
});
await client.delete('/contacts/+919876543210/');
const { data } = await client.get('/contact-groups/');
await client.post('/contact-groups/', {
name: 'VIP Customers', description: 'Top tier',
});
await client.put('/contact-groups/<id>/', { name: 'VIP Customers' });
await client.delete('/contact-groups/<id>/');
const { data } = await client.get('/auto-replies/', { params: { is_active: 'true' } });
await client.post('/auto-replies/', {
name: 'Welcome', trigger_type: 'FIRST_MESSAGE',
reply_type: 'TEXT', reply_text: 'Hi! Welcome to Inlobo.',
});
await client.put('/auto-replies/<id>/', { is_active: false });
await client.delete('/auto-replies/<id>/');
const { data } = await client.post('/messages/text/', {
to: '+919876543210', text: 'Hello from Node.js!',
});
console.log(data.data.message_id);
await client.post('/messages/template/', {
to: '+919876543210',
template_name: 'your_template',
language_code: 'en_US',
});
await client.post('/messages/media/', {
to: '+919876543210', url: 'https://example.com/brochure.pdf', caption: 'Our brochure',
});
await client.post('/messages/image/', {
to: '+919876543210', image_url: 'https://example.com/photo.jpg', caption: 'Check this',
});
await client.post('/messages/document/', {
to: '+919876543210', document_url: 'https://example.com/file.pdf', filename: 'invoice.pdf',
});
await client.post('/messages/audio/', {
to: '+919876543210', audio_url: 'https://example.com/audio.mp3',
});
await client.post('/messages/video/', {
to: '+919876543210', video_url: 'https://example.com/video.mp4', caption: 'Watch this',
});
await client.post('/messages/location/', {
to: '+919876543210', latitude: 28.6139, longitude: 77.2090, name: 'New Delhi',
});
await client.post('/messages/buttons/', {
to: '+919876543210', body: 'Choose an option:',
buttons: ['Confirm', 'Cancel', 'Talk to agent'], header: 'Order #1234',
});
const { data } = await client.get('/conversations/+919876543210/messages/', {
params: { limit: 20 },
});
const { data } = await client.get('/templates/', { params: { status: 'APPROVED' } });
const { data } = await client.get('/account/');
$key = 'wak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$base = 'https://inlobo.com/api/v1/whatsapp';
function waApi($path, $data=null, $method='GET') {
global $key, $base;
$ch = curl_init("$base$path");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $key",
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $data ? json_encode($data) : null,
]);
return json_decode(curl_exec($ch), true);
}
$res = waApi('/contacts/?opted_in=true');
print_r($res['data']);
waApi('/contacts/', [
'phone_number' => '+919876543210',
'name' => 'John Doe',
'tags' => ['vip'],
], 'POST');
waApi('/contacts/+919876543210/', ['name' => 'John Updated'], 'PUT');
waApi('/contacts/+919876543210/', null, 'DELETE');
$res = waApi('/messages/text/', [
'to' => '+919876543210',
'text' => 'Hello from PHP!',
], 'POST');
echo $res['data']['message_id'];
waApi('/messages/template/', [
'to' => '+919876543210',
'template_name' => 'your_template',
'language_code' => 'en_US',
], 'POST');
waApi('/messages/media/', [
'to' => '+919876543210',
'url' => 'https://example.com/brochure.pdf',
'caption' => 'Our brochure',
], 'POST');
waApi('/messages/buttons/', [
'to' => '+919876543210',
'body' => 'Choose an option:',
'buttons' => ['Confirm', 'Cancel'],
'header' => 'Order #1234',
], 'POST');
$res = waApi('/templates/?status=APPROVED');
$res = waApi('/account/');
echo $res['data']['phone_number'];