Collections

จัดกลุ่มสาย

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

ParamTypeNote
namestringrequired
descriptionstringoptional
color#RRGGBBoptional
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 จะมีช่องผลการวิเคราะห์ (tag score คะแนนลูกค้า transcriptUrl summaryUrl) เป็น 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

ParamTypeNote
callRecordingIdsarray<uuid>required (1-1000)

DELETE /collections/{id}/items

นำสายออกจากคอลเลกชัน — ?callRecordingId=A&callRecordingId=B

Scopes: manage_recording_collection