Introduction
The Wutt.net - Run your business on WhatsApp & Telegram. 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 Wutt.net - Run your business on WhatsApp & Telegram. 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.
https://www.wutt.net/external-api
Authentication
All requests to the Wutt.net - Run your business on WhatsApp & Telegram. 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 Wutt.net - Run your business on WhatsApp & Telegram. Dashboard under Developer Tools.
In addition to credentials, Wutt.net - Run your business on WhatsApp & Telegram. 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.
Response Format
All responses from the Wutt.net - Run your business on WhatsApp & Telegram. 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.
نموذج استجابة النجاح
{
"status": "success",
"remark": "contact_list",
"message":[
"Contact list fetched successfully"
],
"data": {
...you get all data here
}
}
استجابة نموذجية للخطأ
{
"remark": "Unauthorized",
"status": "error",
"message": [
"The client secret is required"
]
}
{
"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."
]
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
Get Contact List
This endpoint allows you to retrieve a complete list of contacts associated with your Wutt.net - Run your business on WhatsApp & Telegram. account.
معلمات الاستعلام
معلمات الاستعلام التي تسمح لك بتخصيص استجابة API.
| الاسم | وصف | مطلوب | تقصير |
|---|---|---|---|
صفحة |
يحدد رقم الصفحة المراد استرجاعها. | لا | 1 |
مرقّم الصفحات |
يحدد عدد العناصر التي يتم إرجاعها لكل صفحة. | لا | 20 |
يبحث |
يبحث عن جهات الاتصال حسب الاسم الأول أو اسم العائلة أو رقم الهاتف المحمول. | لا | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
إنشاء جهة اتصال جديدة
This endpoint allows you to add a new contact to your Wutt.net - Run your business on WhatsApp & Telegram. account. Provide the necessary contact details, and upon successful request, the API returns the created contact’s information in JSON format for easy integration.
الحقول المطلوبة
الحقول التالية مطلوبة لإنشاء جهة اتصال جديدة في النظام.
| الاسم | مطلوب | تقصير |
|---|---|---|
الاسم الأول |
نعم | - |
اسم العائلة |
نعم | - |
mobile_code |
نعم | - |
متحرك |
نعم | - |
مدينة |
لا | - |
ولاية |
لا | - |
شفرة البريد |
لا | - |
عنوان |
لا | - |
Profile_image |
لا | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
تحديث جهة الاتصال
تتيح لك نقطة النهاية هذه تحديث جهة اتصال موجودة. ما عليك سوى إرسال الحقول التي تريد تعديلها. أي حقل غير مدرج في الطلب سيبقى دون تغيير.
الحقول المطلوبة
الحقول التالية مطلوبة لإنشاء جهة اتصال جديدة في النظام.
| الاسم | مطلوب | تقصير |
|---|---|---|
الاسم الأول |
نعم | - |
اسم العائلة |
نعم | - |
mobile_code |
نعم | - |
متحرك |
نعم | - |
مدينة |
لا | - |
ولاية |
لا | - |
شفرة البريد |
لا | - |
عنوان |
لا | - |
Profile_image |
لا | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
حذف جهة الاتصال
تسمح لك نقطة النهاية هذه بحذف جهة اتصال بواسطة المعرف الفريد الخاص بها. قد يتم تقييد الحذف إذا كانت جهة الاتصال تحتوي على رسائل مرتبطة أو تم حظرها.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
قائمة المحادثات
استرداد قائمة محادثات مرقّمة للمستخدم المصادق عليه، بما في ذلك معلومات الاتصال وحالة المحادثة.
معلمات الاستعلام
| الاسم | وصف | تقصير |
|---|---|---|
status |
تصفية المحادثات حسب الحالة. استخدم القيمة أدناه لتصفية المحادثة عبر الحالة. Done = 1; Pending = 2; Important = 3; Unread = 4; | الجميع |
صفحة |
يحدد رقم الصفحة المراد استرجاعها. | 1 |
مرقّم الصفحات |
يحدد عدد العناصر التي يتم إرجاعها لكل صفحة. | 20 |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
تغيير حالة المحادثة
قم بتحديث حالة المحادثة مثل معلقة أو تم أو مهمة. تم هنا = 1، معلق = 2 ومهم = 3، غير مقروء = 4
URL المعلمات
| المعلمة | يكتب | وصف |
|---|---|---|
conversation_id |
integer | المعرف الفريد للمحادثة |
هيئة الطلب
| مجال | يكتب | مطلوب |
|---|---|---|
status |
integer | YEs |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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 المعلمات
| المعلمة | يكتب | وصف |
|---|---|---|
conversation_id |
integer | المعرف الفريد للمحادثة |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
إرسال الرسالة
أرسل رسائل واتس اب إلى رقم الجوال. تدعم نقطة النهاية هذه النص والوسائط والموقع والقوائم التفاعلية وعناوين URL CTA ورسائل التجارة الإلكترونية. إذا لم يتم العثور على جهة اتصال أو محادثة موجودة لرقم الهاتف المقدم، فسيتم إنشاء جهة اتصال ومحادثة جديدة تلقائيًا.
هيئة الطلب
| مجال | يكتب | مطلوب | وصف |
|---|---|---|---|
mobile_code |
string | yes | رمز البلد المحمول. يجب أن يكون رمز بلد رقميًا صالحًا بدون علامة الزائد (+). |
mobile |
string | yes | رقم هاتف محمول صالح مرتبط برمز البلد المقدم. |
from_number |
string | conditional | مطلوب رقم هاتف واتس اب Business صالح مسجل في حسابك وفي لوحة معلومات Meta. إذا لم يتم توفير معرف، فسيتم إرسال الرسالة باستخدام حساب واتس اب الافتراضي المسجل لديك. |
message |
string | Conditional | نص الرسالة النصية. مطلوب في حالة عدم توفير وسائط أو موقع أو بيانات تفاعلية |
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 | خط العرض لرسالة الموقع |
longitude |
decimal | Conditional | خط الطول لرسالة الموقع |
cta_url_id |
integer | No | معرف CTA URL لرسائل الزر التفاعلية |
interactive_list_id |
integer | No | معرف القائمة التفاعلية |
ملحوظات
يجب توفير نوع رسالة واحد على الأقل.
تتطلب الرسائل التفاعلية خطة نشطة.
لا يمكن لجهات الاتصال المحظورة إرسال الرسائل أو استقبالها.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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('mobile_code' => '880','mobile' => 'xxxxxx','testmplate_id' => 'your template id'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
إرسال رسالة القالب
أرسل رسالة قالب واتس اب معتمدة إلى محادثة موجودة. يتم استخدام رسائل القالب بشكل شائع للإشعارات والتنبيهات والاتصالات التي تبدأها الأعمال.
هيئة الطلب
| مجال | يكتب | مطلوب | وصف |
|---|---|---|---|
mobile_code |
string | yes | رمز البلد المحمول. يجب أن يكون رمز بلد رقميًا صالحًا بدون علامة الزائد (+). |
mobile |
string | yes | رقم هاتف محمول صالح مرتبط برمز البلد المقدم. |
from_number |
string | conditional | مطلوب رقم هاتف واتس اب Business صالح مسجل في حسابك وفي لوحة معلومات Meta. إذا لم يتم توفير معرف، فسيتم إرسال الرسالة باستخدام حساب واتس اب الافتراضي المسجل لديك. |
template_id |
integer | Yes | معرف قالب واتس اب المعتمد |
ملحوظات
يمكن إرسال نماذج واتس اب المعتمدة فقط.
تُستخدم رسائل النماذج عادةً للمحادثات التي تبدأها الأعمال.
لا يمكن لجهات الاتصال المحظورة تلقي رسائل القالب.
يجب أن يكون حساب واتس اب متصلاً قبل إرسال الرسائل.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wutt.net/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;
الحصول على قائمة القوالب
تتيح لك نقطة النهاية هذه جلب كافة قوالب واتس اب المرتبطة بحسابك.