BlueMedia Developer Docs — every API and guide you need to integrate the WhatsApp Business Platform.
POST /v1/messagescurl -X POST https://api.bluehola.com/v1/messages \
-H "Authorization: Bearer $BSP_API_KEY" \
-H "Idempotency-Key: order-8821-notify" \
-H "Content-Type: application/json" \
-d '{
"phoneNumberId": "pn_01923abc",
"to": "8613800138000",
"type": "text",
"text": { "body": "Hi, your order has shipped." }
}'
const res = await fetch("https://api.bluehola.com/v1/messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BSP_API_KEY}`,
"Idempotency-Key": "order-8821-notify",
"Content-Type": "application/json",
},
body: JSON.stringify({
phoneNumberId: "pn_01923abc",
to: "8613800138000",
type: "text",
text: { body: "Hi, your order has shipped." },
}),
});
// 202 only means accepted — poll the message or use webhooks for the real status
const { id, status } = await res.json();
import os, requests
res = requests.post(
"https://api.bluehola.com/v1/messages",
headers={
"Authorization": f"Bearer {os.environ['BSP_API_KEY']}",
"Idempotency-Key": "order-8821-notify",
},
json={
"phoneNumberId": "pn_01923abc",
"to": "8613800138000",
"type": "text",
"text": {"body": "Hi, your order has shipped."},
},
timeout=10,
)
# 202 only means accepted — poll the message or use webhooks for the real status
message = res.json()
payload := []byte(`{
"phoneNumberId": "pn_01923abc",
"to": "8613800138000",
"type": "text",
"text": { "body": "Hi, your order has shipped." }
}`)
req, _ := http.NewRequest(http.MethodPost,
"https://api.bluehola.com/v1/messages", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer "+os.Getenv("BSP_API_KEY"))
req.Header.Set("Idempotency-Key", "order-8821-notify")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer res.Body.Close()
// 202 only means accepted — poll the message or use webhooks for the real status
var payload = """
{
"phoneNumberId": "pn_01923abc",
"to": "8613800138000",
"type": "text",
"text": { "body": "Hi, your order has shipped." }
}""";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://api.bluehola.com/v1/messages"))
.header("Authorization", "Bearer " + System.getenv("BSP_API_KEY"))
.header("Idempotency-Key", "order-8821-notify")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
var res = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
// 202 only means accepted — poll the message or use webhooks for the real status
<?php
$ch = curl_init('https://api.bluehola.com/v1/messages');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('BSP_API_KEY'),
'Idempotency-Key: order-8821-notify',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'phoneNumberId' => 'pn_01923abc',
'to' => '8613800138000',
'type' => 'text',
'text' => ['body' => 'Hi, your order has shipped.'],
], JSON_UNESCAPED_UNICODE),
]);
$response = curl_exec($ch);
// 202 only means accepted — poll the message or use webhooks for the real status
{ "id": "msg_01923abc", "status": "accepted" }X-Webhook-EventBlueMedia issues the Key and configures its authorization scope.
Call GET /whoami to confirm the Key works and read your scope.
Pick a registered number’s pn_… ID to send from.
202 means accepted; track delivery with webhooks.
From customer authorization and phone number registration through message delivery and billing, every step has persisted state and recoverable retries. No guesswork.
The 24-hour window, idempotency keys, reservations and reversals, rate limits on the Meta side — where a warning belongs, there is one, instead of just a field table.
Every failure code says whether it is retryable and whether the caller or the platform has to fix it, so you never have to cross-reference Meta’s raw error table again.