cURL
curl --request POST 'https://api.brightalk.ai/bulk-tasks' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header "Brightalk-Version: 2026-07-16" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: bulk-example-1" \
--data '{"kind":"sms","total_recipients":10000,"recipient_format":"recipients","upload_chunk_size":1000,"options":{"message":"Hello {{name}}","test_mode":true}}'const response = await fetch("https://api.brightalk.ai/bulk-tasks", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BRIGHTALK_API_KEY}`,
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "bulk-example-1"
},
body: JSON.stringify({"kind":"sms","total_recipients":10000,"recipient_format":"recipients","upload_chunk_size":1000,"options":{"message":"Hello {{name}}","test_mode":true}}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.request(
"POST",
"https://api.brightalk.ai/bulk-tasks",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "bulk-example-1"
},
json={"kind":"sms","total_recipients":10000,"recipient_format":"recipients","upload_chunk_size":1000,"options":{"message":"Hello {{name}}","test_mode":True}},
)
print(response.status_code, response.json()){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "calls",
"recipient_format": "contact_ids",
"status": "uploading",
"total_recipients": 4503599627370495,
"uploaded_recipients": 4503599627370495,
"submitted_recipients": 4503599627370495,
"settled_recipients": 4503599627370495,
"failed_recipients": 4503599627370495,
"unknown_recipients": 4503599627370495,
"total_parts": 4503599627370495,
"submitted_parts": 4503599627370495,
"failed_parts": 4503599627370495,
"error_code": "<string>",
"upload_chunk_size": 500,
"created_at": "<string>"
}批次撥號
建立大型任務
建立最多 100,000 筆簡訊或撥號任務,options 沿用既有批次欄位。必須上傳所有分段並明確啟動後,才會聯絡收件人。upload_chunk_size 預設為 1,000;每筆變數較大時可選較小值。每個請求的 JSON 仍須小於 1 MiB。
POST
/
bulk-tasks
cURL
curl --request POST 'https://api.brightalk.ai/bulk-tasks' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header "Brightalk-Version: 2026-07-16" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: bulk-example-1" \
--data '{"kind":"sms","total_recipients":10000,"recipient_format":"recipients","upload_chunk_size":1000,"options":{"message":"Hello {{name}}","test_mode":true}}'const response = await fetch("https://api.brightalk.ai/bulk-tasks", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.BRIGHTALK_API_KEY}`,
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "bulk-example-1"
},
body: JSON.stringify({"kind":"sms","total_recipients":10000,"recipient_format":"recipients","upload_chunk_size":1000,"options":{"message":"Hello {{name}}","test_mode":true}}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.request(
"POST",
"https://api.brightalk.ai/bulk-tasks",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "bulk-example-1"
},
json={"kind":"sms","total_recipients":10000,"recipient_format":"recipients","upload_chunk_size":1000,"options":{"message":"Hello {{name}}","test_mode":True}},
)
print(response.status_code, response.json()){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "calls",
"recipient_format": "contact_ids",
"status": "uploading",
"total_recipients": 4503599627370495,
"uploaded_recipients": 4503599627370495,
"submitted_recipients": 4503599627370495,
"settled_recipients": 4503599627370495,
"failed_recipients": 4503599627370495,
"unknown_recipients": 4503599627370495,
"total_parts": 4503599627370495,
"submitted_parts": 4503599627370495,
"failed_parts": 4503599627370495,
"error_code": "<string>",
"upload_chunk_size": 500,
"created_at": "<string>"
}標頭
主體
application/json
回應
已傳回任務狀態。已提交不代表已送達或執行完成。