Feedbot API
Ask AI Assistant
Introduction
Welcome to the Feedbot API (v2). Use Basic Authentication (User & Token encoded in base64).
Crucial Rule: The first message to a user must be a Template Message. Free-text chat messages are allowed only within the 24-hour window after a user reply.
Template Restrictions:
1. Variables: Two placeholders (e.g.,
2. Characters: Do not use
3. Position: Variables cannot be at the very start or end of the text.
1. Variables: Two placeholders (e.g.,
[#1#][#2#]) cannot be adjacent; separate them with a space or char.2. Characters: Do not use
&, +, <, >.3. Position: Variables cannot be at the very start or end of the text.
Send Template Message
1. Simple Template
POST
https://cloud.b-elect.com/api/v2/WhatsApp/SendWhatsApp
JSON
{
"Data": {
"TemplateId": "1216",
"TemplateParameters": [
{ "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" },
{ "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" },
{ "Name": "[#3#]", "Type": "Text", "Value": "Alenbi 30" }
],
"Recipients": [
{
"FirstName": "Israel",
"Phone": "0529999999",
"CouponCode": "1ZG67893"
}
]
}
}
2. Advanced Template
Includes Buttons, Group settings, and full Settings object.
POST
https://cloud.b-elect.com/api/v2/WhatsApp/SendWhatsApp
Settings Parameters
| Parameter | Description |
|---|---|
| CampaignName | Name for reports. |
| TimeToSend | Schedule send (yyyy-mm-dd hh:mm). |
| DelayInSeconds | Delay sending (if TimeToSend is empty). |
| Priority | 0 (normal), -1 (high), 1+ (low). |
| IgnoreUnsubscribeCheck | true to bypass blacklist (Operational only). |
| IgnorePossibleSendingTime | Ignore system time limitations. |
| AllowDuplicates | Allow sending same message multiple times. |
| TrackPurchaseTData | Associate purchasing with campaign. |
| DeliveryNotificationUrl | Webhook for DLR updates. |
JSON (Advanced)
{
"Data": {
"TemplateId": "1216",
"TemplateParameters": [
{ "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }
],
"Buttons": [
{ "ButtonIndex": 0, "FieldSource": "Contact", "FieldName": "phone", "payload": "id0303" },
{ "ButtonIndex": 1, "FieldSource": "Custom", "FieldName": "Code", "payload": "id0304" }
],
"Recipients": [
{ "FirstName": "Israel", "Phone": "0529999999" }
],
"GroupNumbers": [ { "GroupNumber": "_INT_" } ],
"ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ],
"Settings": {
"CampaignName": "SummerSale",
"Priority": -1,
"AllowDuplicates": true,
"TrackPurchaseTData": false
}
}
}
Send Chat & OTP
Send OTP
Use parameter type OTP. Only Phone is required.
POST
https://cloud.b-elect.com/api/v2/WhatsApp/SendWhatsApp
JSON
{
"Data": {
"TemplateId": "3938",
"TemplateParameters": [
{ "Name": "[#1#]", "Type": "OTP", "Value": "123456" }
],
"Recipients": [ { "Phone": "0542222222" } ]
}
}
Send Chat Message
Send free text or media (Requires active 24h session).
POST
https://cloud.b-elect.com/api/v2/WhatsApp/SendWhatsAppChat
JSON
{
"Data": {
"Message": "Hello World",
"Phone": "0549999999",
"MessageMedia": "https://sample-videos.com/img/Sample.jpg",
"Settings": {
"CustomerMessageId": "22222",
"CustomerParameter": "5555",
"IgnoreUnsubscribeCheck": true
}
}
}
Receiving Data
Push Option (Webhook):
Instead of pulling, you can configure a Webhook URL (contact support).
Incoming POSTs will include:
Instead of pulling, you can configure a Webhook URL (contact support).
Incoming POSTs will include:
PhoneNumber, Message, MediaFileUid, MoSessionId, and AdditionalInfo (Button Payloads, Metadata).
1. Pull Incoming Messages
Retrieves and removes messages from the queue.
POST
https://cloud.b-elect.com/api/v2/PullData
JSON
{
"Data": {
"Type": "IncomingMessagesWhatsapp",
"BatchSize": 500
}
}
2. Get WhatsApp Chat History
Retrieve full chat sessions between dates.
POST
https://cloud.b-elect.com/api/v2/WhatsApp/GetWhatsAppChats
JSON
{
"Data": {
"FromDateTime": "2025-01-01T00:00:00Z",
"LastMessageDatetime": "2025-03-01T00:00:00Z",
"PhoneNumber": "0542222222"
}
}
3. Get Media File
Download file using MediaFileUid. Returns Base64 content and IsInfected status.
POST
https://cloud.b-elect.com/api/v2/Files/Get
JSON
{
"Data": {
"UID": "bhi9vsgziw",
"WaitForFileScaning": true
}
}
Delivery Notifications (DLR)
Push DLR: Configure
DeliveryNotificationUrl in Settings to receive POST updates.
POST
https://cloud.b-elect.com/api/v2/PullData
| Code | Description |
|---|---|
| 0 | Sent |
| 2 | Delivered |
| 4 | Read |
| 6 | Clicked |
| -2 | Undeliverable |
| -4 | Blocked |
JSON
{
"Data": {
"Type": "DeliveryNotificationWhatsapp",
"BatchSize": "100"
}
}
Management
Get Template List
Status: 0 (Not Sent), 1 (Approved), 2 (Waiting), 3 (Rejected), 10 (Pending Del).
POST
https://cloud.b-elect.com/api/v2/WhatsApp/GetTemplateList
JSON
{ "Data": {} }
Create Template (Simple)
POST
https://cloud.b-elect.com/api/v2/WhatsApp/CreateTemplate
JSON
{
"Data": {
"TemplateName": "Meeting",
"SharingLevel": "Project",
"Category": "UTILITY",
"TemplateContents": "Hello [#1#], reminder for meeting at [#2#]",
"ParametersExample": [
{ "id": 1, "value": "John" },
{ "id": 2, "value": "10:00" }
]
}
}
Create Template (Advanced)
Includes components: Header, Body, Buttons (Max 3 Quick Reply OR 1 Call-to-Action).
POST
https://cloud.b-elect.com/api/v2/WhatsApp/CreateTemplate
JSON
{
"Data": {
"TemplateName": "Invoice",
"SharingLevel": "Project",
"Category": "UTILITY",
"TemplateContents": "Hello [#1#], your invoice is ready.",
"ParametersExample": [{ "id": 1, "value": "John" }],
"Attachment": "https://example.com/invoice.pdf",
"TemplateComponents": [
{ "Type": "BODY", "Format": "TEXT", "Example": "Hello John..." },
{
"Type": "BUTTONS",
"Buttons": [
{ "Type": "QUICK_REPLY", "Text": "Pay Now" },
{ "Type": "QUICK_REPLY", "Text": "Contact Support" }
]
}
]
}
}
Delete Template
POST
https://cloud.b-elect.com/api/v2/WhatsApp/DeleteTemplate
JSON
{ "Data": { "TemplateId": 211971 } }
Delete Future Messages
POST
https://cloud.b-elect.com/api/v2/Whatsapp/DeleteFutureMessages
JSON
{
"Data": {
"PhoneNumber": "0549999999",
"CustomerMessageID": "123456"
}
}