Poll menu is used to make a poll.

You can use the poll on send menu or autoreply menu.

example output :

The field you need to fill is shown below.

The fields of template is shown above.

After you finish adding the poll, you can click add and the poll will be added and ready to use.

Warning! The use of this API is not intended for frontend usage as it exposes a token that must be kept confidential. This API usage is highly not recommended unless there are specific issues with your environment preventing you from utilizing the POST method. Please use it wisely.

This API enable send message using GET method or simply using url.

you can run it on browser/put the link on button/href tag.

The url is simply using the same url as POST method.

https://api.fonnte.com/send/?queries

Queries is the query string with name and values.

If you prefer to see on postman, see here.

Available parameter

note :

  1. all value should be encoded before assigned to avoid any error/unexpected behaviour, see urlencode from php.
  2. redirect parameter will redirect the page after used. if your environment support curl, it's recommended to verify and log the response before redirecting/action as not all get request will return success due to invalid value.
  3. please note that file parameter not available in this method, to send a file must use url

Use Case

First of all, do not use this api in frontend! anyone can use your device to send message.

You can use this API for backend or internal use.

The only use case of this API is when your environment do not support POST method.

Sometime even curl is not available on some environment.

If that's the case, you can use it with care.

Response

All response will follow the response for API send message POST method

This template menu can be used as quick reply on cs multi agent dashboard.

You can set the message including attachment (depend on your device's package) and location.

The fields of template is shown above.

After you finish adding the template, you can click add and the template will be added and ready to use.

The agent who will receive and reply chat on cs multi agent dashboard can be managed from this menu.

The agent can only manage by device and can only fit in one division.

The fields of agent is shown above.

After you finish adding the agent, you can click add and the agent will be added and ready to use.

The agent token is important.

You will need device number and token to be able to log in to cs multi agent dashboard.

Division is a feature to grup agents to organize better.

You can organize incoming message to your agent's rotation using division.

Division can accept agent with different devices.

with this feature, you can manage incoming message from multiple devices, if required.

but still, one device per division is recommended method.

The fields of division is shown above.

After you finish adding the division, you can click add and the division will be added and ready to use.

Fonnte introduce rotation on rotator and cs division menu.

The rortation is a simple select with option :

Full means the rotation will make a full cycle until all element have been selected.

Partial means the rotation will only affect current rotation, therefore the element may be chosen again in the next rotation.

Example :

Case A have 3 elements of (a,b,c) with full rotation.

The first occurence chose b.

The second occurence will only choose one of a or c (b is excluded)

The third occurence is the remainder.

The fourth occurence will reset the rotation to choose one of (a,b,c).

Case B have 3 elements of (a,b,c) with partial rotation

The first occurence chose b.

The second occurence will choose one of a, b, c (b may be chosen again)

Since 10th May 2023, whatsapp has updated the code for sending button by verifying the sender. This update lead button to be unusable once again. All button including :

is no longer able to be sent using fonnte.

This issue will inevitable to be happen again in the future even if fonnte managed to make it work once again.

In this moment, we have decided to completely stop maintaining the button feature.

It is unfortunate that we have to discontinue this feature, but this feature is one that should not be accessible without using the official WhatsApp API service. We also stop trying to circumvent WhatsApp for something that should not be done. If WhatsApp opens this button feature to the public and makes it available in the WhatsApp application, we may start working on it again so that it can be used again. But as long as WhatsApp does not open this button feature to the public, we will not work on it.

We apologize for having to discontinue this feature.

Webhook update message status will be replacement of API message status to make the updating status real time and do not need an API hit to update it.

The message status would have id and stateid to update the message status and message state.

The example below show how to save message status to mysql, you can modify as you need.

You need to send from API to be able to save it. this is the example of API send with saving the report to mysql.

You can download example database table here.

API send and save report :

<?php

$conn = mysqli_connect("localhost","root","","db");
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  exit();
}
$message = "test ya";
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.fonnte.com/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 => array('target' => '083120942579','message' => $message),
  CURLOPT_HTTPHEADER => array(
    'Authorization: TOKEN'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
$res = json_decode($response,true);
var_dump($res);
foreach($res["id"] as $k=>$v){
  $target = $res["target"][$k];
  $status = $res["process"];
  mysqli_query($conn,"INSERT INTO report (id,target,message,status) VALUES ('$v','$target','$message','$status')");
}

Then use the example code below to update the message status and state to mysql.

Webhook script :

<?php
header('Content-Type: application/json; charset=utf-8');

$conn = mysqli_connect("localhost","root","","db");
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  exit();
}

