The WaFi - Whatsapp Business API Platform API follows RESTful architecture standards, offering clear and consistent resource-based endpoints. All requests and responses are transmitted in JSON format, leveraging standard HTTP verbs, status codes, and authentication protocols to enable secure, efficient, and scalable integrations.

API Base URL

Please note that WaFi - Whatsapp Business API Platform does not provide a sandbox or test environment. All API requests are processed in the live environment, so ensure that all request data and parameters are accurate before making any calls.

string
https://wa.fihd.in/external-api

All requests to the WaFi - Whatsapp Business API Platform API require authentication. Each API request must include a valid client-id and client-secret to the request header, which can be obtained from your WaFi - Whatsapp Business API Platform Dashboard under Developer Tools.

In addition to credentials, WaFi - Whatsapp Business API Platform enforces IP-based security. You must register and enable your server’s public IP address in the IP Whitelist section of the dashboard. Requests originating from non-whitelisted IP addresses will be automatically rejected.

Both valid API credentials and an approved IP address are mandatory. Without completing these two steps, authentication will fail and API access will not be granted.

All responses from the WaFi - Whatsapp Business API Platform API are returned in JSON format. Each response follows a consistent structure and includes a status indicator, message, and relevant data payload when applicable. Standard HTTP status codes are used to represent the outcome of each request.

Sample Success Response

JSON
{
"status": "success",
"remark": "contact_list",
"message":[
    "Contact list fetched successfully"
],
"data": {
   ...you get all data here
    }
}
                    

Error Sample Response

JSON
{
    "remark": "Unauthorized",
    "status": "error",
    "message": [
        "The client secret is required"
    ]
}
                    
JSON
 {
    "remark": "Unauthorized",
    "status": "error",
    "message": [
        "Access to this API endpoint is restricted to IP addresses that have been explicitly whitelisted.",
        "In order to access this API endpoint, please add your IP address (::1) to the white list from the user dashboard."
    ]
}
                    
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/contact/list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

 
                                
                        
Query Parameters

Query parameters that allow you to customize the API response.

Name Description Required Default
page Specifies the page number to retrieve. No 1
paginate Defines the number of items returned per page. No 20
search Searches for contacts by firstname, lastname or mobile number. No -
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/contact/store',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('firstname' => 'John','lastname' => 'Doe','mobile_code' => '880','mobile' => '01988'),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Required Fields

The following fields are required to create a new contact in the system.

Name Required Default
firstname Yes -
lastname Yes -
mobile_code Yes -
mobile Yes -
city No -
state No -
post_code No -
address No -
profile_image No -
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/contact/update/{contactId}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('firstname' => 'John','lastname' => 'Doe','mobile_code' => '880','mobile' => '01988'),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Required Fields

The following fields are required to create a new contact in the system.

Name Required Default
firstname Yes -
lastname Yes -
mobile_code Yes -
mobile Yes -
city No -
state No -
post_code No -
address No -
profile_image No -
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/contact/delete/{contactId}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS => array('firstname' => 'John','lastname' => 'Doe','mobile_code' => '880','mobile' => '01988'),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/inbox/conversation-list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Query Parameters

Name Description Default
status Filter conversations by status. Use below value for the filter conversation via status. Done = 1; Pending = 2; Important = 3; Unread = 4; All
page Specifies the page number to retrieve. 1
paginate Defines the number of items returned per page. 20
php

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/inbox/change-conversation-status/2',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('status' => '1'),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

URL Parameters

Parameter Type Description
conversation_id integer Unique ID of the conversation

Request Body

Field Type Required
status integer YEs
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/inbox/conversation-details/2',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS => array('status' => '1'),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

URL Parameters

Parameter Type Description
conversation_id integer Unique ID of the conversation
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/inbox/send-message',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('mobile_code' => '880','mobile' => xxxxxxxxx','message' => 'Hello world'),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Request Body

Field Type Required Description
mobile_code string yes Mobile country code. Must be a valid numeric country code without the plus (+) sign.
mobile string yes A valid mobile phone number associated with the provided country code.
from_number string conditional A valid WhatsApp Business phone number registered on your account and in the Meta dashboard is required. If no ID is provided, the message will be sent using your default registered WhatsApp account.
message string Conditional Text message body. Required if no media, location, or interactive data is provided
image file No Image file (jpg, jpeg, png – max 5MB)
document file No Document file (pdf, doc, docx – max 100MB)
video file No Video file (mp4 – max 16MB)
audio file No Audio file – max 16MB
latitude decimal Conditional Latitude for location message
longitude decimal Conditional Longitude for location message
cta_url_id integer No CTA URL ID for interactive button messages
interactive_list_id integer No Interactive list ID

