เอกสารอ้างอิง API
บทสนทนาPOST

Mark conversation as unread

Marks a conversation as unread. Pass conversation_id in the JSON body.

https://api.unifyport.ai/v1/accounts/{account_id}/conversations/unread

ส่วนหัว

X-Api-Key
stringจำเป็น

API key ของพื้นที่ทำงาน ระบบจะระบุพื้นที่ทำงานจากส่วนหัวนี้

Content-Type
stringจำเป็น

ใช้ application/json เมื่อต้องส่งเนื้อหาของคำขอเป็น JSON

พารามิเตอร์ใน path

account_id
stringจำเป็น

ตัวระบุที่ใช้ใน route ของ conversations

เนื้อหาของคำขอ

conversation_id
stringจำเป็น

ตัวระบุบทสนทนาเป้าหมาย

เนื้อหาการตอบกลับ

ok
boolean

เป็น true เสมอเมื่อการดำเนินการสำเร็จ ส่วนกรณีล้มเหลวจะคืนสถานะที่ไม่ใช่ 2xx แทน

การตอบกลับ

200
200 OK

คำขอสำเร็จ ดูตัวอย่างเนื้อหาตอบกลับด้านบน

400
Bad Request

เนื้อหาของคำขอ path หรือพารามิเตอร์ไม่ถูกต้อง

401
Unauthorized

ส่วนหัว X-Api-Key หายไปหรือไม่ถูกต้อง

404
Not Found

ไม่พบทรัพยากรของ provider ที่ร้องขอ

409
Conflict

การดำเนินการขัดแย้งกับบัญชีของผู้ให้บริการหรือทรัพยากรที่มีอยู่

500
Internal Server Error

บริการพบข้อผิดพลาดที่ไม่คาดคิด

501
Not Implemented

provider ที่เลือกยังไม่รองรับการดำเนินการนี้

502
Bad Gateway

อะแดปเตอร์หรือ upstream provider ไม่สามารถทำรายการให้เสร็จได้

คำขอ

curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/conversations/unread \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "conversation_id": "peer_example"
}'

การตอบกลับ

{
  "data": {
    "ok": true
  }
}