รับอีเมล: ผู้ติดต่อและกลุ่มเป้าหมาย
Get Delivery Status
การส่งถึงของอีเมลที่ส่งหนึ่งฉบับ แยกตามผู้รับ อ่านอย่างเดียว
https://g.sendcorex.com/v1command: get_delivery_statusstatus: delivered, sending, retrying, rate_limited, bounced, spam, not_sent, filtered หรือ suppressed
อาร์กิวเมนต์
idstringจำเป็นmessage_uidของอีเมลที่ส่งcursornumberไม่บังคับcursorของหน้าก่อน
เริ่มต้นอย่างรวดเร็ว
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1',
{
commands: [
{
command: "get_delivery_status",
args: {
id: "Vj0xQUJDMTIz"
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_TOKEN } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);การตอบกลับ
{
"type": "SUCCESS",
"results": [
{
"command": "get_delivery_status",
"id": "0",
"type": "SUCCESS",
"data": {
"total": 2,
"audience_total": null,
"recipients": [
{
"email": "ana@empresa.com",
"status": "delivered",
"reason": null,
"at": "2026-11-21T09:40:00Z"
},
{
"email": "joao@empresa.com",
"status": "bounced",
"reason": "550 mailbox not found",
"at": "2026-11-21T09:40:02Z"
}
],
"cursor": null
}
}
]
}ฟิลด์การตอบกลับ
totalผู้รับที่มีสถานะแล้วจนถึงตอนนี้
audience_totalการส่งในเวลาที่ดีที่สุด: จำนวนคนที่ได้รับระหว่างวัน
nullสำหรับการส่งปกติrecipients[]email,status,reasonและat50 ต่อหน้าcursorหน้าถัดไป หรือ
null
ข้อผิดพลาด
ข้อผิดพลาดระดับ HTTP ส่งกลับ type, code และ message ข้อผิดพลาดที่มีเครื่องหมาย CMD จะกลับมาในผลลัพธ์ของคำสั่ง พร้อม HTTP 200
- 401
TOKEN_EXPIREDaccess token หมดอายุแล้ว เรียก Refresh Token แล้วส่งคำขอซ้ำ
- 401
INVALID_TOKENโทเค็นผิดรูปแบบ ไม่รู้จัก หรือถูกเพิกถอน
- 429
RATE_LIMITEDเกิน 15 คำขอ/วินาที หรือ 15 คำขอพร้อมกันสำหรับ IP + กล่องจดหมายเดียวกัน รอจำนวนวินาทีใน Retry-After
- CMD
INVALID_ARGSอาร์กิวเมนต์ที่จำเป็นหายไปหรือไม่ถูกต้อง
- CMD
NOT_FOUNDไม่มีข้อความ เธรด หรือโฟลเดอร์นี้สำหรับโทเค็นนี้
- CMD
INTERNALข้อผิดพลาดของเซิร์ฟเวอร์ รายละเอียดเขียนเฉพาะในล็อกเซิร์ฟเวอร์