curl --request POST \
--url https://api.wave.sa/v1/broadcasts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateName": "<string>",
"templateLanguage": "<string>",
"contactGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contactIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"templateVariables": {},
"scheduledAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.wave.sa/v1/broadcasts"
payload = {
"templateName": "<string>",
"templateLanguage": "<string>",
"contactGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contactIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"templateVariables": {},
"scheduledAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateName: '<string>',
templateLanguage: '<string>',
contactGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contactIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
templateVariables: {},
scheduledAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.wave.sa/v1/broadcasts', 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.wave.sa/v1/broadcasts",
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([
'templateName' => '<string>',
'templateLanguage' => '<string>',
'contactGroupId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contactIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'templateVariables' => [
],
'scheduledAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.wave.sa/v1/broadcasts"
payload := strings.NewReader("{\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"<string>\",\n \"contactGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"templateVariables\": {},\n \"scheduledAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wave.sa/v1/broadcasts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"<string>\",\n \"contactGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"templateVariables\": {},\n \"scheduledAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wave.sa/v1/broadcasts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"<string>\",\n \"contactGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"templateVariables\": {},\n \"scheduledAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"template_name": "<string>",
"template_language": "<string>",
"template_variables": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"status": "pending",
"result_summary": {},
"created_at": "2023-11-07T05:31:56Z"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}Create a broadcast
Sends one approved WhatsApp template to a saved contact group (contactGroupId) or to a list of your contacts (contactIds); send exactly one of the two. Without scheduledAt, or with a time in the past, the send starts now; with a future scheduledAt, the broadcast stays pending until then. A contact group has a recipient limit. Recipients whose number opted out (see /v1/consents) are skipped and counted in result_summary.skipped. Inside the quiet-hours window (KSA time, where one is set) each recipient fails with the reason QUIET_HOURS_ACTIVE. The answer is 202 with the broadcast; follow its status with GET /v1/broadcasts/{id}. Requires the broadcasts:write scope. Messaging is enabled per environment: where it is not enabled, every messaging, broadcast and contact route answers 503 with MESSAGES_DISABLED.
curl --request POST \
--url https://api.wave.sa/v1/broadcasts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"templateName": "<string>",
"templateLanguage": "<string>",
"contactGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contactIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"templateVariables": {},
"scheduledAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.wave.sa/v1/broadcasts"
payload = {
"templateName": "<string>",
"templateLanguage": "<string>",
"contactGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contactIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"templateVariables": {},
"scheduledAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateName: '<string>',
templateLanguage: '<string>',
contactGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contactIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
templateVariables: {},
scheduledAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.wave.sa/v1/broadcasts', 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.wave.sa/v1/broadcasts",
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([
'templateName' => '<string>',
'templateLanguage' => '<string>',
'contactGroupId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contactIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'templateVariables' => [
],
'scheduledAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.wave.sa/v1/broadcasts"
payload := strings.NewReader("{\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"<string>\",\n \"contactGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"templateVariables\": {},\n \"scheduledAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.wave.sa/v1/broadcasts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"<string>\",\n \"contactGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"templateVariables\": {},\n \"scheduledAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wave.sa/v1/broadcasts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateName\": \"<string>\",\n \"templateLanguage\": \"<string>\",\n \"contactGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"templateVariables\": {},\n \"scheduledAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"template_name": "<string>",
"template_language": "<string>",
"template_variables": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"status": "pending",
"result_summary": {},
"created_at": "2023-11-07T05:31:56Z"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error_code": "INVALID_API_KEY",
"message": "<string>",
"message_ar": "<string>",
"request_id": "<string>",
"docs_url": "<string>"
}Authorizations
Your API key from the Wave dashboard. Sandbox keys start sk_sandbox_; production keys start sk_live_. Send as Authorization: Bearer <key>. Some endpoints require a production key and specific scopes.
Body
Response
The broadcast is accepted
pending, processing, sent, failed, cancelled Send counts, once the broadcast has run.

