cURL
curl --request POST 'https://api.brightalk.ai/sms-batches' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header 'Brightalk-Version: 2026-07-16' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: webinar-example-001' \
--data '{"message":"Webinar reminder","recipients":[{"phone_number":"TAIWAN_MOBILE_E164"}],"test_mode":true}'const response = await fetch("https://api.brightalk.ai/sms-batches", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BRIGHTALK_API_KEY}`,
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "webinar-example-001"
},
body: JSON.stringify({
"message": "Webinar reminder",
"recipients": [
{
"phone_number": "TAIWAN_MOBILE_E164"
}
],
"test_mode": true
})
});
const result = await response.json();
console.log(result);import os
import requests
response = requests.post(
"https://api.brightalk.ai/sms-batches",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "webinar-example-001"
},
json={"message":"Webinar reminder","recipients":[{"phone_number":"TAIWAN_MOBILE_E164"}],"test_mode":True}
)
print(response.json()){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"total_recipients": 4503599627370495,
"completed_recipients": 4503599627370495,
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_id": "<string>",
"external_id": "<string>",
"status": "scheduled"
}
],
"metadata": {},
"reference_id": "<string>",
"external_id": "<string>",
"test_mode": true,
"created_at": "<string>"
}Integrations
發送或排程簡訊批次
發送或排程 1–1,000 位收件人的簡訊批次。每段扣 1 點。電信抬頭、[署名] 前綴、變數代入後的內容與最終短網址都計入。含中文、全形符號、換行、底線或反引號時使用中文編碼,單封 70 字;超過後每段 66 字,最多 6 段(396 字)。71–132 字扣 2 點,133–198 字扣 3 點。純 GSM 單封 160 單位;長簡訊每段 152 單位,最多 6 段(912 單位)。GSM 的 ^ [ ] ~ | \ 各佔 2 單位,分段時不拆開,其餘 GSM 字元各佔 1 單位。不支援 emoji/非 BMP 字元。一對一手動發送及 MCP brightalk_send_sms 另限單封 70 個 UTF-16 單位或 159 ASCII bytes。 每位收件人須在變數代入後分別計算段數與點數。
POST
/
sms-batches
cURL
curl --request POST 'https://api.brightalk.ai/sms-batches' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header 'Brightalk-Version: 2026-07-16' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: webinar-example-001' \
--data '{"message":"Webinar reminder","recipients":[{"phone_number":"TAIWAN_MOBILE_E164"}],"test_mode":true}'const response = await fetch("https://api.brightalk.ai/sms-batches", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BRIGHTALK_API_KEY}`,
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "webinar-example-001"
},
body: JSON.stringify({
"message": "Webinar reminder",
"recipients": [
{
"phone_number": "TAIWAN_MOBILE_E164"
}
],
"test_mode": true
})
});
const result = await response.json();
console.log(result);import os
import requests
response = requests.post(
"https://api.brightalk.ai/sms-batches",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "webinar-example-001"
},
json={"message":"Webinar reminder","recipients":[{"phone_number":"TAIWAN_MOBILE_E164"}],"test_mode":True}
)
print(response.json()){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"total_recipients": 4503599627370495,
"completed_recipients": 4503599627370495,
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_id": "<string>",
"external_id": "<string>",
"status": "scheduled"
}
],
"metadata": {},
"reference_id": "<string>",
"external_id": "<string>",
"test_mode": true,
"created_at": "<string>"
}標頭
主體
application/json
回應
已傳回結果。