curl --request POST 'https://api.brightalk.ai/calls' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header "Brightalk-Version: 2026-07-16" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: createCall-example-001" \
--data '{"agent_id":"agt_demo_001","contact_id":"con_demo_001"}'const response = await fetch("https://api.brightalk.ai/calls", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BRIGHTALK_API_KEY}`,
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "createCall-example-001",
},
body: JSON.stringify({"agent_id":"agt_demo_001","contact_id":"con_demo_001"}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.request(
"POST",
"https://api.brightalk.ai/calls",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "createCall-example-001",
},
json={"agent_id":"agt_demo_001","contact_id":"con_demo_001"},
)
print(response.status_code, response.json()){
"id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"answer_status": "answered",
"contact_id": "con_demo_001",
"agent_id": "agt_demo_001",
"queued_at": "2026-07-20T01:00:00Z",
"created_at": "2026-07-20T01:00:00Z",
"updated_at": "2026-07-20T01:00:00Z",
"batch_id": "bat_demo_001",
"automation_run_id": "run_demo_001",
"outcome": "qualified",
"outcome_reason": "Requested a follow-up.",
"summary": "Customer requested a follow-up next week.",
"duration_seconds": 92,
"dialing_at": "2026-07-20T01:00:00Z",
"connected_at": "2026-07-20T01:00:00Z",
"ended_at": "2026-07-20T01:00:00Z",
"cancel_requested_at": "2026-07-20T01:00:00Z",
"cancelled_at": "2026-07-20T01:00:00Z"
}將一通立即執行的 AI 通話加入佇列
以持久方式將一通 AI 通話排入佇列,使其可立即執行。容量限制可能使已接受的通話繼續留在佇列中。必須提供 Idempotency-Key,且原始 JSON 主體上限為 1 MiB。每個回應都包含 Brightalk-Version 與 X-Request-Id;受到速率限制的回應還會提供實際套用之配額群組的計數器。
curl --request POST 'https://api.brightalk.ai/calls' \
--header "Authorization: Bearer $BRIGHTALK_API_KEY" \
--header "Brightalk-Version: 2026-07-16" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: createCall-example-001" \
--data '{"agent_id":"agt_demo_001","contact_id":"con_demo_001"}'const response = await fetch("https://api.brightalk.ai/calls", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BRIGHTALK_API_KEY}`,
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "createCall-example-001",
},
body: JSON.stringify({"agent_id":"agt_demo_001","contact_id":"con_demo_001"}),
});
console.log(response.status, await response.json());import os
import requests
response = requests.request(
"POST",
"https://api.brightalk.ai/calls",
headers={
"Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
"Brightalk-Version": "2026-07-16",
"Content-Type": "application/json",
"Idempotency-Key": "createCall-example-001",
},
json={"agent_id":"agt_demo_001","contact_id":"con_demo_001"},
)
print(response.status_code, response.json()){
"id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"answer_status": "answered",
"contact_id": "con_demo_001",
"agent_id": "agt_demo_001",
"queued_at": "2026-07-20T01:00:00Z",
"created_at": "2026-07-20T01:00:00Z",
"updated_at": "2026-07-20T01:00:00Z",
"batch_id": "bat_demo_001",
"automation_run_id": "run_demo_001",
"outcome": "qualified",
"outcome_reason": "Requested a follow-up.",
"summary": "Customer requested a follow-up next week.",
"duration_seconds": 92,
"dialing_at": "2026-07-20T01:00:00Z",
"connected_at": "2026-07-20T01:00:00Z",
"ended_at": "2026-07-20T01:00:00Z",
"cancel_requested_at": "2026-07-20T01:00:00Z",
"cancelled_at": "2026-07-20T01:00:00Z"
}授權
Use a server-side Brightalk API key in the Authorization header.
標頭
選擇以日期為基礎的 API 版本。省略時會使用組織固定的預設版本。
"2026-07-16"由呼叫端產生且符合 [A-Za-z0-9._:-]{1,64} 的關聯值。無效值會被取代。
64^[A-Za-z0-9._:-]{1,64}$保留 24 小時的非機密金鑰。僅可為語意相同的請求重複使用。
1 - 255^(?=.{1,255}$)[\x21-\x7e](?:[\x20-\x7e]*[\x21-\x7e])?$主體
JSON request body. The raw encoded body is limited to 1 MiB and unknown fields are rejected.
回應
通話已由持久佇列接受。
不透明的資源識別碼。
1 - 255"11111111-1111-4111-8111-111111111111"
queued, dialing, in_progress, completed, failed, cancelled answered, no_answer, busy, voicemail, unknown 不透明的資源識別碼。
1 - 255"con_demo_001"
不透明的資源識別碼。
1 - 255"agt_demo_001"
通話進入持久佇列的時間。
"2026-07-20T01:00:00Z"
公開通話資源的建立時間。
"2026-07-20T01:00:00Z"
通話資源上次更新的時間。
"2026-07-20T01:00:00Z"
不透明的資源識別碼。
1 - 255"bat_demo_001"
不透明的資源識別碼。
1 - 255"run_demo_001"
標準化或設定的業務結果。
"qualified"
結果的簡短原因。
"Requested a follow-up."
簡短的通話摘要。
"Customer requested a follow-up next week."
x >= 092
開始撥號的時間。
"2026-07-20T01:00:00Z"
通話接通的時間。
"2026-07-20T01:00:00Z"
通話結束的時間。
"2026-07-20T01:00:00Z"
要求取消的時間。
"2026-07-20T01:00:00Z"
取消在終止狀態競爭中勝出的時間。
"2026-07-20T01:00:00Z"