รับอีเมล: การส่งและความไว้วางใจ

List Trust

แสดงผู้ส่งที่คุณตัดสินใจเรื่องความไว้วางใจแล้ว ไว้วางใจหรือไม่ไว้วางใจ

POSThttps://g.sendcorex.com/v1command: list_trust

ผู้ส่งที่เป็น default ไม่มีระเบียน จึงไม่แสดงที่นี่

อาร์กิวเมนต์

  • valuestringไม่บังคับ

    เฉพาะ trusted หรือเฉพาะ untrusted ไม่ใส่เพื่อดูทั้งสอง

  • limitnumberไม่บังคับ

    ขนาดหน้า 1 ถึง 100 ค่าเริ่มต้น 25

  • cursorstringไม่บังคับ

    next_cursor ของหน้าก่อน

เริ่มต้นอย่างรวดเร็ว

import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1',
  {
    commands: [
      {
        command: "list_trust",
        args: {
          value: "untrusted",
          limit: 50
        }
      }
    ]
  },
  { 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": "list_trust",
      "id": "0",
      "type": "SUCCESS",
      "data": {
        "senders": [
          {
            "from_email": "spammer@example.net",
            "trust_status": "untrusted",
            "is_trusted": false,
            "updated_at": "2026-10-09T11:40:12Z",
            "subscribed": false,
            "opened": true,
            "clicked": false
          }
        ],
        "has_more": false,
        "next_cursor": null
      }
    }
  ]
}

ฟิลด์การตอบกลับ

  • senders[].from_email

    ที่อยู่ผู้ส่ง

  • senders[].trust_status

    trusted หรือ untrusted

  • senders[].is_trusted

    true เฉพาะ trusted

  • senders[].updated_at

    เวลาที่บันทึกการตัดสินใจ

  • senders[].subscribed

    false เมื่อผู้ติดต่อนี้ยกเลิกรับจากกล่องจดหมายนี้

  • senders[].opened / senders[].clicked

    true เมื่อผู้ติดต่อนี้เปิด / คลิกอีเมลที่กล่องจดหมายนี้ส่ง

  • has_more / next_cursor

    การแบ่งหน้า

ข้อผิดพลาด

ข้อผิดพลาดระดับ HTTP ส่งกลับ type, code และ message ข้อผิดพลาดที่มีเครื่องหมาย CMD จะกลับมาในผลลัพธ์ของคำสั่ง พร้อม HTTP 200

  • 401TOKEN_EXPIRED

    access token หมดอายุแล้ว เรียก Refresh Token แล้วส่งคำขอซ้ำ

  • 401INVALID_TOKEN

    โทเค็นผิดรูปแบบ ไม่รู้จัก หรือถูกเพิกถอน

  • 429RATE_LIMITED

    เกิน 15 คำขอ/วินาที หรือ 15 คำขอพร้อมกันสำหรับ IP + กล่องจดหมายเดียวกัน รอจำนวนวินาทีใน Retry-After

  • CMDINVALID_ARGS

    อาร์กิวเมนต์ที่จำเป็นหายไปหรือไม่ถูกต้อง

  • CMDINVALID_CURSOR

    cursor ผิดรูปแบบหรือเป็นของบัญชีหรือโฟลเดอร์อื่น

  • CMDINTERNAL

    ข้อผิดพลาดของเซิร์ฟเวอร์ รายละเอียดเขียนเฉพาะในล็อกเซิร์ฟเวอร์