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 in E.164 format e.g. +919876543210
template_namestringYesApproved template name (lowercase, underscores only)
language_codestringNoDefault en_US — must match the template's registered language exactly (e.g. en_US, hi, en)
componentsarrayNoVariable substitutions — list of component objects (body, header, button)
Standard template — body variable only
{
  "to": "+919876543210",
  "template_name": "order_confirmation",
  "language_code": "en_US",
  "components": [
    {
      "type": "body",
      "parameters": [
        { "type": "text", "text": "Jane" },
        { "type": "text", "text": "#ORD-9821" }
      ]
    }
  ]
}
⚠️ Authentication / OTP templates — extra component required
Meta's Authentication category templates include a BUTTONS component with a URL button whose suffix is a variable (e.g. otp1). You must pass a button component entry in addition to the body component, supplying the OTP value for the URL too. Omitting it causes Meta to return "Template name does not exist in the translation" even when the template is approved.
Authentication template — body + button (OTP / Copy Code)
{
  "to": "+919876543210",
  "template_name": "your_otp_template",
  "language_code": "en_US",
  "components": [
    {
      "type": "body",
      "parameters": [
        { "type": "text", "text": "483920" }
      ]
    },
    {
      "type": "button",
      "sub_type": "url",
      "index": "0",
      "parameters": [
        { "type": "text", "text": "483920" }
      ]
    }
  ]
}

The button.parameters[0].text value fills in the 1 suffix of the Copy Code URL (e.g. the template URL …?code=otp1 becomes …?code=otp483920). index is zero-based and refers to the button's position in the template.

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","tags":["vip"],"is_opted_in":true}'
Contacts — Edit Contact
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"]}'
Contacts — Delete Contact
curl -X DELETE \
  'https://inlobo.com/api/v1/whatsapp/contacts/+919876543210/' \
  -H 'Authorization: Bearer wak_xxx...'
Groups — Get List
curl -X GET \
  'https://inlobo.com/api/v1/whatsapp/contact-groups/' \
  -H 'Authorization: Bearer wak_xxx...'
Groups — Add Group
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"}'
Groups — Edit Group
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"}'
Groups — Delete Group
curl -X DELETE \
  'https://inlobo.com/api/v1/whatsapp/contact-groups/<id>/' \
  -H 'Authorization: Bearer wak_xxx...'
Auto Replies — Get List
curl -X GET \
  'https://inlobo.com/api/v1/whatsapp/auto-replies/?is_active=true' \
  -H 'Authorization: Bearer wak_xxx...'
Auto Replies — Add Reply
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."}'
Auto Replies — Edit Reply
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}'
Auto Replies — Delete Reply
curl -X DELETE \
  'https://inlobo.com/api/v1/whatsapp/auto-replies/<id>/' \
  -H 'Authorization: Bearer wak_xxx...'
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":"your_template","language_code":"en_US"}'
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 brochure"}'
Messages — Send Image
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"}'
Messages — Send Document
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"}'
Messages — Send Audio
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"}'
Messages — Send Video
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"}'
Messages — Send Location
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"}'
Messages — Send Buttons
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"}'
Messages — Get Conversation
curl -X GET \
  'https://inlobo.com/api/v1/whatsapp/conversations/+919876543210/messages/?limit=20' \
  -H 'Authorization: Bearer wak_xxx...'
Templates — List
curl -X GET \
  'https://inlobo.com/api/v1/whatsapp/templates/?status=APPROVED' \
  -H 'Authorization: Bearer wak_xxx...'
