Send a message
curl --request POST \
--url https://api.bitbybit.studio/whatsapp/open/v1/messages/send \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"to": "6281234567890",
"message": "Hello! This is a sample message from WhatsApp API.",
"imageUrl": "https://example.com/image.jpg",
"ignoreActiveTicket": false,
"countryCode": "ID"
}
'import requests
url = "https://api.bitbybit.studio/whatsapp/open/v1/messages/send"
payload = {
"to": "6281234567890",
"message": "Hello! This is a sample message from WhatsApp API.",
"imageUrl": "https://example.com/image.jpg",
"ignoreActiveTicket": False,
"countryCode": "ID"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '6281234567890',
message: 'Hello! This is a sample message from WhatsApp API.',
imageUrl: 'https://example.com/image.jpg',
ignoreActiveTicket: false,
countryCode: 'ID'
})
};
fetch('https://api.bitbybit.studio/whatsapp/open/v1/messages/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.bitbybit.studio/whatsapp/open/v1/messages/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '6281234567890',
'message' => 'Hello! This is a sample message from WhatsApp API.',
'imageUrl' => 'https://example.com/image.jpg',
'ignoreActiveTicket' => false,
'countryCode' => 'ID'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bitbybit.studio/whatsapp/open/v1/messages/send"
payload := strings.NewReader("{\n \"to\": \"6281234567890\",\n \"message\": \"Hello! This is a sample message from WhatsApp API.\",\n \"imageUrl\": \"https://example.com/image.jpg\",\n \"ignoreActiveTicket\": false,\n \"countryCode\": \"ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.bitbybit.studio/whatsapp/open/v1/messages/send")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"6281234567890\",\n \"message\": \"Hello! This is a sample message from WhatsApp API.\",\n \"imageUrl\": \"https://example.com/image.jpg\",\n \"ignoreActiveTicket\": false,\n \"countryCode\": \"ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitbybit.studio/whatsapp/open/v1/messages/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"6281234567890\",\n \"message\": \"Hello! This is a sample message from WhatsApp API.\",\n \"imageUrl\": \"https://example.com/image.jpg\",\n \"ignoreActiveTicket\": false,\n \"countryCode\": \"ID\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"messageId2": "<string>",
"timestamp": "<string>"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid or expired API key"
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after the reset period."
}
}Messaging
Send Message
Send a text or image message to a WhatsApp user within the 24-hour customer service window.
POST
/
messages
/
send
Send a message
curl --request POST \
--url https://api.bitbybit.studio/whatsapp/open/v1/messages/send \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"to": "6281234567890",
"message": "Hello! This is a sample message from WhatsApp API.",
"imageUrl": "https://example.com/image.jpg",
"ignoreActiveTicket": false,
"countryCode": "ID"
}
'import requests
url = "https://api.bitbybit.studio/whatsapp/open/v1/messages/send"
payload = {
"to": "6281234567890",
"message": "Hello! This is a sample message from WhatsApp API.",
"imageUrl": "https://example.com/image.jpg",
"ignoreActiveTicket": False,
"countryCode": "ID"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '6281234567890',
message: 'Hello! This is a sample message from WhatsApp API.',
imageUrl: 'https://example.com/image.jpg',
ignoreActiveTicket: false,
countryCode: 'ID'
})
};
fetch('https://api.bitbybit.studio/whatsapp/open/v1/messages/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.bitbybit.studio/whatsapp/open/v1/messages/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '6281234567890',
'message' => 'Hello! This is a sample message from WhatsApp API.',
'imageUrl' => 'https://example.com/image.jpg',
'ignoreActiveTicket' => false,
'countryCode' => 'ID'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bitbybit.studio/whatsapp/open/v1/messages/send"
payload := strings.NewReader("{\n \"to\": \"6281234567890\",\n \"message\": \"Hello! This is a sample message from WhatsApp API.\",\n \"imageUrl\": \"https://example.com/image.jpg\",\n \"ignoreActiveTicket\": false,\n \"countryCode\": \"ID\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.bitbybit.studio/whatsapp/open/v1/messages/send")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"6281234567890\",\n \"message\": \"Hello! This is a sample message from WhatsApp API.\",\n \"imageUrl\": \"https://example.com/image.jpg\",\n \"ignoreActiveTicket\": false,\n \"countryCode\": \"ID\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitbybit.studio/whatsapp/open/v1/messages/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"6281234567890\",\n \"message\": \"Hello! This is a sample message from WhatsApp API.\",\n \"imageUrl\": \"https://example.com/image.jpg\",\n \"ignoreActiveTicket\": false,\n \"countryCode\": \"ID\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"messageId2": "<string>",
"timestamp": "<string>"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request body"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid or expired API key"
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "API key does not have the required scope"
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after the reset period."
}
}Authorizations
API key for authentication. Create one in Settings > Developer.
Body
application/json
Destination phone number in WhatsApp format (e.g., 628xxxxxxxxxx)
Example:
"6281234567890"
Message content to be sent
Example:
"Hello! This is a sample message from WhatsApp API."
Messaging channel to use
Available options:
whatsapp cloud api, whatsapp coex Image URL — if provided, sends an image message instead of text
Example:
"https://example.com/image.jpg"
If true, skip sending when the chat is actively handled by an agent
Country code for number formatting (e.g., ID, EN, IN)
Example:
"ID"
Response
Message sent successfully
Show child attributes
Show child attributes
⌘I