Notes

At least one message type must be provided.

Interactive messages require an active plan.

Blocked contacts cannot send or receive messages.

php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/inbox/send-template-message',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array(
    'conversation_id'  => '123',
    'template_id'      => '45',
    'body_variables[]' => 'John',
    // Add more body_variables[] for 2, 3 etc.
    // 'header_variables[]' => 'Header value',
    // 'button_variables[]' => 'dynamic-url-suffix',
  ),
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Request Body

Field Type Required Description
conversation_id integer Yes The ID of an existing conversation. Retrieve this from the Conversation List endpoint.
template_id integer Yes The internal ID of an approved WhatsApp template. Retrieve this from the Get Template List endpoint.
body_variables array No Array of values to fill in the template body variables , , etc. Pass values in order.
header_variables array No Array of values to fill in the template header variable . Only applies to text-type headers with a variable.
button_variables array No Array of values for URL button variables . Each entry corresponds to a URL button in the template by index order.

Notes

Only approved WhatsApp templates can be sent.

Blocked contacts cannot receive template messages.

The conversation must belong to your account.

To send to a mobile number directly without a conversation, use the Send Template Direct endpoint.

php

// Simple template (no variables)
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/api/templates/send',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => json_encode([
    'whatsapp_account_id' => 'YOUR-WABA-ID',
    'template_name'       => 'your_template_name',
    'mobile_number'       => '+919876543210',
  ]),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer YOUR-API-KEY',
    'Content-Type: application/json',
  ),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;


// Template with body + button variables
$postData = [
  'whatsapp_account_id' => 'YOUR-WABA-ID',
  'template_name'       => 'order_confirmed',
  'mobile_number'       => '+919876543210',
  'body_variables'      => ['John', 'ORD-4521', '₹1,299'],
  'button_variables'    => ['ORD-4521'],
];

curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($postData));
Authentication: This endpoint uses your personal API key (not client-id/client-secret). Pass it as a Bearer token in the Authorization header.
Authorization: Bearer YOUR-API-KEY
Find your API key in your dashboard under Developer Credentials.

Request Body

Field Type Required Description
whatsapp_account_id string Yes Your WhatsApp Business Account ID (WABA ID) from Meta. Found in your WhatsApp Account settings.
template_name string Yes* The exact template name as registered with Meta. Required if template_id is not provided.
template_id integer Yes* The internal template ID from this platform. Required if template_name is not provided. Use the Get Template List endpoint to find IDs.
mobile_number string Yes Recipient phone number in E.164 format including country code. Example: +919876543210
body_variables array No Array of string values to fill template body placeholders , , etc. Values must be provided in order. Max 10 values.
header_variables array No Array of string values to fill the template header placeholder . Only needed for text-type headers with a variable. Max 5 values.
button_variables array No Array of values for URL button dynamic suffixes . Each entry maps to a URL button by index. Max 3 values.

Examples

Simple template (no variables):

{
  "whatsapp_account_id": "123456789012345",
  "template_name": "welcome_message",
  "mobile_number": "+919876543210"
}

Template with body variables:

{
  "whatsapp_account_id": "123456789012345",
  "template_name": "order_confirmed",
  "mobile_number": "+919876543210",
  "body_variables": ["John", "ORD-4521", "₹1,299"]
}

→ Fills = John, = ORD-4521, = ₹1,299 in the template body.

Template with header + body + button URL variable:

{
  "whatsapp_account_id": "123456789012345",
  "template_name": "track_order",
  "mobile_number": "+919876543210",
  "header_variables": ["John"],
  "body_variables": ["ORD-4521", "2 days"],
  "button_variables": ["ORD-4521"]
}

→ Button URL becomes https://yourdomain.com/track/ORD-4521

Success Response

{
  "status": "success",
  "message": "Template sent successfully",
  "whatsapp_message_id": "wamid.XXXXXXXXXXXXXX",
  "template_name": "order_confirmed"
}

Error Response

{
  "status": "error",
  "message": "The selected whatsapp_account_id is invalid."
}

Notes

Only approved WhatsApp templates can be sent. Pending or rejected templates will return an error.

template_name and template_id are mutually exclusive — provide one, not both.

The template must belong to the specified whatsapp_account_id.

If the recipient has an existing conversation, the sent message will appear in the inbox automatically.

For sending within an existing conversation by conversation ID, use the Send Template Message endpoint instead.

php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wa.fihd.in/extern-api/inbox/template-list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;