WhatsApp Messaging API
Developer Documentation
Send WhatsApp messages and manage contacts programmatically using your own connected WhatsApp Business Account.
Authentication
All endpoints use your WhatsApp API key, generated from the Inlobo dashboard.
How to get an API key: Log in to the Inlobo dashboard → Developer Tools → Generate API key. The raw key is shown exactly once — copy and store it securely.
Errors & Response Format
All responses follow a consistent JSON envelope.
200
Success
201
Resource created
400
Validation error — check
errors field401
Invalid or missing API key
404
Resource not found
502
WhatsApp Cloud API error
Contacts
Manage your WhatsApp contact list. Requires API key.
GET
/contacts/
Get Contact List
▶
| Query Param | Type | Description |
|---|---|---|
search | string | Filter by phone or name |
opted_in | true|false | Filter by opt-in status |
group_id | UUID | Filter by contact group |
tag | string | Filter by tag |
limit | int | Page size (default 20, max 100) |
page | int | Page number |
POST
/contacts/
Add Contact
▶
| Field | Type | Required | Description |
|---|---|---|---|
phone_number | string | Yes | E.164 format e.g. +919876543210 |
name | string | No | Full name |
email | string | No | Email address |
tags | array | No | String tags e.g. ["vip", "lead"] |
custom_attributes | object | No | Key-value pairs |
is_opted_in | boolean | No | Default true |
PUT
/contacts/{phone}/
Edit Contact
▶
Partial update — only send the fields you want to change. {phone} is the E.164 phone number.
Request body
{ "name": "John Updated", "tags": ["vip"] }
DELETE
/contacts/{phone}/
Delete Contact
▶
Permanently removes the contact from your organization. Chat history is retained.
Contact Groups
Manage contact groups for targeting and segmentation.
GET
/contact-groups/
Get Contact Group List
▶
Returns all groups with their contact_count.
POST
/contact-groups/
Add Contact Group
▶
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Group name |
description | string | No | Optional description |
PUT
/contact-groups/{id}/
Edit Contact Group
▶
Request body
{ "name": "VIP Customers", "description": "Top tier" }
DELETE
/contact-groups/{id}/
Delete Contact Group
▶
Deletes the group. Contacts inside are not deleted.
Automated Replies
Configure keyword and trigger-based automatic responses.
GET
/auto-replies/
Get automated replies list
▶
| Query Param | Description |
|---|---|
is_active | true | false — filter by active status |
POST
/auto-replies/
Add automated reply
▶
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Rule label |
trigger_type | string | Yes | KEYWORD, FIRST_MESSAGE, ALWAYS, OUT_OF_HOURS |
keywords | array | No | Required when trigger_type is KEYWORD |
reply_type | string | Yes | TEXT, TEMPLATE |
reply_text | string | No | Required when reply_type is TEXT |
is_active | boolean | No | Default true |
PUT
/auto-replies/{id}/
Edit automated reply
▶
Partial update — send only the fields you want to change.
DELETE
/auto-replies/{id}/
Delete automated reply
▶
Permanently removes the auto-reply rule.
Messages
Send WhatsApp messages of any type. All endpoints return
{ "data": { "message_id": "wamid.xxx" } }.
POST
/messages/text/
Send Message
▶
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone in E.164 format |
text | string | Yes | Message body (max 4096 chars) |
preview_url | boolean | No | Show URL preview (default false) |
POST
/messages/media/
Send Media (auto-detect)
▶
Automatically detects media type from URL extension. JPG/PNG/GIF/WebP → image · MP4/3GP → video · MP3/OGG/M4A/AAC → audio · other → document.
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone |
url | URL | Yes | Publicly accessible media URL |
caption | string | No | Caption text |
POST
/messages/template/
Send Template Message
▶
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone |
template_name | string | Yes | Approved template name |
language_code | string | No | Default en_US |
components | array | No | Variable substitutions per Meta spec |
POST
/messages/image/
Send Image
▶
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient phone |
image_url | Yes | Public JPG/PNG/GIF/WebP URL |
caption | No | Caption text |
POST
/messages/document/
Send Document
▶
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient phone |
document_url | Yes | Public PDF/DOC/XLSX etc. URL |
filename | No | Display filename |
caption | No | Caption text |
POST
/messages/audio/
Send Audio
▶
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient phone |
audio_url | Yes | Public MP3/OGG/M4A/AAC URL |
POST
/messages/video/
Send Video
▶
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient phone |
video_url | Yes | Public MP4/3GP URL |
caption | No | Caption text |
POST
/messages/location/
Send Location
▶
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient phone |
latitude | Yes | Decimal latitude |
longitude | Yes | Decimal longitude |
name | No | Location name |
address | No | Address text |
POST
/messages/buttons/
Send Interactive Buttons
▶
| Field | Required | Description |
|---|---|---|
to | Yes | Recipient phone |
body | Yes | Message body |
buttons | Yes | 1–3 button labels (max 20 chars each) |
header | No | Header text |
footer | No | Footer text |
Request body
{ "to": "+919876543210",
"body": "Choose an option:",
"buttons": ["Confirm", "Cancel", "Talk to agent"],
"header": "Order #1234",
"footer": "Reply expires in 24h" }
GET
/conversations/{phone}/messages/
Get conversation messages
▶
Returns message history for a contact (newest first). {phone} is the E.164 phone number.
| Query Param | Description |
|---|---|
limit | Page size (default 20) |
page | Page number |
Templates
List your Meta-approved WhatsApp message templates.
GET
/templates/
List templates
▶
| Query Param | Description |
|---|---|
status | APPROVED | PENDING | REJECTED |
category | MARKETING | UTILITY | AUTHENTICATION |
language | e.g. en_US, hi, ar |
Account
Retrieve info about the WhatsApp account linked to your API key.
GET
/account/
Get account info
▶
200 OK
{ "success": true,
"data": {
"phone_number": "+919876543210",
"display_name": "My Business",
"business_name": "My Business Pvt Ltd",
"quality_rating": "GREEN",
"messaging_limit": "TIER_1K"
}
}
CURL
PYTHON
NODEJS
PHP
JAVA
RUBY
Contacts — Get List
curl -X GET \ 'https://inlobo.com/api/v1/whatsapp/contacts/?opted_in=true' \ -H 'Authorization: Bearer wak_xxx...'
Contacts — Add Contact
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"}'
Messages — Send Text
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!"}'
Messages — Send Template
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":"order_confirmation", "language_code":"en_US", "components":[{"type":"body","parameters":[ {"type":"text","text":"John"} ]}]}'
Messages — Send Media
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 latest brochure"}'
Keys — Generate API Key
curl -X POST \ 'https://inlobo.com/api/v1/whatsapp/keys/' \ -H 'Authorization: Bearer <jwt_token>' \ -H 'Content-Type: application/json' \ -d '{"name":"Production Key","account_id":"uuid..."}'
Setup
import requests API_KEY = "wak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" BASE = "https://inlobo.com/api/v1/whatsapp" H = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json", }
Contacts — Get List
res = requests.get( f"{BASE}/contacts/", headers=H, params={"opted_in": "true", "limit": 50}, ) contacts = res.json()["data"]
Contacts — Add Contact
requests.post( f"{BASE}/contacts/", headers=H, json={ "phone_number": "+919876543210", "name": "John Doe", "tags": ["vip", "lead"], "is_opted_in": True, }, )
Messages — Send Text
res = requests.post( f"{BASE}/messages/text/", headers=H, json={ "to": "+919876543210", "text": "Hello from Python!", }, ) print(res.json()["data"]["message_id"])
Messages — Send Template
requests.post( f"{BASE}/messages/template/", headers=H, json={ "to": "+919876543210", "template_name": "order_confirmation", "language_code": "en_US", "components": [{ "type": "body", "parameters": [ {"type": "text", "text": "John"}, {"type": "text", "text": "#ORD-1234"}, ], }], }, )
Setup
const axios = require('axios'); const client = axios.create({ baseURL: 'https://inlobo.com/api/v1/whatsapp', headers: { Authorization: 'Bearer wak_xxx...', 'Content-Type': 'application/json', }, });
Contacts — Get List
const { data } = await client.get('/contacts/', { params: { opted_in: 'true', limit: 50 }, }); console.log(data.data);
Messages — Send Text
const { data } = await client.post('/messages/text/', { to: '+919876543210', text: 'Hello from Node.js!', }); console.log(data.data.message_id);
Messages — Send Template
await client.post('/messages/template/', { to: '+919876543210', template_name: 'order_confirmation', language_code: 'en_US', components: [{ type: 'body', parameters: [ { type: 'text', text: 'John' }, { type: 'text', text: '#ORD-1234' }, ], }], });
Keys — Generate API Key
const jwtClient = axios.create({ baseURL: 'https://inlobo.com/api/v1/whatsapp', headers: { Authorization: 'Bearer <jwt_token>' }, }); const { data } = await jwtClient.post('/keys/', { name: 'Production Key', account_id: 'uuid...', }); console.log('Save this key now:', data.data.key);
Setup
$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); }
Messages — Send Text
$res = waApi('/messages/text/', [ 'to' => '+919876543210', 'text' => 'Hello from PHP!', ], 'POST'); echo $res['data']['message_id'];
Contacts — Add Contact
waApi('/contacts/', [ 'phone_number' => '+919876543210', 'name' => 'John Doe', 'tags' => ['vip'], ], 'POST');
Messages — Send Text
import java.net.http.*; import java.net.URI; String key = "wak_xxx..."; String body = """ {"to":"+919876543210","text":"Hello from Java!"} """; HttpClient client = HttpClient.newHttpClient(); HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://inlobo.com/api/v1/whatsapp/messages/text/")) .header("Authorization", "Bearer " + key) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)) .build(); HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString()); System.out.println(res.body());
Contacts — Get List
HttpRequest req = HttpRequest.newBuilder() .uri(URI.create( "https://inlobo.com/api/v1/whatsapp/contacts/?opted_in=true")) .header("Authorization", "Bearer " + key) .GET() .build();
Setup
require 'net/http' require 'json' require 'uri' API_KEY = 'wak_xxx...' BASE = 'https://inlobo.com/api/v1/whatsapp' def wa_post(path, body) uri = URI("#{BASE}#{path}") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true req = Net::HTTP::Post.new(uri) req['Authorization'] = "Bearer #{API_KEY}" req['Content-Type'] = 'application/json' req.body = body.to_json JSON.parse(http.request(req).body) end
Messages — Send Text
res = wa_post('/messages/text/', { to: '+919876543210', text: 'Hello from Ruby!' }) puts res['data']['message_id']
Contacts — Add Contact
wa_post('/contacts/', { phone_number: '+919876543210', name: 'John Doe', tags: ['vip'] })