$json = file_get_contents('php://input');
$data = json_decode($json, true);
$device = $data['device'];
$id = $data['id'];
$stateid = $data['stateid'];
$status= $data['status']; 
$state = $data['state'];

//update status and state
if(isset($id) && isset($stateid)){
 mysqli_query($conn,"UPDATE report SET status = '$status',state = '$state',stateid = '$stateid' WHERE id = '$id'"); 
}else if(isset($id) && !isset($stateid)){
mysqli_query($conn,"UPDATE report SET status = '$status' WHERE id = '$id'");
}else{
  mysqli_query($conn,"UPDATE report SET state = '$state' WHERE stateid = '$stateid'");
}

Available parameter

We are adding the last planned features for this year.

Fonnte focus on making a follow up feature whenever a number is added to a group.

Follow Up

Every time a number is added to a group which connected to follow up, the number will be scheduled to get follow up messages.

This feature is very useful for newsletter purpose.

You can also use it together with submission feature.

Import csv target

You can now insert the target using csv.

It's easier for you to send bulk message using your own data from csv without having to add to a group.

Send location

Fonnte support device to send location using latitude and longitude.

you can find the example at the docs.

Quick reply

If you ever need to send a template message, fonnte has release this feature.

You can write anything on your whatsapp as you've created on autoreply and your device will be sending message.

bugs fix

fix not joined whatsapp group still exist after update

fix unable to delete filtered history

You can send fonnte using API with javascript native fetch.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        (async () => {
            const data = new FormData()
            data.append("target", "082227097005")
            data.append("message", "kirim dari js")
            data.append("url", "https://md.fonnte.com/images/wa-logo.png")
            data.append("filename", "filename.pdf")
            data.append("schedule", "0")
            data.append("delay", "2")
            data.append("countryCode", "62")
            data.append("buttonJSON", '{"message":"fonnte button message","footer":"fonnte footer message","buttons":[{"id":"mybutton1","message":"hello fonnte"},{"id":"mybutton2","message":"fonnte pricing"},{"id":"mybutton3","message":"tutorial fonnte"}]}')
            data.append("templateJSON", '{"message":"fonnte template message","footer":"fonnte footer message","buttons":[{"message":"fonnte","url":"https://fonnte.com"},{"message":"call me","tel":"6282227097005"},{"id":"mybutton1","message":"hello fonnte"}]}')
            data.append("listJSON", '{"message":"fonnte list message","footer":"fonnte footer message","buttonTitle":"fonnte\'s packages","title":"fonnte title","buttons":[{"title":"text only","list":[{"message":"regular","footer":"10k messsages/month","id":"list-1"},{"message":"regular pro","footer":"25k messsages/month","id":"list-2"},{"message":"master","footer":"unlimited messsages/month","id":"list-3"}]},{"title":"all feature","list":[{"message":"super","footer":"10k messsages/month","id":"list-4"},{"message":"advanced","footer":"25k messsages/month","id":"list-5"},{"message":"ultra","footer":"unlimited messsages/month","id":"list-6"}]}]}')

            const response = await fetch("https://api.fonnte.com/send", {
                method: "POST",
                mode: "cors",
                headers: new Headers({
                    Authorization: "TOKEN",
                }),
                body: data,
            });

            const res = await response.json();
            document.write(JSON.stringify(res))
        })()
    </script>
</body>

</html>

You can use any php version API data with javascript.

Made with in Indonesia