Collections
ใช้จัดกลุ่มสาย — เช่น "training set", "QA Q2", "top performers" สายหนึ่งสายอยู่ได้หลายคอลเลกชัน
Account key: ทุก request ด้านล่างต้องส่ง
X-Business-Id: <business id>เพื่อเลือกธุรกิจที่จะทำงานด้วย (ถ้าไม่ส่งจะได้400 business_required) ส่วน business key จะไม่อ่าน header นี้ ดูเพิ่มที่ เริ่มต้นใช้งาน → API key ระดับบัญชี
GET /collections
ดูรายการคอลเลกชัน
Scopes: view_recording_all · view_recording_self · manage_recording_collection
POST /collections
สร้างคอลเลกชัน
Scopes: manage_recording_collection
| Param | Type | Note |
|---|---|---|
name | string | required |
description | string | optional |
color | #RRGGBB | optional |
curl -X POST https://phone.mcloud.co.th/api/v1/collections \
-H "Authorization: Bearer crk_..." \
-H "Content-Type: application/json" \
-d '{"name":"QA Q2","color":"#D6FF3A"}'
GET /collections/{id}
ดึงคอลเลกชันพร้อมสายที่อยู่ข้างใน
แพ็กเกจ: ถ้าแพ็กเกจไม่รวมการส่งผลการวิเคราะห์ออก สายใน
itemsจะมีช่องผลการวิเคราะห์ (tagscoreคะแนนลูกค้าtranscriptUrlsummaryUrl) เป็นnullและflagsเป็น[]ดู เริ่มต้นใช้งาน → Endpoint ที่ขึ้นกับแพ็กเกจ
Scopes: view_recording_all · view_recording_self · manage_recording_collection
PATCH /collections/{id}
แก้ชื่อ คำอธิบาย หรือสี
Scopes: manage_recording_collection
DELETE /collections/{id}
ลบคอลเลกชัน (รายการสายในคอลเลกชันจะถูกลบไปด้วย แต่ตัวสายยังอยู่)
Scopes: manage_recording_collection
POST /collections/{id}/items
เพิ่มสายเข้าคอลเลกชัน
Scopes: manage_recording_collection
| Param | Type | Note |
|---|---|---|
callRecordingIds | array<uuid> | required (1-1000) |
DELETE /collections/{id}/items
นำสายออกจากคอลเลกชัน — ?callRecordingId=A&callRecordingId=B
Scopes: manage_recording_collection