WhatsApp Messaging API

Developer Documentation

Send WhatsApp messages and manage contacts programmatically using your own connected WhatsApp Business Account.

Base URL https://inlobo.com/api/v1/whatsapp
Authentication
All endpoints use your WhatsApp API key, generated from the Inlobo dashboard.

All endpoints

Pass your API key in every request — Authorization: Bearer wak_<your_key>

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 field
401
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 ParamTypeDescription
searchstringFilter by phone or name
opted_intrue|falseFilter by opt-in status
group_idUUIDFilter by contact group
tagstringFilter by tag
limitintPage size (default 20, max 100)
pageintPage number
POST /contacts/ Add Contact
FieldTypeRequiredDescription
phone_numberstringYesE.164 format e.g. +919876543210
namestringNoFull name
emailstringNoEmail address
tagsarrayNoString tags e.g. ["vip", "lead"]
custom_attributesobjectNoKey-value pairs
is_opted_inbooleanNoDefault 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
FieldTypeRequiredDescription
namestringYesGroup name
descriptionstringNoOptional 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 ParamDescription
is_activetrue | false — filter by active status
POST /auto-replies/ Add automated reply
FieldTypeRequiredDescription
namestringYesRule label
trigger_typestringYesKEYWORD, FIRST_MESSAGE, ALWAYS, OUT_OF_HOURS
keywordsarrayNoRequired when trigger_type is KEYWORD
reply_typestringYesTEXT, TEMPLATE
reply_textstringNoRequired when reply_type is TEXT
is_activebooleanNoDefault 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
FieldTypeRequiredDescription
tostringYesRecipient phone in E.164 format
textstringYesMessage body (max 4096 chars)
preview_urlbooleanNoShow 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.

FieldTypeRequiredDescription
tostringYesRecipient phone
urlURLYesPublicly accessible media URL
captionstringNoCaption text
POST /messages/template/ Send Template Message
FieldTypeRequiredDescription
tostringYesRecipient phone
template_namestringYesApproved template name
language_codestringNoDefault en_US
componentsarrayNoVariable substitutions per Meta spec
POST /messages/image/ Send Image
FieldRequiredDescription
toYesRecipient phone
image_urlYesPublic JPG/PNG/GIF/WebP URL
captionNoCaption text
POST /messages/document/ Send Document
FieldRequiredDescription
toYesRecipient phone
document_urlYesPublic PDF/DOC/XLSX etc. URL
filenameNoDisplay filename
captionNoCaption text
POST /messages/audio/ Send Audio
FieldRequiredDescription
toYesRecipient phone
audio_urlYesPublic MP3/OGG/M4A/AAC URL
POST /messages/video/ Send Video
FieldRequiredDescription
toYesRecipient phone
video_urlYesPublic MP4/3GP URL
captionNoCaption text
POST /messages/location/ Send Location
FieldRequiredDescription
toYesRecipient phone
latitudeYesDecimal latitude
longitudeYesDecimal longitude
nameNoLocation name
addressNoAddress text
POST /messages/buttons/ Send Interactive Buttons
FieldRequiredDescription
toYesRecipient phone
bodyYesMessage body
buttonsYes1–3 button labels (max 20 chars each)
headerNoHeader text
footerNoFooter 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 ParamDescription
limitPage size (default 20)
pagePage number
Templates
List your Meta-approved WhatsApp message templates.
GET /templates/ List templates
Query ParamDescription
statusAPPROVED | PENDING | REJECTED
categoryMARKETING | UTILITY | AUTHENTICATION
languagee.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']
})