Kirim Pesan
curl --request POST \
--url https://api.example.com/sendimport requests
url = "https://api.example.com/send"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/send"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/send")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyMessaging
Kirim Pesan
Kirim pesan teks ke nomor WhatsApp melalui POST /send
POST
/
send
Kirim Pesan
curl --request POST \
--url https://api.example.com/sendimport requests
url = "https://api.example.com/send"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/send"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/send")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyGunakan endpoint ini untuk mengirim pesan teks ke nomor WhatsApp. Nomor telepon harus menggunakan format internasional, misalnya
6281234567890.
Request
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | application/json |
Body Parameters
Example Request
curl -X POST https://api.dripsender.id/send \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"text": "Hello, this is a test message!",
"phone": "6281234567890"
}'
axios.post("https://api.dripsender.id/send", {
api_key: "YOUR_API_KEY",
text: "Hello, this is a test message!",
phone: "6281234567890"
}).then(response => {
console.log(response.data);
});
Response
Success
Code:
Content: JSON response with
200Content: JSON response with
data: "OK"{
"status": 200,
"statusText": "",
"data": "OK",
"headers": {
"content-length": "2",
"content-type": "text/plain; charset=utf-8"
}
}
Error
Code:
Content: Error message
500Content: Error message
