cURL
curl --request POST 'https://api.brightalk.ai/sms' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header 'Brightalk-Version: 2026-07-16' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: webinar-example-001' \
--data '{"phone_number":"TAIWAN_MOBILE_E164","message":"Webinar reminder","test_mode":true}'const response = await fetch("https://api.brightalk.ai/sms", {
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({
"phone_number": "TAIWAN_MOBILE_E164",
"message": "Webinar reminder",
"test_mode": true
})
});
const result = await response.json();
console.log(result);import os
import requests
response = requests.post(
"https://api.brightalk.ai/sms",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "webinar-example-001"
},
json={"phone_number":"TAIWAN_MOBILE_E164","message":"Webinar reminder","test_mode":True}
)
print(response.json()){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"phone_number": "<string>",
"message": "<string>",
"segments": 3,
"credits_reserved": 1,
"credits_deducted": 1,
"metadata": {},
"reference_id": "<string>",
"external_id": "<string>",
"test_mode": true,
"error_code": "<string>",
"created_at": "<string>",
"expires_at": "<string>"
}
Integrations
發送或排程一封簡訊
發送或排程單一收件人的簡訊,支援長簡訊。每段扣 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
cURL
curl --request POST 'https://api.brightalk.ai/sms' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header 'Brightalk-Version: 2026-07-16' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: webinar-example-001' \
--data '{"phone_number":"TAIWAN_MOBILE_E164","message":"Webinar reminder","test_mode":true}'const response = await fetch("https://api.brightalk.ai/sms", {
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({
"phone_number": "TAIWAN_MOBILE_E164",
"message": "Webinar reminder",
"test_mode": true
})
});
const result = await response.json();
console.log(result);import os
import requests
response = requests.post(
"https://api.brightalk.ai/sms",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "webinar-example-001"
},
json={"phone_number":"TAIWAN_MOBILE_E164","message":"Webinar reminder","test_mode":True}
)
print(response.json()){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "scheduled",
"phone_number": "<string>",
"message": "<string>",
"segments": 3,
"credits_reserved": 1,
"credits_deducted": 1,
"metadata": {},
"reference_id": "<string>",
"external_id": "<string>",
"test_mode": true,
"error_code": "<string>",
"created_at": "<string>",
"expires_at": "<string>"
}
標頭
主體
application/json
回應
已傳回結果。