Nhận email: liên hệ và đối tượng
Get Delivery Status
Tình trạng giao của một email đã gửi, theo từng người nhận. Chỉ đọc.
https://g.sendcorex.com/v1command: get_delivery_statusstatus: delivered, sending, retrying, rate_limited, bounced, spam, not_sent, filtered hoặc suppressed.
Tham số
idstringbắt buộcmessage_uidcủa email đã gửi.cursornumberkhông bắt buộccursorcủa trang trước.
Bắt đầu nhanh
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);Phản hồi
{
"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
}
}
]
}Trường phản hồi
totalNgười nhận đã có trạng thái đến giờ.
audience_totalGửi vào giờ tốt nhất: bao nhiêu người nhận trong ngày.
nullvới lần gửi thường.recipients[]email,status,reasonvàat. 50 mỗi trang.cursorTrang tiếp theo, hoặc
null.
Lỗi
Lỗi ở mức HTTP trả về type, code và message. Lỗi đánh dấu CMD được trả về trong kết quả lệnh, với HTTP 200.
- 401
TOKEN_EXPIREDAccess token đã hết hạn. Gọi Refresh Token và lặp lại yêu cầu.
- 401
INVALID_TOKENToken sai định dạng, không xác định hoặc đã bị thu hồi.
- 429
RATE_LIMITEDHơn 15 yêu cầu/giây hoặc 15 yêu cầu đồng thời cho cùng IP + hộp thư. Chờ số giây trong Retry-After.
- CMD
INVALID_ARGSThiếu hoặc sai tham số bắt buộc.
- CMD
NOT_FOUNDThư, thread hoặc thư mục không tồn tại với token này.
- CMD
INTERNALLỗi máy chủ. Chi tiết chỉ được ghi vào log máy chủ.