API reference
บัญชีและการเรียกเก็บเงิน
อ่านข้อมูลการใช้งานบัญชี analytics และเมทาดาทาของคีย์ด้วย API key การเปลี่ยนแปลงการเรียกเก็บเงินและการสร้างหรือเพิกถอนคีย์ต้องใช้เซสชันแดชบอร์ด
ไม่มีรายการที่ตรงกับตัวกรองนี้
/accountดึงข้อมูลบัญชี การใช้งาน สถานะการเรียกเก็บเงิน และจำนวนเวิร์กสเปซด้วย API key
เทียบเท่าโปรไฟล์ในแดชบอร์ดสำหรับ API key ได้แก่ เจ้าของบัญชี การใช้งานผู้รับและไฟล์แนบในรอบปัจจุบันเทียบกับขีดจำกัดของแพ็กเกจ ระดับการเข้าถึง สรุปชื่อเสียงผู้ส่ง สถานะการสมัครใช้ แพ็กเกจที่เผยแพร่ และจำนวนเวิร์กสเปซ อ่านอย่างเดียว การเปลี่ยนแปลงการเรียกเก็บเงินยังทำได้เฉพาะผ่านเซสชัน
curl https://sendhq.cc/api/v1/account \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"user": {},
"usage": {},
"access": {},
"reputation": {},
"infrastructure": {},
"billing": {},
"plans": [],
"workspace": {
"mailer": "ses",
"stats": {}
}
}/account/diagnosticsDiagnose sending and receiving problems in the workspace
Read-only troubleshooting snapshot from stored state: an `issues` list in plain language, plan and usage against limits, each domain's DKIM and inbound state, sending identities, 30-day deliverability and sender reputation, suppressions and unsubscribes, the last 30 days of messages that were not sent with their reasons, bounce, complaint and reject events, and webhook delivery health. Never returns message bodies, API keys or webhook secrets.
curl https://sendhq.cc/api/v1/account/diagnostics \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"generatedAt": "2026-10-30T12:00:00.000Z",
"windowDays": 30,
"issues": [
{
"severity": "action",
"code": "domain_unverified",
"message": "example.com is not verified (pending); 2 of 3 DKIM records are not visible in DNS yet."
}
],
"plan": {},
"domains": [],
"sendingIdentities": {
"domains": [],
"addresses": []
},
"inbound": {},
"deliverability": {},
"suppressions": {},
"failures": {
"notSent": [],
"recentNotSent": [],
"recentProviderEvents": []
},
"webhooks": []
}/analyticsดึง analytics การส่งของแดชบอร์ดสำหรับ 7, 30 หรือ 90 วัน
ยอดรวมของอีเมลที่ส่ง รับ ส่งถึง ตีกลับ บล็อก เปิด คลิก และการร้องเรียนในช่วงเวลานั้น ไทม์ไลน์ส่ง/รับรายวัน โดเมนผู้ส่งอันดับต้น ๆ และหัวเรื่องที่ทำผลงานดีที่สุด
curl https://sendhq.cc/api/v1/analytics \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"window": "30d",
"days": 30,
"metrics": {
"sent": 0,
"received": 0,
"bounced": 0,
"blocked": 0,
"delivered": 0,
"opened": 0,
"clicks": 0,
"complaints": 0
},
"timeline": [],
"domains": [],
"topContent": []
}/profileดึงข้อมูลบัญชี การใช้งาน และสถานะการสมัครใช้แบบซ้อนกัน
ดึงข้อมูลบัญชี การใช้งาน และสถานะการสมัครใช้แบบซ้อนกัน
curl https://sendhq.cc/api/v1/profile \
-X GET \
-H "Cookie: sendhq_session_v2=…"{
"user": {},
"usage": {},
"access": {},
"reputation": {},
"billing": {},
"plans": []
}/billing/checkoutเริ่มการชำระเงินแบบโฮสต์สำหรับแพ็กเกจที่ยังไม่มี (ระดับ คลาสข้อความ และรอบการเรียกเก็บเงิน)
เริ่มการชำระเงินแบบโฮสต์สำหรับแพ็กเกจที่ยังไม่มี (ระดับ คลาสข้อความ และรอบการเรียกเก็บเงิน)
curl https://sendhq.cc/api/v1/billing/checkout \
-X POST \
-H "Cookie: sendhq_session_v2=…" \
-H "Content-Type: application/json" \
-d '{"plan_key":"scaleup_marketing_annual"}'{
"url": "https://checkout.example/…",
"session_id": "…"
}/billing/cancelยกเลิกการสมัครใช้ปัจจุบันภายในแอปโดยไม่แตะต้องผู้ให้บริการ
ยกเลิกการสมัครใช้ปัจจุบันภายในแอปโดยไม่แตะต้องผู้ให้บริการ
curl https://sendhq.cc/api/v1/billing/cancel \
-X POST \
-H "Cookie: sendhq_session_v2=…"{
"ok": true
}/keysสร้าง API key
สร้าง API key
curl https://sendhq.cc/api/v1/keys \
-X POST \
-H "Cookie: sendhq_session_v2=…" \
-H "Content-Type: application/json" \
-d '{"name":"Production"}'{
"id": "key_…",
"name": "Production",
"key": "re_…",
"prefix": "re_…"
}/keysแสดงรายการเมทาดาทาของ API key
แสดงชื่อคีย์ พรีฟิกซ์ที่ไม่เป็นความลับ และเวลาที่ใช้ล่าสุด ค่าคีย์เต็มจะไม่ถูกส่งกลับ การสร้างและเพิกถอนคีย์ต้องใช้เซสชันแดชบอร์ด
curl https://sendhq.cc/api/v1/keys \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}/keys/:idเพิกถอน API key
เพิกถอน API key
curl https://sendhq.cc/api/v1/keys/id_value \
-X DELETE \
-H "Cookie: sendhq_session_v2=…"{
"ok": true
}