เอกสารอ้างอิง API
รันไทม์POST

เริ่ม runtime

เริ่ม instance runtime ของบัญชี เป็นการควบคุม runtime ไม่ใช่การยืนยันตัวตน

https://api.unifyport.ai/v1/accounts/{account_id}/runtime/start

ส่วนหัว

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

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

Content-Type
stringจำเป็น

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

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

account_id
stringจำเป็น

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

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

จุดเชื่อมต่อนี้รับออบเจ็กต์ JSON ว่าง โปรดส่ง {} ตามตัวอย่างคำขอ

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

account_id
string

บัญชีของผู้ให้บริการที่การตอบกลับนี้อ้างถึง

provider
string

provider ที่ runtime ของมันดำเนินการนี้

enum: telegram, whatsapp, line, twitter, zalo, tiktok, whatsapp_protocol

action
string

การดำเนินการ runtime ที่ร้องขอ

enum: refresh_status, start, stop, reconnect

operation_status
string

สถานะว่าการดำเนินการ runtime ได้รับการยอมรับหรือเสร็จสิ้น

runtime_status
string

สถานะ runtime ที่ปรับเป็นมาตรฐาน หนึ่งในค่า unknown, starting, running, stopping, stopped, reconnecting, disconnected หรือ error

enum: unknown, starting, running, stopping, stopped, reconnecting, disconnected, error

runtime_error
string

ข้อผิดพลาด runtime ของ provider เมื่อดำเนินการไม่สำเร็จ

การตอบกลับ

200
200 OK

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

400
Bad Request

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

401
Unauthorized

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

409
Conflict

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

500
Internal Server Error

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

502
Bad Gateway

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

คำขอ

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

การตอบกลับ

{
  "data": {
    "runtime_status": "starting"
  }
}