Account — Get Info
curl -X GET \
  'https://inlobo.com/api/v1/whatsapp/account/' \
  -H 'Authorization: Bearer wak_xxx...'
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,
    },
)
Contacts — Edit Contact
requests.put(
    f"{BASE}/contacts/+919876543210/",
    headers=H,
    json={"name": "John Updated", "tags": ["vip"]},
)
Contacts — Delete Contact
requests.delete(
    f"{BASE}/contacts/+919876543210/",
    headers=H,
)
Groups — Get List
groups = requests.get(f"{BASE}/contact-groups/", headers=H).json()["data"]
Groups — Add Group
requests.post(
    f"{BASE}/contact-groups/",
    headers=H,
    json={"name": "VIP Customers", "description": "Top tier"},
)
Groups — Edit Group
requests.put(
    f"{BASE}/contact-groups/<id>/",
    headers=H,
    json={"name": "VIP Customers"},
)
Groups — Delete Group
requests.delete(f"{BASE}/contact-groups/<id>/", headers=H)
Auto Replies — Get List
replies = requests.get(
    f"{BASE}/auto-replies/",
    headers=H,
    params={"is_active": "true"},
).json()["data"]
Auto Replies — Add Reply
requests.post(
    f"{BASE}/auto-replies/",
    headers=H,
    json={
        "name":         "Welcome",
        "trigger_type": "FIRST_MESSAGE",
        "reply_type":   "TEXT",
        "reply_text":   "Hi! Welcome to Inlobo.",
    },
)
Auto Replies — Edit Reply
requests.put(
    f"{BASE}/auto-replies/<id>/",
    headers=H,
    json={"is_active": False},
)
Auto Replies — Delete Reply
requests.delete(f"{BASE}/auto-replies/<id>/", headers=H)
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": "your_template",
        "language_code": "en_US",
    },
)
Messages — Send Media
requests.post(
    f"{BASE}/messages/media/",
    headers=H,
    json={"to": "+919876543210", "url": "https://example.com/brochure.pdf", "caption": "Our brochure"},
)
Messages — Send Image
requests.post(
    f"{BASE}/messages/image/",
    headers=H,
    json={"to": "+919876543210", "image_url": "https://example.com/photo.jpg", "caption": "Check this"},
)
Messages — Send Document
requests.post(
    f"{BASE}/messages/document/",
    headers=H,
    json={"to": "+919876543210", "document_url": "https://example.com/file.pdf", "filename": "invoice.pdf"},
)
Messages — Send Audio
requests.post(
    f"{BASE}/messages/audio/",
    headers=H,
    json={"to": "+919876543210", "audio_url": "https://example.com/audio.mp3"},
)
Messages — Send Video
requests.post(
    f"{BASE}/messages/video/",
    headers=H,
    json={"to": "+919876543210", "video_url": "https://example.com/video.mp4", "caption": "Watch this"},
)
Messages — Send Location
requests.post(
    f"{BASE}/messages/location/",
    headers=H,
    json={"to": "+919876543210", "latitude": 28.6139, "longitude": 77.2090, "name": "New Delhi"},
)
Messages — Send Buttons
requests.post(
    f"{BASE}/messages/buttons/",
    headers=H,
    json={
        "to":      "+919876543210",
        "body":    "Choose an option:",
        "buttons": ["Confirm", "Cancel", "Talk to agent"],
        "header":  "Order #1234",
    },
)
Messages — Get Conversation
msgs = requests.get(
    f"{BASE}/conversations/+919876543210/messages/",
    headers=H,
    params={"limit": 20},
).json()["data"]
Templates — List
templates = requests.get(
    f"{BASE}/templates/",
    headers=H,
    params={"status": "APPROVED"},
).json()["data"]
Account — Get Info
account = requests.get(f"{BASE}/account/", headers=H).json()["data"]
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);
Contacts — Add Contact
await client.post('/contacts/', {
  phone_number: '+919876543210',
  name: 'John Doe',
  tags: ['vip', 'lead'],
  is_opted_in: true,
});
Contacts — Edit Contact
await client.put('/contacts/+919876543210/', {
  name: 'John Updated', tags: ['vip'],
});
Contacts — Delete Contact
await client.delete('/contacts/+919876543210/');
Groups — Get List
const { data } = await client.get('/contact-groups/');
Groups — Add Group
await client.post('/contact-groups/', {
  name: 'VIP Customers', description: 'Top tier',
});
Groups — Edit Group
await client.put('/contact-groups/<id>/', { name: 'VIP Customers' });
Groups — Delete Group
await client.delete('/contact-groups/<id>/');
Auto Replies — Get List
const { data } = await client.get('/auto-replies/', { params: { is_active: 'true' } });
Auto Replies — Add Reply
await client.post('/auto-replies/', {
  name: 'Welcome', trigger_type: 'FIRST_MESSAGE',
  reply_type: 'TEXT', reply_text: 'Hi! Welcome to Inlobo.',
});
Auto Replies — Edit Reply
await client.put('/auto-replies/<id>/', { is_active: false });
Auto Replies — Delete Reply
await client.delete('/auto-replies/<id>/');
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: 'your_template',
  language_code: 'en_US',
});
Messages — Send Media
await client.post('/messages/media/', {
  to: '+919876543210', url: 'https://example.com/brochure.pdf', caption: 'Our brochure',
});
Messages — Send Image
await client.post('/messages/image/', {
  to: '+919876543210', image_url: 'https://example.com/photo.jpg', caption: 'Check this',
});
Messages — Send Document
await client.post('/messages/document/', {
  to: '+919876543210', document_url: 'https://example.com/file.pdf', filename: 'invoice.pdf',
});
Messages — Send Audio
await client.post('/messages/audio/', {
  to: '+919876543210', audio_url: 'https://example.com/audio.mp3',
});
Messages — Send Video
await client.post('/messages/video/', {
  to: '+919876543210', video_url: 'https://example.com/video.mp4', caption: 'Watch this',
});
Messages — Send Location
await client.post('/messages/location/', {
  to: '+919876543210', latitude: 28.6139, longitude: 77.2090, name: 'New Delhi',
});
Messages — Send Buttons
await client.post('/messages/buttons/', {
  to: '+919876543210', body: 'Choose an option:',
  buttons: ['Confirm', 'Cancel', 'Talk to agent'], header: 'Order #1234',
});
Messages — Get Conversation
const { data } = await client.get('/conversations/+919876543210/messages/', {
  params: { limit: 20 },
});
Templates — List
const { data } = await client.get('/templates/', { params: { status: 'APPROVED' } });
Account — Get Info
const { data } = await client.get('/account/');
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);
}
Contacts — Get List
$res = waApi('/contacts/?opted_in=true');
print_r($res['data']);
Contacts — Add Contact
waApi('/contacts/', [
    'phone_number' => '+919876543210',
    'name'         => 'John Doe',
    'tags'         => ['vip'],
], 'POST');
Contacts — Edit Contact
waApi('/contacts/+919876543210/', ['name' => 'John Updated'], 'PUT');
Contacts — Delete Contact
waApi('/contacts/+919876543210/', null, 'DELETE');
Messages — Send Text
$res = waApi('/messages/text/', [
    'to'   => '+919876543210',
    'text' => 'Hello from PHP!',
], 'POST');
echo $res['data']['message_id'];
Messages — Send Template
waApi('/messages/template/', [
    'to'            => '+919876543210',
    'template_name' => 'your_template',
    'language_code' => 'en_US',
], 'POST');
Messages — Send Media
waApi('/messages/media/', [
    'to'      => '+919876543210',
    'url'     => 'https://example.com/brochure.pdf',
    'caption' => 'Our brochure',
], 'POST');
Messages — Send Buttons
waApi('/messages/buttons/', [
    'to'      => '+919876543210',
    'body'    => 'Choose an option:',
    'buttons' => ['Confirm', 'Cancel'],
    'header'  => 'Order #1234',
], 'POST');
Templates — List
$res = waApi('/templates/?status=APPROVED');
Account — Get Info
$res = waApi('/account/');
echo $res['data']['phone_number'];
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']
})