تتيح لك واجهة REST API إدارة جهات اتصال واتساب والقوائم والقوالب والحملات والردود التلقائية والرسائل برمجيًا.
يجب أن يتضمن كل طلب رمز Bearer يُنشأ من الإعدادات ← رموز API داخل لوحة العميل. تقتصر رموز أعضاء الفريق على الوحدات المصرح لهم بها.
تقبل نقاط نهاية القوائم معامل per_page (القيمة الافتراضية 25)، وتعيد كائنات data وlinks وmeta.
| الحالة | المعنى |
|---|---|
| 401 | رمز المصادقة مفقود أو غير صالح. |
| 402 | اشتراك الحساب غير موجود أو انتهت صلاحيته. |
| 403 | مستخدم الرمز لا يملك صلاحية الوصول إلى هذه الوحدة. |
| 404 | السجل غير موجود أو يتبع حسابًا آخر. |
| 422 | فشل التحقق؛ تحتوي الاستجابة على كائن errors مرتب حسب أسماء الحقول. |
هنا ينعكس اتجاه الاتصال: بدلًا من أن يستدعي نظامك واجهتنا، نستدعي نظامك عند تطابق رسالة واتساب واردة مع رد تلقائي مضبوط على وضع Webhook. استخدمه للقرارات الديناميكية مثل التحقق من رمز أو سجل أو حالة مباشرة.
{
"auto_reply_id": 7,
"auto_reply_name": "Certificate Check",
"from": "+966501234567",
"contact_name": "Ahmed Al-Otaibi",
"message": "is certificate 123 valid?",
"triggered_at": "2026-07-22T14:00:00+00:00"
}
قيمة hmac هي توقيع HMAC-SHA256 لمحتوى JSON الخام باستخدام webhook_secret. أعد حساب التوقيع وقارنه بطريقة ثابتة الزمن قبل الوثوق بالبيانات.
{
"reply": "Certificate #123 is valid, issued 2026-01-10."
}
{
"reply": null
}
التحقق من صلاحية الرمز ومعرفة الحساب التابع له.
عرض بيانات المستخدم الحالي للرمز
curl --request GET 'https://bot.netrogrp.com/api/v1/user' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"id": 1,
"name": "Ahmed Al-Otaibi",
"email": "[email protected]",
"created_at": "...",
"updated_at": "..."
}
إدارة جهات اتصال واتساب المحفوظة وتنظيمها داخل قوائم الاتصال.
عرض جهات الاتصال
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/contacts' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 1,
"name": "Ahmed Al-Otaibi",
"phone": "+966501234567",
"country": "SA",
"photo_url": null,
"contact_lists": [],
"created_at": "2026-07-20T09:12:00.000000Z",
"updated_at": "2026-07-20T09:12:00.000000Z"
}
],
"links": {
"first": "...",
"last": "...",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
إنشاء جهة اتصال
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | نعم | Contact display name. |
| phone | string | نعم | Phone number, digits with or without a leading +. |
| country | string | لا | 2-letter ISO country code. |
| contact_list_ids | integer[] | لا | IDs of your own contact lists to attach this contact to. |
curl --request POST 'https://bot.netrogrp.com/api/v1/contacts' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"Ahmed Al-Otaibi","phone":"+966501234567","country":"SA","contact_list_ids":[3]}'
{
"data": {
"id": 1,
"name": "Ahmed Al-Otaibi",
"phone": "+966501234567",
"country": "SA",
"photo_url": null,
"contact_lists": [
{
"id": 3,
"name": "VIP Customers",
"contacts_count": null,
"created_at": "...",
"updated_at": "..."
}
],
"created_at": "2026-07-22T10:00:00.000000Z",
"updated_at": "2026-07-22T10:00:00.000000Z"
}
}
عرض جهة اتصال واحدة
curl --request GET 'https://bot.netrogrp.com/api/v1/contacts/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 1,
"name": "Ahmed Al-Otaibi",
"phone": "+966501234567",
"country": "SA",
"photo_url": null,
"contact_lists": [],
"created_at": "...",
"updated_at": "..."
}
}
تحديث جهة اتصال
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | لا | Contact display name. |
| phone | string | لا | Phone number. |
| country | string | لا | 2-letter ISO country code. |
| contact_list_ids | integer[] | لا | Replaces the full set of attached contact lists. |
curl --request PUT 'https://bot.netrogrp.com/api/v1/contacts/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"Ahmed Al-Otaibi (Updated)"}'
{
"data": {
"id": 1,
"name": "Ahmed Al-Otaibi (Updated)",
"phone": "+966501234567",
"country": "SA",
"photo_url": null,
"contact_lists": [],
"created_at": "...",
"updated_at": "..."
}
}
حذف جهة اتصال
curl --request DELETE 'https://bot.netrogrp.com/api/v1/contacts/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
مجموعات جهات الاتصال المستخدمة لاستهداف حملات واتساب.
عرض قوائم الاتصال
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/contact-lists' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 3,
"name": "VIP Customers",
"contacts_count": 42,
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
إنشاء قائمة اتصال
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | نعم | List name. |
curl --request POST 'https://bot.netrogrp.com/api/v1/contact-lists' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"VIP Customers"}'
{
"data": {
"id": 3,
"name": "VIP Customers",
"contacts_count": 0,
"created_at": "...",
"updated_at": "..."
}
}
عرض قائمة اتصال واحدة
curl --request GET 'https://bot.netrogrp.com/api/v1/contact-lists/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 3,
"name": "VIP Customers",
"contacts_count": 42,
"created_at": "...",
"updated_at": "..."
}
}
إعادة تسمية قائمة اتصال
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | نعم | List name. |
curl --request PUT 'https://bot.netrogrp.com/api/v1/contact-lists/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"VIP Customers 2026"}'
{
"data": {
"id": 3,
"name": "VIP Customers 2026",
"contacts_count": 42,
"created_at": "...",
"updated_at": "..."
}
}
حذف قائمة اتصال
curl --request DELETE 'https://bot.netrogrp.com/api/v1/contact-lists/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
ردود آلية تُشغّلها الكلمات المفتاحية في رسائل واتساب الواردة.
عرض الردود التلقائية
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/auto-replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 5,
"name": "Working Hours",
"match_type": "any",
"trigger": null,
"reply_mode": "static",
"reply_message": "We're open 9am-6pm Sat-Thu.",
"webhook_url": null,
"webhook_secret": null,
"is_active": true,
"priority": 10,
"created_at": "...",
"updated_at": "..."
},
{
"id": 7,
"name": "Certificate Check",
"match_type": "any",
"trigger": null,
"reply_mode": "webhook",
"reply_message": null,
"webhook_url": "https://partner.example.com/webhooks/whatsapp",
"webhook_secret": "a1b2c3...",
"is_active": true,
"priority": 20,
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
إنشاء رد تلقائي ثابت
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | نعم | Internal label for this rule. |
| match_type | string | نعم | One of any, exact, starts_with, contains. |
| trigger | string | unless match_type is any | The text to match against the inbound message. |
| reply_mode | string | لا | static (default) or webhook. |
| reply_message | string | if reply_mode=static | The freeform text sent back automatically. |
| webhook_url | string | if reply_mode=webhook | URL we POST the inbound message to. |
| is_active | boolean | لا | Defaults to true. |
| priority | integer | لا | Higher priority rules are checked first. |
curl --request POST 'https://bot.netrogrp.com/api/v1/auto-replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"Pricing Question","match_type":"contains","trigger":"price","reply_message":"Our pricing starts at 99 SAR/month, ask us for a quote!","priority":5}'
{
"data": {
"id": 6,
"name": "Pricing Question",
"match_type": "contains",
"trigger": "price",
"reply_mode": "static",
"reply_message": "Our pricing starts at 99 SAR/month, ask us for a quote!",
"webhook_url": null,
"webhook_secret": null,
"is_active": true,
"priority": 5,
"created_at": "...",
"updated_at": "..."
}
}
إنشاء رد تلقائي عبر Webhook
curl --request POST 'https://bot.netrogrp.com/api/v1/auto-replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"Certificate Check","match_type":"any","reply_mode":"webhook","webhook_url":"https://partner.example.com/webhooks/whatsapp"}'
{
"data": {
"id": 7,
"name": "Certificate Check",
"match_type": "any",
"trigger": null,
"reply_mode": "webhook",
"reply_message": null,
"webhook_url": "https://partner.example.com/webhooks/whatsapp",
"webhook_secret": "a1b2c3d4e5f6...",
"is_active": true,
"priority": 0,
"created_at": "...",
"updated_at": "..."
}
}
عرض رد تلقائي واحد
curl --request GET 'https://bot.netrogrp.com/api/v1/auto-replies/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 6,
"name": "Pricing Question",
"match_type": "contains",
"trigger": "price",
"reply_mode": "static",
"reply_message": "...",
"webhook_url": null,
"webhook_secret": null,
"is_active": true,
"priority": 5,
"created_at": "...",
"updated_at": "..."
}
}
تحديث رد تلقائي
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | لا | Internal label. |
| match_type | string | لا | One of any, exact, starts_with, contains. |
| trigger | string | لا | Match text. |
| reply_mode | string | لا | static or webhook. |
| reply_message | string | لا | Reply text (static mode). |
| webhook_url | string | لا | Webhook URL (webhook mode). |
| is_active | boolean | لا | Enable/disable without deleting. |
| priority | integer | لا | Match order. |
curl --request PUT 'https://bot.netrogrp.com/api/v1/auto-replies/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"is_active":false}'
{
"data": {
"id": 6,
"name": "Pricing Question",
"match_type": "contains",
"trigger": "price",
"reply_mode": "static",
"reply_message": "...",
"webhook_url": null,
"webhook_secret": null,
"is_active": false,
"priority": 5,
"created_at": "...",
"updated_at": "..."
}
}
حذف رد تلقائي
curl --request DELETE 'https://bot.netrogrp.com/api/v1/auto-replies/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
مكتبة ردود قابلة لإعادة الاستخدام بواسطة الموظفين.
عرض الردود السريعة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/quick-replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 2,
"title": "Greeting",
"shortcut": "/hello",
"message": "Hi! Thanks for reaching out, how can we help?",
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
إنشاء رد سريع
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| title | string | نعم | Internal label. |
| shortcut | string | نعم | Shortcut text agents type to insert it. |
| message | string | نعم | The message text. |
curl --request POST 'https://bot.netrogrp.com/api/v1/quick-replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"title":"Greeting","shortcut":"/hello","message":"Hi! Thanks for reaching out, how can we help?"}'
{
"data": {
"id": 2,
"title": "Greeting",
"shortcut": "/hello",
"message": "Hi! Thanks for reaching out, how can we help?",
"created_at": "...",
"updated_at": "..."
}
}
عرض رد سريع واحد
curl --request GET 'https://bot.netrogrp.com/api/v1/quick-replies/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 2,
"title": "Greeting",
"shortcut": "/hello",
"message": "...",
"created_at": "...",
"updated_at": "..."
}
}
تحديث رد سريع
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| title | string | لا | Internal label. |
| shortcut | string | لا | Shortcut text. |
| message | string | لا | Message text. |
curl --request PUT 'https://bot.netrogrp.com/api/v1/quick-replies/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"message":"Hi! Thanks for messaging us \u2014 how can we help today?"}'
{
"data": {
"id": 2,
"title": "Greeting",
"shortcut": "/hello",
"message": "Hi! Thanks for messaging us — how can we help today?",
"created_at": "...",
"updated_at": "..."
}
}
حذف رد سريع
curl --request DELETE 'https://bot.netrogrp.com/api/v1/quick-replies/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
أزواج سؤال/جواب يعتمد عليها مساعد الذكاء الاصطناعي عند الرد التلقائي.
عرض مقالات المعرفة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/ai-knowledge-articles' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 3,
"question": "What are your business hours?",
"answer": "We are open Sunday to Thursday, 9am to 5pm.",
"is_active": true,
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
إنشاء مقالة معرفة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| question | string | نعم | The customer question this article answers. |
| answer | string | نعم | The answer the AI will use. |
| is_active | boolean | لا | Defaults to true. |
curl --request POST 'https://bot.netrogrp.com/api/v1/ai-knowledge-articles' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"question":"What are your business hours?","answer":"We are open Sunday to Thursday, 9am to 5pm."}'
{
"data": {
"id": 3,
"question": "What are your business hours?",
"answer": "We are open Sunday to Thursday, 9am to 5pm.",
"is_active": true,
"created_at": "...",
"updated_at": "..."
}
}
عرض مقالة معرفة واحدة
curl --request GET 'https://bot.netrogrp.com/api/v1/ai-knowledge-articles/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 3,
"question": "What are your business hours?",
"answer": "We are open Sunday to Thursday, 9am to 5pm.",
"is_active": true,
"created_at": "...",
"updated_at": "..."
}
}
تحديث مقالة معرفة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| question | string | لا | The customer question. |
| answer | string | لا | The answer. |
| is_active | boolean | لا | Inactive articles are excluded from AI matching. |
curl --request PUT 'https://bot.netrogrp.com/api/v1/ai-knowledge-articles/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"answer":"We are open Sunday to Thursday, 9am to 6pm."}'
{
"data": {
"id": 3,
"question": "What are your business hours?",
"answer": "We are open Sunday to Thursday, 9am to 6pm.",
"is_active": true,
"created_at": "...",
"updated_at": "..."
}
}
حذف مقالة معرفة
curl --request DELETE 'https://bot.netrogrp.com/api/v1/ai-knowledge-articles/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
قوالب رسائل واتساب المعتمدة من Meta.
عرض القوالب
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/templates' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 4,
"name": "order_confirmation",
"category": "UTILITY",
"language": "en_US",
"status": "APPROVED",
"rejected_reason": null,
"components": [
{
"type": "BODY",
"text": "Your order {{1}} has shipped!"
}
],
"last_synced_at": "...",
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
عرض قالب واحد
curl --request GET 'https://bot.netrogrp.com/api/v1/templates/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 4,
"name": "order_confirmation",
"category": "UTILITY",
"language": "en_US",
"status": "APPROVED",
"rejected_reason": null,
"components": [
{
"type": "BODY",
"text": "Your order {{1}} has shipped!"
}
],
"last_synced_at": "...",
"created_at": "...",
"updated_at": "..."
}
}
حذف قالب
curl --request DELETE 'https://bot.netrogrp.com/api/v1/templates/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
{
"message": "Meta rejected the delete request: ..."
}
إرسال رسائل القوالب جماعيًا إلى قائمة اتصال مع تتبع التسليم.
عرض الحملات
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/campaigns' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 9,
"name": "July Promo",
"status": "draft",
"template": {
"id": 4,
"name": "order_confirmation"
},
"contact_list": {
"id": 3,
"name": "VIP Customers"
},
"scheduled_at": null,
"started_at": null,
"completed_at": null,
"total_recipients": 0,
"sent_count": 0,
"failed_count": 0,
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
إنشاء حملة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | نعم | Campaign name. |
| whats_app_template_id | integer | نعم | ID of one of your own templates. |
| whats_app_contact_list_id | integer | نعم | ID of one of your own contact lists. |
| scheduled_at | datetime | لا | ISO 8601 datetime to schedule for later. |
curl --request POST 'https://bot.netrogrp.com/api/v1/campaigns' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"July Promo","whats_app_template_id":4,"whats_app_contact_list_id":3}'
{
"data": {
"id": 9,
"name": "July Promo",
"status": "draft",
"template": {
"id": 4,
"name": "order_confirmation"
},
"contact_list": {
"id": 3,
"name": "VIP Customers"
},
"scheduled_at": null,
"started_at": null,
"completed_at": null,
"total_recipients": 0,
"sent_count": 0,
"failed_count": 0,
"created_at": "...",
"updated_at": "..."
}
}
عرض حملة واحدة
curl --request GET 'https://bot.netrogrp.com/api/v1/campaigns/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 9,
"name": "July Promo",
"status": "sending",
"template": {
"id": 4,
"name": "order_confirmation"
},
"contact_list": {
"id": 3,
"name": "VIP Customers"
},
"scheduled_at": null,
"started_at": "...",
"completed_at": null,
"total_recipients": 42,
"sent_count": 30,
"failed_count": 1,
"created_at": "...",
"updated_at": "..."
}
}
تحديث حملة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| name | string | لا | Campaign name. |
| whats_app_template_id | integer | لا | Draft campaigns only. |
| whats_app_contact_list_id | integer | لا | Draft campaigns only. |
| scheduled_at | datetime | لا | Draft campaigns only. |
curl --request PUT 'https://bot.netrogrp.com/api/v1/campaigns/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"name":"July Promo (updated)"}'
{
"data": {
"id": 9,
"name": "July Promo (updated)",
"status": "draft",
"template": {
"id": 4,
"name": "order_confirmation"
},
"contact_list": {
"id": 3,
"name": "VIP Customers"
},
"scheduled_at": null,
"started_at": null,
"completed_at": null,
"total_recipients": 0,
"sent_count": 0,
"failed_count": 0,
"created_at": "...",
"updated_at": "..."
}
}
حذف حملة
curl --request DELETE 'https://bot.netrogrp.com/api/v1/campaigns/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
(محتوى فارغ)
{
"message": "This campaign cannot be deleted in its current status. Cancel it first."
}
إرسال حملة الآن
curl --request POST 'https://bot.netrogrp.com/api/v1/campaigns/{id}/send' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 9,
"name": "July Promo",
"status": "queued",
"template": {
"id": 4,
"name": "order_confirmation"
},
"contact_list": {
"id": 3,
"name": "VIP Customers"
},
"scheduled_at": null,
"started_at": null,
"completed_at": null,
"total_recipients": 0,
"sent_count": 0,
"failed_count": 0,
"created_at": "...",
"updated_at": "..."
}
}
إلغاء حملة
curl --request POST 'https://bot.netrogrp.com/api/v1/campaigns/{id}/cancel' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 9,
"name": "July Promo",
"status": "cancelled",
"template": {
"id": 4,
"name": "order_confirmation"
},
"contact_list": {
"id": 3,
"name": "VIP Customers"
},
"scheduled_at": null,
"started_at": null,
"completed_at": null,
"total_recipients": 0,
"sent_count": 0,
"failed_count": 0,
"created_at": "...",
"updated_at": "..."
}
}
قراءة المحادثات وإرسال رسائل واتساب الصادرة.
عرض الرسائل
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| contact_phone | string | لا | Filter to a single conversation by phone number. |
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/messages' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 88,
"contact_phone": "+966501234567",
"contact_name": "Ahmed Al-Otaibi",
"direction": "outbound",
"type": "text",
"body": "Thanks for your order!",
"status": null,
"wa_message_id": "wamid.XXXX",
"media_url": null,
"media_mime_type": null,
"media_filename": null,
"latitude": null,
"longitude": null,
"read_at": null,
"created_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
إرسال رسالة
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| to | string | نعم | Recipient phone number. |
| type | string | نعم | One of template, text, image, video, audio, document. |
| template_name | string | if type=template | Approved template name. |
| language_code | string | if type=template | e.g. en_US. |
| components | array | لا | WhatsApp Cloud API template components. Required when the approved template contains BODY, HEADER, or BUTTON variables. Each component contains type and parameters and is forwarded to template.components. |
| body | string | if type=text | Freeform message text. |
| url | string | if type=image/video/audio/document | Publicly reachable URL of the media file. |
| caption | string | لا | Caption (image/video/document only). |
| filename | string | لا | Filename (document only). |
curl --request POST 'https://bot.netrogrp.com/api/v1/messages/send' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"to":"966501234567","type":"template","template_name":"event_ticket_ar","language_code":"en_US","components":[{"type":"body","parameters":[{"type":"text","text":"Attendee name"},{"type":"text","text":"Event name"},{"type":"text","text":"Date"},{"type":"text","text":"Time"},{"type":"text","text":"Location"},{"type":"text","text":"Ticket code"},{"type":"text","text":"https://example.com/tickets/123"}]}]}'
{
"data": {
"id": 89,
"contact_phone": "+966501234567",
"contact_name": "Ahmed Al-Otaibi",
"direction": "outbound",
"type": "text",
"body": null,
"status": null,
"wa_message_id": "wamid.YYYY",
"media_url": null,
"media_mime_type": null,
"media_filename": null,
"latitude": null,
"longitude": null,
"read_at": null,
"created_at": "..."
}
}
{
"message": "Meta rejected the message: ..."
}
فتح ومتابعة تذاكر الدعم الفني مع فريقنا.
عرض تذاكر الدعم
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| per_page | integer | لا | Results per page (default 25). |
curl --request GET 'https://bot.netrogrp.com/api/v1/support-tickets' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": [
{
"id": 2,
"ticket_number": "TKT-260803-LOQSW",
"subject": "Cannot send messages",
"status": "open",
"priority": "high",
"category": "Technical Issue",
"replies": [],
"last_reply_at": "...",
"resolved_at": null,
"closed_at": null,
"created_at": "...",
"updated_at": "..."
}
],
"links": [
"..."
],
"meta": [
"..."
]
}
فتح تذكرة دعم
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| subject | string | نعم | Short summary of the issue. |
| priority | string | نعم | One of low, medium, high. |
| category_id | integer | لا | ID of one of the fixed support ticket categories. |
| message | string | نعم | The initial message describing the issue. |
| attachments | file[] | لا | Up to 5 files, 5MB each. |
curl --request POST 'https://bot.netrogrp.com/api/v1/support-tickets' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"subject":"Cannot send messages","priority":"high","message":"My WhatsApp account stopped sending messages since this morning."}'
{
"data": {
"id": 2,
"ticket_number": "TKT-260803-LOQSW",
"subject": "Cannot send messages",
"status": "open",
"priority": "high",
"category": null,
"replies": [
{
"id": 2,
"message": "My WhatsApp account stopped sending messages since this morning.",
"is_staff_reply": false,
"author": "Ahmed Al-Otaibi",
"attachments": [],
"created_at": "..."
}
],
"last_reply_at": "...",
"resolved_at": null,
"closed_at": null,
"created_at": "...",
"updated_at": "..."
}
}
عرض تذكرة واحدة (مع ردودها)
curl --request GET 'https://bot.netrogrp.com/api/v1/support-tickets/{id}' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 2,
"ticket_number": "TKT-260803-LOQSW",
"subject": "Cannot send messages",
"status": "open",
"priority": "high",
"category": null,
"replies": [
{
"id": 2,
"message": "My WhatsApp account stopped sending messages since this morning.",
"is_staff_reply": false,
"author": "Ahmed Al-Otaibi",
"attachments": [],
"created_at": "..."
}
],
"last_reply_at": "...",
"resolved_at": null,
"closed_at": null,
"created_at": "...",
"updated_at": "..."
}
}
إضافة رد
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
| message | string | نعم | Reply text, max 5000 characters. |
| attachments | file[] | لا | Up to 5 files, 5MB each. |
curl --request POST 'https://bot.netrogrp.com/api/v1/support-tickets/{id}/replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"message":"Any update on this?"}'
{
"data": {
"id": 2,
"ticket_number": "TKT-260803-LOQSW",
"status": "open",
"replies": [
"..."
]
}
}
{
"message": "This ticket is closed. Reopen it before replying."
}
إغلاق تذكرة
curl --request POST 'https://bot.netrogrp.com/api/v1/support-tickets/{id}/close' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 2,
"status": "closed"
}
}
إعادة فتح تذكرة
curl --request POST 'https://bot.netrogrp.com/api/v1/support-tickets/{id}/reopen' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Accept: application/json'
{
"data": {
"id": 2,
"status": "open"
}
}