API reference

โดเมน

จัดเตรียมตัวตนผู้ส่งและทำความเข้าใจสถานะการยืนยัน DNS

POST/domains
API key

เพิ่มโดเมนผู้ส่ง

เพิ่มโดเมนผู้ส่ง

คำขอ
curl https://sendhq.cc/api/v1/domains \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example.com"}'
การตอบกลับ 201
{
  "id": "dom_…",
  "name": "example.com",
  "status": "pending",
  "records": []
}
GET/domains
API key

แสดงรายการโดเมนและสถานะ DNS ที่แคชไว้

แสดงรายการโดเมนและสถานะ DNS ที่แคชไว้

คำขอ
curl https://sendhq.cc/api/v1/domains \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
การตอบกลับ 200
{
  "data": [],
  "count": 0
}
GET/domains/:id
API key

ดึงรายละเอียดการตั้งค่าโดเมน

ดึงรายละเอียดการตั้งค่าโดเมน

คำขอ
curl https://sendhq.cc/api/v1/domains/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
การตอบกลับ 200
{
  "id": "dom_…",
  "name": "example.com",
  "setup_status": "checking",
  "records": [],
  "dns_issues": []
}
POST/domains/:id/verify
API key

รีเฟรชการยืนยัน SES และ DNS

รีเฟรชการยืนยัน SES และ DNS

คำขอ
curl https://sendhq.cc/api/v1/domains/id_value/verify \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
การตอบกลับ 200
{
  "domain": {
    "id": "dom_…",
    "status": "verified"
  },
  "checks": {
    "ses": true
  },
  "status": "verified"
}
DELETE/domains/:id
API key

ลบโดเมน

ลบโดเมน

คำขอ
curl https://sendhq.cc/api/v1/domains/id_value \
  -X DELETE \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
การตอบกลับ 200
{
  "ok": true
}
GET/dns/provider
API key

ตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจและโฮสต์แบบสัมพัทธ์ของเรคคอร์ด

ตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจของโดเมนจาก nameserver จริง คืนโฮสต์แบบสัมพัทธ์ที่ต้องกรอกสำหรับทุกเรคคอร์ดที่จำเป็น เรคคอร์ด DMARC ที่แนะนำ สถานะ MX ขาเข้า และวิธีตั้งค่าแบบคลิกเดียวที่ใช้ได้

พารามิเตอร์คิวรีdomain_id
คำขอ
curl https://sendhq.cc/api/v1/dns/provider \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
การตอบกลับ 200
{
  "detectionStatus": "confirmed",
  "detected": "cloudflare",
  "zone": "example.com",
  "nameservers": [
    "ada.ns.cloudflare.com"
  ],
  "recordHosts": {},
  "inbound": {
    "available": true,
    "domain": null,
    "status": "not_configured",
    "record": null
  },
  "recommendations": [],
  "authentication": {},
  "providers": {
    "domainConnect": {
      "available": false,
      "providerName": null
    }
  }
}
GET/dns/domain-connect/connect
API key

สร้างลิงก์ขอความยินยอม Domain Connect สำหรับตั้งค่า DNS แบบคลิกเดียว

เมื่อผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจรองรับเทมเพลต Domain Connect ของ SendHQ จะคืน URL ขอความยินยอมของผู้ให้บริการที่ลงนามแล้ว ผู้ใช้ต้องเปิด URL และอนุมัติการเปลี่ยนแปลงที่ผู้ให้บริการ DNS SendHQ ไม่เคยได้รับข้อมูลรับรอง DNS แบบถาวร คืน 409 เมื่อผู้ให้บริการไม่รองรับเทมเพลต

พารามิเตอร์คิวรีdomain_idnext
คำขอ
curl https://sendhq.cc/api/v1/dns/domain-connect/connect \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
การตอบกลับ 200
{
  "url": "https://dns-provider.example/v2/domainTemplates/…",
  "providerName": "Example DNS"
}