สำหรับเอเจนต์ AI
MCP server ของ SendHQ
Give an AI agent full, safe control of one SendHQ workspace: send and receive email, verify domains, publish templates, and investigate deliverability through 142 strictly typed tools. Written for agents first; humans welcome.
curl -fsSL https://downloads.sendhq.cc/install.sh | sh
claude mcp add sendhq --env SENDHQ_API_KEY=re_your_key -- sendhq mcpเซิร์ฟเวอร์นี้คืออะไร
The SendHQ MCP server lets an AI agent operate one SendHQ workspace through the Model Context Protocol: send email (single, batch, templated, replies, attachments, idempotent retries), read and search sent and received mail (subjects, bodies, and attachment names) and its delivery events, organize mail into labels with auto-filing rules, manage drafts and private attachments, author and publish hosted templates, add and verify domains and their DNS, set up inbound receiving and inbound addresses, inspect deliverability, bounces, complaints, and suppressions, run newsletters (consented contacts with tags and custom fields, segments, lists with signup forms, welcome emails, and newsletter sites, and broadcasts with pre-send checks, test sends, scheduling, and bot-filtered open and click reports), and read account usage, billing state, analytics, and API-key metadata.
เป็นเซิร์ฟเวอร์ stdio ในเครื่องที่ฝังอยู่ในไบนารี CLI sendhq MCP client ของคุณเริ่ม sendhq mcp เป็นโปรเซสลูกและสื่อสาร JSON-RPC ผ่าน stdin/stdout การเรียกเครื่องมือทุกครั้งกลายเป็นคำขอที่มีเอกสารหนึ่งรายการไปยัง SendHQ REST API ที่ https://sendhq.cc/api/v1 โดยยืนยันตัวตนด้วย API key ของเวิร์กสเปซคุณ ดังนั้น MCP server จึงมีสิทธิ์เท่ากับคีย์นั้นทุกประการและไม่เกินกว่านั้น
- 142 tools in 10 groups, generated from one catalog that is also published as tools.json.
- JSON Schema ที่เข้มงวด: อาร์กิวเมนต์ที่ไม่รู้จัก ชนิดที่ผิด และฟิลด์บังคับที่ขาดหายจะถูกปฏิเสธในเครื่องก่อนที่จะไปถึง SendHQ
- ข้อผิดพลาดแบบมีโครงสร้าง พร้อม
codeที่คงที่statusของ HTTPexplanationremedyที่เป็นรูปธรรม และข้อมูลว่าการลองใหม่ช่วยได้หรือไม่ - ทุกเครื่องมือที่ส่งอีเมลจริงหรือทำลายข้อมูลจะระบุไว้ในคำแรกของคำอธิบาย และมี MCP safety annotation
- โหมด
--read-onlyซ่อนทุกเครื่องมือที่ส่งและเปลี่ยนแปลงข้อมูล - ไม่มีการบันทึกล็อกใด ๆ stdout ส่งเฉพาะข้อความโปรโตคอล API key และเนื้อหาข้อความจะไม่ไปถึงล็อกเลย
https://sendhq.cc/api/mcp (ค้นหาราคาและเอกสาร ไม่เข้าถึงบัญชี) เซิร์ฟเวอร์ในหน้านี้เป็นตัวเต็มที่ผูกกับบัญชี ทำงานในเครื่องหรือเป็นคอนเน็กเตอร์แบบโฮสต์ด้านล่างUse SendHQ in Claude, ChatGPT and Grok
ไม่ต้องติดตั้ง SendHQ ยังให้บริการเซิร์ฟเวอร์นี้เป็นคอนเน็กเตอร์แบบโฮสต์ที่ https://mcp.sendhq.cc/mcp พร้อมเครื่องมือชุดเดียวกัน คุณเข้าสู่ระบบด้วยบัญชี SendHQ แทนการวางคีย์
Claude
- เปิด Settings → Connectors แล้วค้นหา SendHQ ในไดเรกทอรี หรือเลือก Add custom connector แล้ววาง
https://mcp.sendhq.cc/mcp - คลิก Connect เข้าสู่ระบบ SendHQ ตรวจสอบสิทธิ์การเข้าถึง แล้วคลิก Allow
- ขอให้ Claude ตรวจสอบกล่องจดหมายของคุณ ส่งอีเมลจากโดเมนที่ยืนยันแล้วของคุณ หรืออธิบายอีเมลตีกลับ
ChatGPT
- Open Settings → Security and login and turn on Developer mode.
- Go to chatgpt.com/plugins, click Create MCP app, name it SendHQ and enter
https://mcp.sendhq.cc/mcp. - Sign in to SendHQ and click Allow, then pick SendHQ from the tools menu in a new chat.
Grok
- Go to grok.com/connectors, click New Connector, then Custom.
- Enter
https://mcp.sendhq.cc/mcp, sign in to SendHQ and click Allow.
Muse by Meta
In Muse, open Connectors and search for SendHQ. Click Connect, sign in to SendHQ and click Allow.
การอนุมัติและการตัดการเชื่อมต่อ
- The
request_featuretool sends a feature request to the SendHQ team with your account details, so we can follow up by email. - เครื่องมือที่ส่งอีเมลจริงหรือลบข้อมูลจะมีป้ายกำกับระบุไว้ การที่ผู้ช่วยจะถามคุณก่อนหรือไม่ตั้งค่าต่อเครื่องมือในตัวผู้ช่วย ใน Claude ให้เลือก Needs approval สำหรับเครื่องมือเหล่านั้นที่ Settings → Connectors → SendHQ
- คอนเน็กเตอร์จะได้ API key ของตัวเองซึ่งตั้งชื่อตามผู้ช่วย (เช่น “Claude (AI connector)”) ลบที่ API Keys เพื่อตัดการเชื่อมต่อทันที
- ไม่สามารถสร้างหรือเพิกถอน API key หรือเปลี่ยนการเรียกเก็บเงินได้ ไฟล์แนบส่งและคืนเป็น base64 ไม่มีการเข้าถึงไฟล์ในเครื่อง
- Sending requires an active subscription. There is no free allowance, including mail to the account owner.
คำถาม: postmaster@sendhq.cc ความเป็นส่วนตัว: sendhq.cc/privacy
ติดตั้ง
ติดตั้งไบนารี sendhq (Linux, macOS และ Windows บน x86-64 และ arm64) ตัวติดตั้งจะตรวจสอบ checksum ของรุ่นที่ปล่อยและวางไบนารีไว้ที่ ~/.local/bin เป็นค่าเริ่มต้น
curl -fsSL https://downloads.sendhq.cc/install.sh | shirm https://downloads.sendhq.cc/install.ps1 | iexsendhq version
SENDHQ_API_KEY=re_your_key sendhq doctorสร้าง API key ในแดชบอร์ดที่ https://sendhq.cc/app#/keys MCP server สร้างคีย์ไม่ได้ คำสั่งเดียวที่รันเซิร์ฟเวอร์คือ:
SENDHQ_API_KEY=re_your_key sendhq mcpโดยปกติคุณไม่ต้องรันคำสั่งนั้นด้วยตนเอง MCP client จะเรียกให้ เมื่อรันในเทอร์มินัล มันจะรอ JSON-RPC บน stdin
ตั้งค่าไคลเอนต์ของคุณ
Claude Code
claude mcp add sendhq --env SENDHQ_API_KEY=re_your_key -- sendhq mcp
# read-only variant
claude mcp add sendhq-readonly --env SENDHQ_API_KEY=re_your_key -- sendhq mcp --read-onlyเพิ่ม --scope user เพื่อให้ใช้ได้ในทุกโปรเจกต์ หรือ --scope project เพื่อเขียนลงใน .mcp.json ของโปรเจกต์ สำหรับ .mcp.json ที่ใช้ร่วมกัน ให้อ้างอิงคีย์จากตัวแปรสภาพแวดล้อมแทนการคอมมิต Claude Code จะขยาย ${VAR} ใน .mcp.json
{
"mcpServers": {
"sendhq": {
"command": "sendhq",
"args": [
"mcp"
],
"env": {
"SENDHQ_API_KEY": "${SENDHQ_API_KEY}"
}
}
}
}OpenAI Codex
[mcp_servers.sendhq]
command = "sendhq"
args = ["mcp"]
env = { SENDHQ_API_KEY = "re_your_key" }หรือจากบรรทัดคำสั่ง: codex mcp add sendhq --env SENDHQ_API_KEY=re_your_key -- sendhq mcp
Claude Desktop
แก้ไข claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) แล้วรีสตาร์ทแอป แอปเดสก์ท็อปไม่สืบทอด PATH ของเชลล์คุณ จึงให้ใช้พาธสัมบูรณ์ของไบนารี (which sendhq)
{
"mcpServers": {
"sendhq": {
"command": "/Users/you/.local/bin/sendhq",
"args": [
"mcp"
],
"env": {
"SENDHQ_API_KEY": "re_your_key"
}
}
}
}MCP client อื่น ๆ
ตั้งค่า stdio server ด้วยคำสั่ง sendhq อาร์กิวเมนต์ ["mcp"] (ใส่ "--read-only" ได้หากต้องการ) และตัวแปรสภาพแวดล้อมด้านล่าง เซิร์ฟเวอร์รองรับ MCP protocol เวอร์ชัน 2024-11-05, 2025-03-26, 2025-06-18 และ 2025-11-25 และทำงาน initialize, ping, tools/list และ tools/call ผลลัพธ์ของเครื่องมือมีทั้งบล็อกข้อความ JSON และ structuredContent
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_service_health","arguments":{}}}เซิร์ฟเวอร์ที่ผูกกับบัญชีไม่มีทรานสปอร์ต HTTP แบบโฮสต์ endpoint MCP ระยะไกลที่เขียนได้ต้องใช้ OAuth ต่อผู้ใช้ ซึ่ง SendHQ ไม่มี ไบนารีในเครื่องเก็บคีย์ไว้บนเครื่องที่ถือคีย์อยู่แล้ว
สภาพแวดล้อมและแฟลก
| ตัวแปรหรือแฟลก | จำเป็น | ความหมาย |
|---|---|---|
SENDHQ_API_KEY | ใช่ | API key ของเวิร์กสเปซ (re_…) ทุกเครื่องมือยกเว้น get_service_health ต้องใช้ หากไม่มี เซิร์ฟเวอร์ยังเริ่มทำงานได้และทุกการเรียกจะคืน auth_error แบบมีโครงสร้างที่อธิบายวิธีแก้ |
SENDHQ_API_BASE_URL | ไม่ | API base URL ค่าเริ่มต้นคือ https://sendhq.cc/api/v1 ใช้เฉพาะกับการติดตั้งในเครื่องหรือ staging SENDHQ_BASE_URL ยังรับเป็นชื่อเรียกแบบเก่า |
SENDHQ_MCP_READ_ONLY | ไม่ | 1, true หรือ yes ทำงานเหมือน --read-only |
--read-only | ไม่ | เปิดเผยเฉพาะเครื่องมือที่ไม่ส่งอีเมลและไม่เปลี่ยนสถานะ เครื่องมือที่ซ่อนไว้จะถูกปฏิเสธด้วยหากเรียกด้วยชื่อ |
SENDHQ_PROFILE / --profile | ไม่ | ใช้คีย์ที่จัดเก็บโดย sendhq auth login ใน keyring ของระบบปฏิบัติการ แทน SENDHQ_API_KEY หากมีทั้งสองอย่าง ตัวแปรสภาพแวดล้อมจะมีผลเหนือกว่า |
คีย์ถูกส่งเฉพาะในเฮดเดอร์ Authorization: Bearer ไปยัง base URL ที่ตั้งค่าไว้ จะไม่มีการพิมพ์ บันทึกล็อก สะท้อนในข้อผิดพลาด หรือรวมในผลลัพธ์ของเครื่องมือ
โมเดลความปลอดภัยสำหรับเอเจนต์
- Sends real email.
send_email,send_batch,send_template_test,send_broadcast,send_broadcast_test,schedule_broadcast(at the scheduled time), andsend_broadcast_to_moredeliver mail to real people and consume delivery credits. Their descriptions start withSENDS REAL EMAIL. Call them only when the user explicitly asked for that specific message to be sent, with the recipients, sender, and content confirmed. - Destructive.
delete_email,delete_draft,delete_attachment,delete_domain,delete_inbox,remove_suppression, the campaign deletes (delete_contact,delete_list,remove_list_contact,delete_broadcast,cancel_broadcast,delete_segment,delete_contact_field), andbulk_update_contactsare markeddestructiveHint: trueand their descriptions start withDESTRUCTIVE. Confirm with the user first.remove_suppressionweakens a safety block and is appropriate only when a human confirms the address works again. - เปลี่ยนสถานะ การสร้างหรืออัปเดตฉบับร่าง เทมเพลต โดเมน และกล่องจดหมาย การเผยแพร่เทมเพลต และการเริ่มการยืนยัน จะเปลี่ยนเวิร์กสเปซแต่ไม่ส่งอีเมล
- อ่านอย่างเดียว ที่เหลือทั้งหมดเป็น
readOnlyHint: trueและเรียกใช้ได้อย่างอิสระโดยปลอดภัย - เซิร์ฟเวอร์นี้ไม่เปลี่ยน DNS เลย
add_domainคืนเรคคอร์ดให้มนุษย์เผยแพร่get_domain_connect_linkคืน URL ขอความยินยอมที่บุคคลต้องเปิดและอนุมัติที่ผู้ให้บริการ DNS ของตน - เซิร์ฟเวอร์นี้ไม่เปลี่ยนการเรียกเก็บเงินเลย
get_accountอ่านเฉพาะแพ็กเกจ การใช้งาน และสถานะการสมัคร - Sending requires an active subscription. There is no free allowance. Every send, including a test and a send to the account owner's own address, returns
subscription_required(402) until a plan is active. Lapsed, cancelled, and past-due subscriptions are refused the same way. The owner chooses a plan in the dashboard (Profile & Billing) or at https://sendhq.cc/pricing. Unpaid workspaces can still verify domains, create keys, and read the workspace. - Accepted is not delivered. A successful send returns an ID; delivery, bounce, and complaint evidence arrives later in
list_email_events. Never claim inbox placement or that a person read a message. Broadcast opens are estimates: privacy proxies and security scanners load images on their own, and requests that look automated are counted apart (machineinget_broadcast_report). - อย่าเปลี่ยนไปใช้ที่อยู่ From อื่นเพื่อเลี่ยงการหยุดชั่วคราวแบบ
423และอย่าเพิ่มผู้รับที่ยกเลิกการรับหรือร้องเรียนกลับเข้าไปอีก
API key อยู่นอกขอบเขต
โดยการออกแบบ ไม่มีเครื่องมือที่สร้าง แก้ไข หมุนเวียน เพิกถอน หรือลบ API key เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง list_api_keys คืนเฉพาะชื่อ คำนำหน้าที่ไม่เป็นความลับ และเวลาใช้งานล่าสุด การจัดการคีย์อยู่ในแดชบอร์ดกับมนุษย์ที่เข้าสู่ระบบ
เวิร์กโฟลว์
1. การส่งครั้งแรก
get_service_healthยืนยันว่าเข้าถึง API ได้ (ใช้งานได้โดยไม่ต้องมีคีย์)get_accountshows the plan (access.tier) and remaining quota. If there is no active plan, do not send: the call returnssubscription_required.list_sending_identitiesแสดงที่อยู่ From ที่คุณใช้ได้ หากว่างเปล่า ให้ทำเวิร์กโฟลว์โดเมนก่อน- ยืนยันผู้ส่ง ผู้รับ หัวเรื่อง และเนื้อหากับผู้ใช้ จากนั้นเรียก
send_emailพร้อมidempotency_key list_email_eventsพร้อมidที่ได้คืนมาจะแสดงdelivery,bounce,complaintหรือrejectเมื่อผู้ให้บริการรายงาน (โดยปกติภายในไม่กี่วินาทีถึงไม่กี่นาที)
{
"name": "send_email",
"arguments": {
"from": "Acme <hello@example.com>",
"to": [
"owner@example.com"
],
"subject": "SendHQ is connected",
"text": "It works.",
"idempotency_key": "first-send-2026-09-26"
}
}2. การยืนยันโดเมนตั้งแต่ต้นจนจบ
add_domainwithname: "example.com". The result includes the DNS records (DKIM CNAMEs, domain verification, SPF, recommended DMARC).get_dns_providerพร้อมdomain_idตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจ และคืนโฮสต์แบบสัมพัทธ์ที่ตรงกันที่ต้องกรอกสำหรับแต่ละเรคคอร์ดที่ผู้ให้บริการนั้น- If
providers.domainConnect.availableis true,get_domain_connect_linkreturns a consent URL. Give it to the human; nothing changes until they approve at the provider. Otherwise, give the human the records to publish. Never publish a second SPF record: merge SendHQ's SPF include (include:amazonses.com) into the existingv=spf1value. verify_domainrechecks DNS and DKIM verification. Status moves throughpending,checking, andpropagatingtoverified. Pollverify_domainorget_domainevery 30–60 seconds; DNS can take minutes to hours.- เมื่อ
statusเป็นverifiedที่อยู่ของโดเมนจะปรากฏในlist_sending_identities
3. Bounce, complaint และการระงับการส่ง
list_blocked_recipientsคืนทุกที่อยู่ที่ถูกบล็อกพร้อมเหตุผล (bounce,complaint,unsubscribe) และจำนวนสรุปlist_suppressionsคืนการระงับการส่งจาก hard bounce และ complaint ส่วนdeliverability_statsให้อัตราการส่งถึง bounce และ complaint ย้อนหลัง 30 วัน และlist_sender_reputationแสดงที่อยู่ From ที่ถูกจำกัดหรือหยุดชั่วคราว- การส่งที่มีผู้รับที่ถูกระงับการส่งจะล้มเหลวด้วย
422 recipient_suppressedให้ลบผู้รับรายนั้นแล้วส่งใหม่ - เรียก
remove_suppressionเฉพาะเมื่อมนุษย์ยืนยันว่ากล่องจดหมายที่เคยตีกลับใช้งานได้แล้วเท่านั้น การระงับการส่งจาก complaint เป็นแบบถาวร (409 complaint_suppression_locked)
4. รับอีเมลขาเข้า
- ต้องยืนยันโดเมน (มักเป็นโดเมนย่อย เช่น
inbound.example.com) setup_inboundจัดเตรียมการรับอีเมลและคืนเรคคอร์ด MX หนึ่งรายการ มนุษย์เป็นผู้เผยแพร่verify_inboundจนกว่าstatusจะเป็นreadycreate_inboxพร้อมdomain_idและlocal_part(เช่นsupport) สร้างsupport@inbound.example.com- poll
list_emailsพร้อมdirection: "in"และunread: true(ใส่inbox_idได้หากต้องการ) อ่านข้อความด้วยget_emailอ่านบทสนทนาด้วยget_threadไฟล์แนบด้วยdownload_attachmentและทำเครื่องหมายว่าจัดการแล้วด้วยmark_email(read: true) - ตอบกลับในเธรดเดิมด้วย
send_emailและreply_to_email_idSendHQ ตั้งค่า In-Reply-To, References และเธรดให้
5. Webhook และการแจ้งเตือนอีเวนต์
Webhooks push signed events to an endpoint a human configures in the dashboard or with the REST API (see /docs/webhooks): email events (email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.failed, email.received), contact.unsubscribed when a recipient unsubscribes from a marketing or automation email, and, for automations, automation.entered, automation.converted, and automation.exited. There is no webhook tool, because endpoint responses carry signing secrets. An agent without a webhook polls instead: list_email_events for one message's outcome, list_emails with status (for example bounced) or after for recent changes, list_emails with direction: "in" and unread: true for new inbound mail, and list_blocked_recipients for new suppressions. Poll no more than about once a minute per question.
6. วินิจฉัยความล้มเหลวในการส่งถึง
- ค้นหาข้อความ:
list_emailsพร้อมdirection: "out"และtoหรือqueryหรือget_emailหากคุณมี IDstatus: failedหมายความว่า SendHQ หรือผู้ให้บริการปฏิเสธในขั้นตอนการส่งเข้า ข้อผิดพลาดของอีเมลอธิบายสาเหตุ list_email_events:bounce(ถาวรหรือชั่วคราว พร้อมข้อมูลวินิจฉัยจากผู้ให้บริการ)complaint,rejectหรือdeliveryหากยังไม่มีอีเวนต์ แสดงว่าผู้ให้บริการยังไม่รายงาน ให้รอแล้วตรวจสอบอีกครั้ง- If the send call itself failed, read the error
code:subscription_required→ the owner activates a plan;sender_domain_unverified→ finish domain verification;recipient_suppressed→ the address hard-bounced or complained before;sender_paused→ inspectlist_sender_reputation;account_paused→ the workspace is paused for review, read the rates;daily_limit_reached→ wait until midnight UTC;quota_exhausted→get_accountusage. get_domainตรวจสอบว่า DKIM, SPF และ DMARC ยังเผยแพร่อยู่ ส่วนdeliverability_statsแสดงว่าปัญหาเกิดกับข้อความเดียวหรือเป็นแนวโน้ม- รายงานสิ่งที่หลักฐานแสดง อีเวนต์
deliveryหมายความว่าเซิร์ฟเวอร์ของผู้รับยอมรับข้อความ ไม่ได้หมายความว่าไปถึงกล่องจดหมายหรือถูกอ่านแล้ว
7. ดูแล bucket งาน (ป้ายกำกับ)
create_labelพร้อมname(เช่นAgent/Orders) และskip_inbox: trueซึ่งทำให้ป้ายกำกับเป็น bucket อีเมลที่ได้รับและได้ป้ายกำกับนี้จะถูกเก็บถาวร จึงปรากฏเฉพาะในป้ายกำกับ ไม่ปรากฏในกล่องเข้าของมนุษย์- ส่งอีเมลงานด้วย
send_email(หรือsend_batch) และlabels: ["Agent/Orders"]การตอบกลับในบทสนทนานั้นจะสืบทอดป้ายกำกับโดยอัตโนมัติและข้ามกล่องเข้า - สำหรับอีเมลที่เริ่มนอกบทสนทนาของคุณ ให้เพิ่มกฎการจัดเก็บ:
create_label_ruleพร้อมinbox_id(ที่อยู่เฉพาะ เช่นorders@…)fromtoหรือsubjectส่งapply_to_existing: trueเพื่อจัดเก็บอีเมลที่ได้รับไปแล้ว - ทำงานกับ bucket:
list_emailsพร้อมlabel: "Agent/Orders"direction: "in"และunread: trueอ่านด้วยget_emailหรือget_threadตอบกลับด้วยsend_emailและreply_to_email_idและmark_emailread: trueเมื่อจัดการแล้ว - ย้ายข้อความที่หลุดเข้าหรือออกด้วย
label_email(add/remove) การเพิ่มป้ายกำกับ bucket ให้ข้อความที่ได้รับจะเก็บถาวรข้อความนั้นด้วย - หากต้องการ
set_inbox_forwardingจะส่งสำเนาทุกอย่างที่ที่อยู่ผู้รับได้รับไปยังกล่องจดหมายอื่น (ปลายทางต้องยืนยันทางอีเมลก่อน)
{
"name": "send_email",
"arguments": {
"from": "Orders <orders@example.com>",
"to": [
"customer@example.net"
],
"subject": "Order 1042: confirm delivery window",
"text": "Reply with a time that works.",
"labels": [
"Agent/Orders"
],
"idempotency_key": "order-1042-window"
}
}8. ไฟล์แนบและเทมเพลต
แนบไฟล์ได้สูงสุด 10 ไฟล์ด้วย send_email attachments (แต่ละไฟล์ต้องมี content_base64 หรือ file_path ในเครื่อง โดย filename มีค่าเริ่มต้นเป็นชื่อไฟล์ของ basename) บนแพ็กเกจแบบชำระเงิน สำหรับเทมเพลตแบบโฮสต์: create_template → update_template_draft → render_template เพื่อดูตัวอย่างด้วยข้อมูลตัวอย่าง → send_template_test (ส่งอีเมลทดสอบจริงหนึ่งฉบับ) → publish_template จากนั้นส่งด้วย send_email หรือ send_batch โดยใช้ template: {key, data} และผู้รับ to หนึ่งรายพอดี
9. Send a newsletter
- Audience:
list_lists(orcreate_listwith a signup form), and optionallypreview_segmentthencreate_segmentto narrow it, for example to contacts taggedVIPwho opened in the last 90 days. Add only people who asked for your email: every subscribed contact needs aconsent_basis. get_newsletter_settings: ifpostalAddressis empty, ask the user for one and set it withupdate_newsletter_settings(marketing email needs it).create_broadcastwithlist_id, a verifiedfrom,subject,preview_text, content (markdownis simplest), and optionallyaudience(segment_id,limit,order: engaged).check_broadcast: fix everyblockitem and tell the user aboutwarnitems. Thensend_broadcast_testto the user's own address so they can look at it.- Only when the user says to send:
send_broadcastnow (with anidempotency_key), orschedule_broadcastwithscheduled_at(unschedule_broadcastto change it). - Follow up with
get_broadcast(delivery totals),get_broadcast_report(opens, clicks, links, inbox providers, against your average), andlist_broadcast_recipientswithactivity. Report opens as estimates. With a limited audience,send_broadcast_to_moresends to the next people.
{
"name": "create_broadcast",
"arguments": {
"list_id": "lst_…",
"from": "Acme <news@example.com>",
"subject": "What shipped in October",
"preview_text": "Three new features",
"markdown": "Hi {{first_name | there}},\n\nHere is what shipped this month.",
"audience": {
"segment_id": "seg_…"
}
}
}10. Run an automation
An automation is a timed sequence of emails that starts when a contact does something and stops when they convert. Automations are being enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled from every tool below.
create_automationwith akey, theentryevent,exit_rules(thegoal_eventthat counts as converting, orno_goal: true), a verifiedfrom_address, andsteps, each dueoffset_secondsafter the person entered. It starts as a draft and sends nothing. Every automation carriesdomain, the domain of itsfrom_address; in a workspace that sends from several domains,list_automationsandget_automations_overviewtakedomainto show the automations of one of them.- To let the user read it first:
send_automation_test_emailsends one email, andsend_automation_testevery email in order, to the account's own address only (never to a contact), with stand-in values for the merge tags. A test enrols nobody, is in no report, and works while the automation is still a draft. Both send real email, so only when the user asks.send_automation_test_emailwithdry_run: truereturns the rendered email without sending anything. get_sending_limitsshows how much automation email one person may get across every automation, and during which hours. Change them withupdate_sending_limitsonly when the user asks.- To start from a ready-made email instead of writing one:
list_automation_templatesis the template library (welcome, onboarding tips, a nudge to finish setup, trial ending and trial ended, abandoned checkout, failed payment or dunning, receipt, upgrade at a usage limit, feature announcement, review request, feedback score, cancellation survey, and winback for retention),get_automation_templateshows one with the email as this workspace would send it, anduse_automation_templatemakes the draft automation with the emails, the suggested entry event and the suggested goal. Some templates come as a set that makes one automation: three onboarding tips, trial ending then trial ended, payment failed then a last notice.set_automation_stepwithtemplateloads one template into an email of an automation that already exists. - An email can also be built in the dashboard's drag-and-drop builder.
get_automationshows such an email witheditordesign: itscontentis the builder's project, which only the builder writes, and itshtmlis what is sent. Leave the project alone. To change the wording of a designed email, ask the user to open it in the dashboard; to replace it, send your ownhtmlwitheditorhtml. - A template is finished except for what only the user knows, written as placeholders in square brackets:
[First step], or[Link to plans]as a link's address.to_fillon the automation lists each one by email, and each workspace name the emails print that is blank. Ask the user for the real words and links, write them in withset_automation_step, and setproduct_nameandsender_namewithupdate_sending_limits. Never invent them.set_automation_statusrefuses to turn the automation on while anything is left (422automation_not_ready, with aproblemslist that names each email and detail); test emails are allowed, so the user can read it first. - Only when the user says to start:
set_automation_statuswithstatus: "on". - Record what people do with
track_event(a new contact needscontact.consent_basis). The entry event starts the sequence, the goal event ends it as converted, and adedupe_keymakes a retry harmless.enroll_contactandexit_contactadd or remove one person by hand. preview_automationshows, for everyone in the automation now, which email would go out if they were evaluated at this moment, or why not: nothing due until a time, held by a limit or the sending hours until a time, waiting behind a higher-priority automation, or skipped. It sends nothing and changes nothing.list_automationsgives each automation's 30-day totals. An email that a limit holds back is not dropped: it goes out when the limit allows. When several emails of one automation are due at once, only the latest is sent.- Results:
get_automations_overview(every automation) andget_automation_report(one automation, with a row per email) give totals and a number for each day of a date range: people who entered, emails sent, delivered, opened, clicked, and converted.list_automation_peoplelists who did what (did: entered, sent, delivered, opened, clicked, converted, bounced, unsubscribed, or waiting), andget_automation_persongives one contact's history with every open and click. Automation emails are tracked like broadcasts: report opens and clicks as estimates, and note that automated requests are labelledmachineand never counted.
{
"name": "use_automation_template",
"arguments": {
"template_id": "payment-failed-notices",
"from_name": "Dana from Acme",
"from_address": "dana@example.com"
}
}{
"name": "preview_automation",
"arguments": {
"automation_key": "checkout-recovery"
}
}{
"name": "list_automation_people",
"arguments": {
"automation_key": "checkout-recovery",
"did": "clicked",
"step": 1
}
}11. See what came in, and connect another system
Events reach SendHQ three ways: track_event from the workspace's own code, a connection (a secret address a payment provider or another system posts its webhooks to), and a spreadsheet uploaded in the dashboard. See /docs/events.
list_eventsis the feed of everything recorded, newest first: who, what they did (also as plain words), when, where it came from, and which automations it started, ended, or converted. Filter bycontact, byname, or by date.list_event_nameslists the kinds of event seen in the last 30 days.list_connectionsshows each connection with its last delivery in plain words, andget_connectionits last 50 deliveries: "Recorded 2 events", "Skipped: no email address", "Refused: bad signature". Start there when something a provider sent did not show up.- Only when the user asks to connect a system:
create_connectionwithkindstripeordodo(mapped for you) orgenericwith amapping. It returns the secretaddressonce; give it to the user to paste into that system. From then on what arrives is recorded without anyone looking, and can start automations that send email. update_connectionwithenabled: falsepauses a connection (its address answers 404);delete_connectionremoves it. The provider's signing secret and a replacement address are set by a person in the dashboard.
{
"name": "list_events",
"arguments": {
"contact": "ada@example.net"
}
}12. Check an email's content before it is sent
score_email reads a subject, the HTML and the plain text as they were written and returns a score from 0 to 100 with what to change, most points first. A plain email with no links and no images scores 100; a designed layout, links to another site than the sender's, link shorteners, images with few words, hidden text, capitals and very long HTML each take points off. Pass from so links can be compared with the sender's own domain. Nothing is stored or sent, and the footer and tracking SendHQ adds are not scored. The dashboard's email editor shows the same number for the same content. It looks at content only, so use it as a checklist: sender reputation, authentication and how recipients react decide more of where mail lands.
{
"name": "score_email",
"arguments": {
"from": "hello@example.com",
"subject": "Your cart is still here",
"html": "<p>Pick up where you left off.</p><p><a href=\"https://bit.ly/3xyz\">Finish checkout</a></p>"
}
}ผลลัพธ์ การแบ่งหน้า และข้อผิดพลาด
การเรียกที่สำเร็จจะคืนออบเจ็กต์ JSON ของ API เป็น structuredContent และเป็นบล็อกข้อความ JSON ทุกเครื่องมือ list_* รับ limit (1–200 ค่าเริ่มต้น 50) และ offset และเพิ่มออบเจ็กต์ pagination ให้เรียกต่อด้วย offset: pagination.next_offset ตราบใดที่ has_more เป็น true
{
"data": [
"…"
],
"count": 50,
"pagination": {
"offset": 0,
"limit": 50,
"returned": 50,
"total": 180,
"has_more": true,
"next_offset": 50
}
}การเรียกที่ล้มเหลวจะคืน isError: true พร้อมข้อผิดพลาดแบบมีโครงสร้าง ให้ทำตาม remedy แทนที่จะลองใหม่แบบสุ่มสี่สุ่มห้า ลองใหม่เฉพาะเมื่อ retryable เป็น true
{
"error": {
"code": "subscription_required",
"status": 402,
"message": "Sending requires an active SendHQ subscription. Choose a plan to start sending.",
"retryable": false,
"explanation": "This workspace has no active paid subscription. SendHQ does not send any email, including to the account owner, until a plan is active.",
"remedy": "Ask the account owner to choose a plan at https://sendhq.cc/pricing or in the dashboard (Profile & Billing). Do not retry until the subscription is active."
}
}ฟิลด์ข้อผิดพลาดที่ไม่บังคับ: request_id (แจ้งซัพพอร์ตด้วยค่านี้) retry_after_seconds problems (รายการการละเมิด schema สำหรับ invalid_arguments) และ idempotent_replayed (ดู Idempotency)
Idempotency
send_email และ send_batch รับ idempotency_key (ไม่เกิน 200 ตัวอักษร) ซึ่งส่งเป็นเฮดเดอร์ Idempotency-Key ให้สร้างคีย์ที่คงที่หนึ่งคีย์ต่อข้อความเชิงตรรกะหนึ่งฉบับ เช่น invoice-4812-receipt
- การลองใหม่ต้องใช้คีย์เดิมและเนื้อหาคำขอที่เหมือนกันทุกประการ คีย์เดียวกันแต่มีการเปลี่ยนแปลงใด ๆ (ผู้รับ หัวเรื่อง เนื้อหา เฮดเดอร์ ข้อมูลเทมเพลต หรือแม้แต่ค่าอาร์กิวเมนต์) จะคืน
409 idempotency_conflict - คีย์เดียวกัน เนื้อหาเดียวกัน และคำขอเดิมเสร็จแล้ว: SendHQ คืนผลลัพธ์ที่เก็บไว้โดยไม่ส่งอีก นี่คือวิธีลองใหม่อย่างปลอดภัยหลังหมดเวลาหรือ
network_error - คีย์เดียวกันขณะที่คำขอเดิมยังทำงานอยู่:
409 idempotency_in_progressลองใหม่ได้หลังรอสักครู่ - ข้อความเชิงตรรกะใหม่ต้องใช้คีย์ใหม่
- ความล้มเหลวที่เก็บไว้ก็ถูกเล่นซ้ำเช่นกัน หากความพยายามแรกล้มเหลว การลองใหม่ด้วยคีย์เดียวกันจะคืนความล้มเหลวเดิมพร้อม
idempotent_replayed: trueและretryable: falseตรวจสอบlist_emails(direction: out) เพื่อยืนยันว่าไม่มีอะไรถูกส่งออกไป แก้สาเหตุ แล้วส่งด้วยคีย์ใหม่ - เซิร์ฟเวอร์ไม่เคยลอง POST ใหม่เอง มีเพียงการเรียก GET แบบอ่านอย่างเดียวที่ลองใหม่โดยอัตโนมัติ (สูงสุด 3 ครั้งเมื่อเกิดข้อผิดพลาดของเครือข่าย 429 และ 5xx)
send_emailที่มีattachmentsแบบอินไลน์ใช้idempotency_keyไม่ได้ เพราะทำงานหลายคำขอ สำหรับการส่งไฟล์แนบที่ลองใหม่ได้อย่างปลอดภัย:create_draft→upload_attachment→send_emailพร้อมdraft_idและidempotency_key
{
"name": "send_email",
"arguments": {
"from": "Acme <billing@example.com>",
"to": [
"owner@example.com"
],
"subject": "Receipt #4812",
"text": "Thanks for your payment.",
"idempotency_key": "receipt-4812"
}
}Rate limit และโควตา
SendHQ ไม่ได้เผยแพร่ขีดจำกัดจำนวนคำขอต่อวินาทีที่แน่นอนสำหรับ API ขีดจำกัดที่เอเจนต์พบจริงคือขีดจำกัดการใช้งาน ซึ่งคืนเป็น 429:
- การส่งถึงผู้รับรายเดือนตามแพ็กเกจ แต่ละที่อยู่ To, Cc และ Bcc นับเป็นหนึ่งการส่งถึง ดู
get_account→usage.recipientDeliveriesเทียบกับusage.emailQuotaMonth - ผู้รับรายวันต่อที่อยู่ From ที่ตรงกันทุกตัวอักษร กำหนดโดยสถานะชื่อเสียงของผู้ส่งรายนั้น (
list_sender_reputation→dailyLimitค่าเริ่มต้น 2,000 บนแพ็กเกจแบบชำระเงิน) - Subscription: sending is refused with
subscription_requireduntil a paid plan is active. There is no free or trial allowance. - Workspace daily ladder on paid plans: 1,000 recipients on day one, then 2,000, 3,000, 5,000, 8,000, 12,000, 18,000, 25,000, 35,000, 45,000, and 50,000. A step is gained after a UTC day that used at least half the cap with healthy 7-day feedback. A high rate demotes once per incident, not every day the rate stays high. See
get_account→sendingLimit. Over the cap:daily_limit_reached, not queued, retry afterresets_at(midnight UTC), not on a short backoff. - Hourly pace: about one tenth of the day's cap each UTC hour (100 on day one).
hourly_limit_reachedwaits until the next UTC hour. - New domains: a sending domain less than 30 days old may send at most 500 Gmail recipients a day (
gmail_recipient_limit), on any ladder rung.gmail_rate_limitedmeans Gmail returned 4.7.28; wait untilresets_atand keep sending to other providers. - ไฟล์แนบ: สูงสุด 10 ไฟล์และ 10 MB ต่อข้อความ และ 10 GB ของการถ่ายโอนไฟล์แนบตามน้ำหนักผู้รับต่อเดือนบนแพ็กเกจแบบชำระเงิน
- ต่อคำขอ: To + Cc + Bcc สูงสุด 100 ที่อยู่
send_batchสูงสุด 100 ข้อความ - ตัวตัดวงจรด้านชื่อเสียง: ในช่วงเลื่อน 7 วัน หาก bounce หรือ complaint เกินเกณฑ์ จะจำกัดหรือหยุดที่อยู่ From หนึ่งที่อยู่ชั่วคราว (
423 sender_paused) และจะกลับมาเป็นปกติโดยอัตโนมัติเมื่ออัตราลดลง
quota_exhausted ลองใหม่ไม่ได้จนกว่ารอบจะรีเซ็ตหรือเปลี่ยนแพ็กเกจ rate_limited ลองใหม่ได้หลัง retry_after_seconds สำหรับการส่ง ให้ลองใหม่ด้วย idempotency_key เดิมและเนื้อหาที่เหมือนกันทุกประการ
แค็ตตาล็อกข้อผิดพลาด
code คงที่ ให้แตกสาขาตามค่านี้ ไม่ใช่ตาม message
| code | HTTP | ลองใหม่? | ความหมายและสิ่งที่ต้องทำ |
|---|---|---|---|
invalid_arguments | — | ไม่ | อาร์กิวเมนต์ไม่ผ่าน JSON Schema ของเครื่องมือในเครื่อง ไม่มีอะไรไปถึง SendHQ ให้แก้ฟิลด์ที่ระบุใน problems |
auth_error | 401 | ไม่ | API key หายไป ถูกเพิกถอน หรือผิด ตั้ง SENDHQ_API_KEY สำหรับโปรเซสของเซิร์ฟเวอร์ โดยมนุษย์เป็นผู้สร้างคีย์ในแดชบอร์ด |
subscription_required | 402 | ไม่ | No active subscription. Nothing is sent, including to the account owner. The owner chooses a plan. Do not retry until then. |
payment_required | 402 | ไม่ | ฟีเจอร์นี้ต้องใช้แพ็กเกจแบบชำระเงิน (เช่น ไฟล์แนบ) ให้ส่งโดยไม่ใช้ฟีเจอร์นั้น หรืออัปเกรด |
sender_domain_not_owned | 403 | ไม่ | โดเมน From ไม่อยู่ในเวิร์กสเปซนี้ ใช้ list_sending_identities หรือ add_domain |
sender_domain_unverified | 403 | ไม่ | โดเมน From ยังไม่ได้รับการยืนยัน get_domain เผยแพร่เรคคอร์ดที่ขาด แล้ว verify_domain |
domain_limit_reached | 403 | ไม่ | ถึงขีดจำกัดโดเมนของแพ็กเกจแล้ว ลบโดเมนที่ไม่ได้ใช้ (โดยได้รับอนุมัติ) หรืออัปเกรด |
marketing_not_enabled | 403 | ไม่ | คลาส marketing ไม่ได้เปิดใช้สำหรับโดเมนหรือแพ็กเกจนี้ ใช้ transactional เฉพาะเมื่อข้อความเป็น transactional จริง ๆ |
forbidden | 403 | ไม่ | นโยบายไม่อนุญาตการดำเนินการนี้ ปรับคำขอ |
not_found | 404 | ไม่ | ID ไม่อยู่ในเวิร์กสเปซนี้ ให้แสดงรายการทรัพยากรเพื่อหา ID ที่ถูกต้อง และกู้คืนเทมเพลตที่เก็บถาวรก่อน |
idempotency_conflict | 409 | ไม่ | ใช้คีย์ซ้ำกับเนื้อหาที่ต่างกัน ส่งต้นฉบับเดิมอีกครั้ง หรือใช้คีย์ใหม่สำหรับข้อความใหม่ |
idempotency_in_progress | 409 | ใช่ | คำขอเดิมยังทำงานอยู่ รอ แล้วลองใหม่ด้วยคีย์และเนื้อหาเดิม |
revision_conflict | 409 | ไม่ | ฉบับร่างของเทมเพลตเปลี่ยนไปตั้งแต่ที่คุณอ่าน get_template ผสาน แล้วบันทึกอีกครั้ง |
complaint_suppression_locked | 409 | ไม่ | ผู้รับร้องเรียน อย่าส่งอีเมลถึงเขาอีก |
inbound_not_ready | 409 | ไม่ | การรับอีเมลขาเข้ายังไม่พร้อม setup_inbound เผยแพร่ MX แล้ว verify_inbound |
conflict | 409 | ไม่ | ทรัพยากรมีอยู่แล้วหรืออยู่ในสถานะที่ไม่ถูกต้อง อ่านแล้วปรับ |
attachments_too_large | 413 | ไม่ | เกิน 10 ไฟล์หรือ 10 MB ลบหรือย่อขนาดไฟล์แนบ |
recipient_suppressed | 422 | ไม่ | ผู้รับเคย hard bounce หรือร้องเรียนมาก่อน ให้ลบออก ดู list_blocked_recipients |
recipient_unsubscribed | 422 | ไม่ | ผู้รับยกเลิกการรับอีเมลการตลาด ให้ลบออกถาวร |
validation_failed | 422 | ไม่ | เนื้อหาถูกปฏิเสธ เช่น ข้อมูลเทมเพลตที่ละเมิดสัญญาของตัวแปร แก้อินพุต |
sender_paused | 423 | ไม่ | ที่อยู่ From นี้ถูกหยุดชั่วคราวโดยตัวตัดวงจร bounce/complaint 7 วัน หยุด แก้รายชื่อ แล้วรอการกลับสู่ปกติโดยอัตโนมัติ |
account_paused | 423 | ไม่ | Workspace paused for a deliverability review. The body has the measured rate and the limit when the pause was for bounces or complaints. Do not send until it is restored. |
quota_exhausted | 429 | ไม่ | Monthly allowance, per-sender daily limit, or attachment transfer. Not the workspace daily ladder. Check get_account; wait for that limit to reset or upgrade. |
daily_limit_reached | 429 | after reset | Workspace daily ladder. Not a short backoff. Wait until resets_at (midnight UTC). The message was not queued. |
hourly_limit_reached | 429 | after reset | Hourly pace (about a tenth of the day's cap). Wait until the next UTC hour. Not a short backoff. |
gmail_recipient_limit | 429 | after reset | 500 Gmail recipients a day for a sending domain under 30 days old, on any ladder rung. Wait until midnight UTC. Not queued. |
gmail_rate_limited | 429 | after reset | Gmail returned 4.7.28 for this domain. Wait until resets_at. Other providers keep sending. |
rate_limited | 429 | ใช่ | Slow down; wait retry_after_seconds. This is not a daily, hourly, or Gmail cap. |
server_error | 5xx | ใช่ | SendHQ หรือผู้ให้บริการล้มเหลวชั่วคราว ใช้ backoff แล้วลองใหม่ การส่งใช้คีย์และเนื้อหาเดิม หาก idempotent_replayed เป็น true ให้ใช้คีย์ใหม่หลังยืนยันว่าไม่มีอะไรถูกส่ง |
network_error | — | ใช่ | คำขอหรือการตอบกลับสูญหาย ลองใหม่ สำหรับการส่ง idempotency_key เดิมทำให้ปลอดภัย |
invalid_request | 400 | ไม่ | คำขอผิดรูปแบบ อ่าน message แล้วแก้ไข |
tool_error | — | ไม่ | ความล้มเหลวภายในเครื่องของ MCP server (เช่น file_path ที่อ่านไม่ได้) อ่าน message |
ข้อมูลอ้างอิงเครื่องมือ
ทุกเครื่องมือพร้อมคลาสความปลอดภัย REST endpoint ที่เรียก พารามิเตอร์ รูปแบบค่าที่คืน และตัวอย่างออบเจ็กต์ params ของ tools/call พารามิเตอร์ต้องตรงทุกตัวอักษร เซิร์ฟเวอร์จะปฏิเสธทุกอย่างที่ไม่ได้ระบุไว้
Emails and threads: send_email, send_batch, list_emails, get_email, mark_email, delete_email, list_email_events, get_thread, email_delivery, thread_delivery
Labels and auto-filing rules: list_labels, get_label, create_label, update_label, delete_label, create_label_rule, delete_label_rule, label_email
Drafts, attachments, and sender identities: list_sending_identities, create_draft, list_drafts, get_draft, update_draft, delete_draft, upload_attachment, download_attachment, delete_attachment
Hosted templates: list_templates, create_template, get_template, update_template_draft, create_template_draft, render_template, send_template_test, publish_template, archive_template, restore_template
Domains and DNS: list_domains, get_domain, add_domain, verify_domain, delete_domain, get_dns_provider, get_domain_connect_link
Inbound email: setup_inbound, verify_inbound, list_inboxes, get_inbox, create_inbox, update_inbox, set_inbox_forwarding, delete_inbox
Deliverability, bounces, and suppressions: deliverability_stats, deliverability_account, deliverability_domains, deliverability_senders, score_email, list_sender_reputation, list_suppressions, remove_suppression, list_blocked_recipients
Campaigns: list_contacts, create_contact, upsert_contact, get_contact, update_contact, delete_contact, import_contacts, list_contact_imports, bulk_update_contacts, list_tags, list_contact_fields, set_contact_field, delete_contact_field, list_segments, get_segment, preview_segment, create_segment, update_segment, delete_segment, list_lists, create_list, get_list, update_list, delete_list, add_list_contacts, remove_list_contact, list_broadcasts, create_broadcast, get_broadcast, update_broadcast, delete_broadcast, send_broadcast, cancel_broadcast, list_broadcast_recipients, check_broadcast, send_broadcast_test, schedule_broadcast, unschedule_broadcast, duplicate_broadcast, send_broadcast_to_more, get_broadcast_report, get_newsletter_settings, update_newsletter_settings, get_campaign_overview, list_uploaded_images
Automations, events, and sending limits: track_event, list_automations, get_automation, create_automation, update_automation, delete_automation, set_automation_step, delete_automation_step, set_automation_step_variant, set_automation_status, send_automation_test_email, send_automation_test, enroll_contact, exit_contact, preview_automation, get_automations_overview, get_automation_report, list_automation_people, get_automation_person, get_sending_limits, update_sending_limits, list_automation_templates, get_automation_template, use_automation_template, list_events, list_event_names, list_connections, get_connection, create_connection, update_connection, delete_connection
Account, usage, analytics, and keys: get_account, get_account_diagnostics, get_analytics, list_api_keys, get_service_health
ไม่มีเครื่องมือที่ตรงกับตัวกรองนี้
อีเมลและเธรด
send_emailส่งอีเมลหนึ่งฉบับ
SENDS REAL EMAIL. Send one message from a verified domain: raw html/text, a published hosted template, a reply in an existing thread, or a message with attachments. Pass idempotency_key so a retry cannot send twice; a retry must reuse the same key AND an identical request, otherwise SendHQ returns 409. attachments is a convenience that creates a draft, uploads each file, and sends with that draft; it cannot be combined with idempotency_key or draft_id (use create_draft + upload_attachment + send_email with draft_id for retry-safe attachment sends). Unpaid workspaces (integration trial) can deliver only to the account email or a mailbox-simulator test address, and cannot send attachments.
ต้องระบุอย่างน้อยหนึ่งรายการ: html, text, template
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
from | string | ใช่ | ผู้ส่ง เช่น Acme <hello@example.com> โดเมนต้องได้รับการยืนยันในเวิร์กสเปซนี้ (ดู list_sending_identities) (สูงสุด 998 ตัวอักษร) |
to | string[] | ใช่ | ผู้รับ แต่ละรายการเป็นที่อยู่ โดยจะใส่ชื่อที่แสดงหรือไม่ก็ได้ To+cc+bcc รวมกันได้สูงสุด 100 รายการ ทุกปลายทางใช้เครดิตการส่งหนึ่งเครดิต (1–100 รายการ) |
cc | string[] | ไม่ | ผู้รับสำเนา (0–100 รายการ) |
bcc | string[] | ไม่ | ผู้รับสำเนาลับ (0–100 รายการ) |
subject | string | ไม่ | หัวเรื่อง ละไว้เมื่อส่งเทมเพลต (สูงสุด 998 ตัวอักษร) |
text | string | ไม่ | เนื้อหาข้อความล้วน ระบุ text, html หรือ template |
html | string | ไม่ | เนื้อหา HTML SendHQ ทำความสะอาดให้และสร้าง text เมื่อละ text |
reply_to | string | ไม่ | ที่อยู่ Reply-To |
headers | object | ไม่ | เฮดเดอร์กำหนดเองที่ปลอดภัยเพิ่มเติม (ค่าเป็นสตริง) เช่น {"X-Entity-Ref-ID": "123"} เฮดเดอร์การกำหนดเส้นทาง เช่น From/To/Message-ID ควบคุมโดย SendHQ |
message_class | string | ไม่ | transactional (ค่าเริ่มต้น) หรือ marketing Marketing ต้องใช้แพ็กเกจหรือโดเมนที่เปิดใช้ marketing และเพิ่มการจัดการยกเลิกการรับ (หนึ่งใน transactional, marketing) |
reply_to_email_id | string | ไม่ | ตอบกลับภายในบทสนทนาที่มีอยู่: ID em_… ของข้อความที่ตอบ SendHQ ตั้งค่า In-Reply-To/References และเธรดให้ |
thread_id | string | ไม่ | ID เธรดที่ระบุชัดเจนเพื่อจัดเก็บข้อความ |
draft_id | string | ไม่ | ส่งไฟล์แนบของฉบับร่างที่เก็บไว้ (dr_…) พร้อมข้อความนี้ ฉบับร่างจะถูกลบหลังส่งสำเร็จ |
template | object | ไม่ | ส่งเทมเพลตแบบโฮสต์ที่เผยแพร่แล้วแทน html/text ดิบ ต้องมีผู้รับ to หนึ่งรายพอดีและไม่มี cc/bcc เทมเพลตเป็นผู้ระบุหัวเรื่อง ต้องระบุอย่างน้อยหนึ่งรายการ: id, key |
template.id | string | ไม่ | ID เทมเพลต (tmpl_…) ระบุ id หรือ key |
template.key | string | ไม่ | คีย์เทมเพลต เช่น account-welcome ระบุ id หรือ key |
template.version_id | string | ไม่ | ID รุ่นที่เผยแพร่แล้ว (tmplv_…) ซึ่งไม่บังคับ ค่าเริ่มต้นคือรุ่นที่เผยแพร่ปัจจุบัน |
template.data | object | ไม่ | ค่าสำหรับตัวแปรที่มีชนิดข้อมูลของเทมเพลต |
labels | string[] | ไม่ | ชื่อป้ายกำกับหรือ ID lbl_… ที่จะจัดเก็บข้อความนี้ ชื่อที่ไม่รู้จักจะถูกสร้างขึ้น การตอบกลับในบทสนทนาจะสืบทอดป้ายกำกับ และป้ายกำกับ bucket (skip_inbox) จะเก็บการตอบกลับเหล่านั้นไม่ให้เข้ากล่องเข้า สูงสุด 10 (0–10 รายการ) |
idempotency_key | string | ไม่ | เฮดเดอร์ Idempotency-Key ใช้ซ้ำเฉพาะเพื่อลองคำขอนี้ใหม่เท่านั้น (สูงสุด 200 ตัวอักษร) |
attachments | object[] | ไม่ | ไฟล์ที่จะแนบ (สูงสุด 10 ไฟล์ รวม 10 MB) แต่ละไฟล์ต้องมี content_base64 (พร้อม filename) หรือ file_path ในเครื่อง (0–10 รายการ) ต้องระบุอย่างน้อยหนึ่งรายการ: content_base64, file_path |
attachments[].filename | string | ไม่ | ชื่อไฟล์ที่แสดงแก่ผู้รับ จำเป็นเมื่อใช้ content_base64 ค่าเริ่มต้นคือ basename ของ file_path (สูงสุด 255 ตัวอักษร) |
attachments[].content_type | string | ไม่ | MIME type เช่น application/pdf ค่าเริ่มต้นคือ application/octet-stream |
attachments[].content_base64 | string | ไม่ | เนื้อหาไฟล์แบบ base64 มาตรฐาน |
attachments[].file_path | string | ไม่ | พาธสัมบูรณ์ของไฟล์ในเครื่องที่โปรเซสของ MCP server อ่านได้ |
{
"name": "send_email",
"arguments": {
"from": "Acme <hello@example.com>",
"to": [
"owner@example.com"
],
"subject": "Your export is ready",
"text": "Download it from your dashboard.",
"idempotency_key": "export-ready-42"
}
}send_batchส่งอีเมลชุดที่ปรับแต่งเฉพาะราย
SENDS REAL EMAIL ส่งข้อความอิสระ 1–100 ฉบับในคำขอเดียว (ใช้สำหรับปรับแต่งเทมเพลตเฉพาะผู้รับ) แต่ละรายการมีรูปแบบเดียวกับ send_email (ไม่มี attachments/idempotency_key) แต่ละรายการสำเร็จหรือล้มเหลวแยกกัน HTTP 207 หมายถึงสำเร็จบางส่วน ให้ตรวจสอบ data[i].ok และ data[i].error แต่ละรายการ idempotency_key หนึ่งคีย์ครอบคลุมเนื้อหาชุดทั้งหมด
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
emails | object[] | ใช่ | ข้อความที่จะส่ง (1–100 รายการ) ต้องระบุอย่างน้อยหนึ่งรายการ: html, text, template |
idempotency_key | string | ไม่ | Idempotency-Key สำหรับทั้งชุด (สูงสุด 200 ตัวอักษร) |
{
"name": "send_batch",
"arguments": {
"emails": [
{
"from": "Acme <hello@example.com>",
"to": [
"owner@example.com"
],
"template": {
"key": "account-welcome",
"data": {
"first_name": "Asha"
}
}
}
],
"idempotency_key": "welcome-batch-2026-09-26"
}
}list_emailsแสดงรายการและค้นหาอีเมล
แสดงรายการอีเมลที่ส่ง (direction: out) และที่ได้รับ (direction: in) เรียงจากใหม่สุดพร้อมตัวกรอง อีเมลที่ได้รับจะถูกจัดประเภท: อ่านกล่องเข้าของมนุษย์ด้วย direction: in, archived: false, category: primary คัดแยกด้วย important: true สแปมจะถูกซ่อนเว้นแต่ใช้ category: spam หรือ include_spam: true แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
direction | string | ไม่ | in สำหรับที่ได้รับ out สำหรับที่ส่ง (หนึ่งใน in, out) |
status | string | ไม่ | ตัวกรองสถานะ เช่น queued, sent, delivered, bounced, complained, failed |
domain | string | ไม่ | เฉพาะข้อความของโดเมนนี้ หรือรายการโดเมนที่คั่นด้วยเครื่องหมายจุลภาค (ตรงกับข้อใดข้อหนึ่ง) |
inbox_id | string | ไม่ | เฉพาะข้อความที่กล่องจดหมายนี้ได้รับ (inb_…) |
label | string | ไม่ | เฉพาะข้อความที่มีป้ายกำกับนี้: ID ป้ายกำกับ lbl_… หรือชื่อที่ตรงกันทุกตัวอักษร หรือรายการที่คั่นด้วยเครื่องหมายจุลภาค (ตรงกับข้อใดข้อหนึ่ง) ใช้ list_labels เพื่อดูโฟลเดอร์ |
archived | boolean | ไม่ | false = มุมมองกล่องเข้า (อีเมลที่ได้รับซึ่งยังไม่เก็บถาวร) true = เฉพาะที่เก็บถาวร ละไว้เพื่อดูอีเมลทั้งหมด |
category | string | ไม่ | primary (บุคคล) updates (จดหมายข่าว อีเมลจำนวนมาก อัตโนมัติ) หรือ spam หรือรายการที่คั่นด้วยเครื่องหมายจุลภาค สแปมจะถูกซ่อนเว้นแต่ร้องขอ |
important | boolean | ไม่ | true = เฉพาะข้อความที่ทำเครื่องหมายว่าสำคัญ (การตอบกลับบทสนทนาที่คุณเริ่ม และผู้ส่งที่ทำเครื่องหมายว่าสำคัญ) |
include_spam | boolean | ไม่ | รวมสแปมในผลลัพธ์ (สำหรับการค้นหาข้ามทุกโฟลเดอร์) |
from | string | ไม่ | ที่อยู่ผู้ส่งมีค่านี้อยู่ |
to | string | ไม่ | ที่อยู่ผู้รับมีค่านี้อยู่ |
unread | boolean | ไม่ | true = เฉพาะที่ยังไม่อ่าน false = เฉพาะที่อ่านแล้ว |
after | string | ไม่ | ไทม์สแตมป์ ISO-8601 เฉพาะข้อความที่สร้างหลังจากนั้น (date-time) |
before | string | ไม่ | ไทม์สแตมป์ ISO-8601 เฉพาะข้อความที่สร้างก่อนหน้านั้น (date-time) |
query | string | ไม่ | ค้นหาข้อความอิสระในหัวเรื่อง เนื้อหา ที่อยู่ผู้ส่ง/ผู้รับ และชื่อไฟล์แนบ (สูงสุด 200 ตัวอักษร) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_emails",
"arguments": {
"direction": "in",
"unread": true,
"limit": 25
}
}get_emailดึงอีเมลหนึ่งฉบับ
ดึงข้อความหนึ่งฉบับพร้อมเฮดเดอร์ เนื้อหา html/text สถานะ เมทาดาทาของเธรด และเมทาดาทาของไฟล์แนบ (ดาวน์โหลดไบต์ด้วย download_attachment)
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email_id | string | ใช่ | ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "get_email",
"arguments": {
"email_id": "em_123"
}
}mark_emailทำเครื่องหมายว่าอ่านแล้ว เก็บถาวร สแปม หรือสำคัญ
อัปเดตข้อความหนึ่งฉบับ: read, archived, category (primary, updates, spam เฉพาะอีเมลที่ได้รับ) และ important การรายงานสแปมหรือทำเครื่องหมายว่าสำคัญเป็นการสอน SendHQ เกี่ยวกับผู้ส่งรายนั้นสำหรับอีเมลในอนาคต ส่ง learn: false เพื่อเปลี่ยนเฉพาะข้อความนี้ ต้องส่งอย่างน้อยหนึ่งฟิลด์
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email_id | string | ใช่ | ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
read | boolean | ไม่ | true = อ่านแล้ว false = ยังไม่อ่าน |
archived | boolean | ไม่ | true = เก็บถาวร (ข้ามกล่องเข้า) false = ย้ายกลับไปกล่องเข้า |
category | string | ไม่ | ย้ายข้อความที่ได้รับไปยัง primary, updates หรือ spam (หนึ่งใน primary, updates, spam) |
important | boolean | ไม่ | ทำเครื่องหมายหรือยกเลิกการทำเครื่องหมายข้อความว่าสำคัญ |
learn | boolean | ไม่ | false = ไม่จดจำคำตัดสินนี้สำหรับผู้ส่ง (ค่าเริ่มต้น true) |
{
"name": "mark_email",
"arguments": {
"email_id": "em_123",
"read": true
}
}delete_emailลบอีเมล
DESTRUCTIVE: ลบข้อความที่เก็บรักษาไว้และไฟล์แนบที่จัดเก็บออกจาก SendHQ อย่างถาวร ไม่ได้เรียกคืนข้อความที่ส่งถึงแล้ว
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email_id | string | ใช่ | ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_email",
"arguments": {
"email_id": "em_123"
}
}list_email_eventsแสดงรายการอีเวนต์การส่งของอีเมลฉบับหนึ่ง
อีเวนต์จากผู้ให้บริการสำหรับข้อความที่ส่งหนึ่งฉบับ: delivery, bounce, complaint, reject, open, click นี่คือหลักฐานว่าข้อความส่งถึงหรือไม่ หรือเหตุใดจึงล้มเหลว แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email_id | string | ใช่ | ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_email_events",
"arguments": {
"email_id": "em_123"
}
}get_threadดึงบทสนทนา
ดึงทุกข้อความในบทสนทนาตามลำดับเวลา (ทั้งที่ส่งและได้รับ) พร้อมเมทาดาทาของไฟล์แนบของแต่ละข้อความ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
thread_id | string | ใช่ | ID เธรด (โดยปกติคือ ID em_… ของข้อความแรก ดู threadId ในอีเมลใด ๆ) (สูงสุด 128 ตัวอักษร) |
{
"name": "get_thread",
"arguments": {
"thread_id": "em_123"
}
}email_deliveryGet an email delivery timeline
Queued, sent, delivered, delayed, bounced, complained, and failed events for one email, with bounce type and the SMTP diagnostic. Reasons are plain text.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email_id | string | ใช่ | |
limit | integer | ไม่ | |
offset | integer | ไม่ |
{
"name": "email_delivery",
"arguments": {
"email_id": "em_123"
}
}thread_deliveryGet a thread delivery summary
Counts of delivered, bounced, complained, and failed outbound messages in one conversation, plus each message's failure reason.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
thread_id | string | ใช่ |
{
"name": "thread_delivery",
"arguments": {
"thread_id": "thr_123"
}
}ป้ายกำกับและกฎจัดเก็บอัตโนมัติ
list_labelsแสดงรายการป้ายกำกับ
แสดงรายการป้ายกำกับ (โฟลเดอร์) ของเวิร์กสเปซพร้อมจำนวนทั้งหมดและจำนวนที่ยังไม่อ่าน และกฎจัดเก็บอัตโนมัติ แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_labels",
"arguments": {}
}get_labelดึงป้ายกำกับ
ดึงป้ายกำกับหนึ่งรายการพร้อมจำนวนและกฎจัดเก็บอัตโนมัติ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
label_id | string | ใช่ | ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร) |
{
"name": "get_label",
"arguments": {
"label_id": "Billing"
}
}create_labelสร้างป้ายกำกับ
สร้างป้ายกำกับแบบโฟลเดอร์ ตั้ง skip_inbox: true เพื่อทำให้เป็น bucket ที่เอเจนต์เป็นเจ้าของ ส่งด้วย labels: [name] แล้วการตอบกลับจะถูกจัดเก็บเข้าป้ายกำกับและอยู่นอกกล่องเข้า กฎจัดเก็บอัตโนมัติที่ไม่บังคับจะจัดเก็บอีเมลใหม่ที่ส่ง/ได้รับ (ทุกเงื่อนไขในกฎต้องตรงกัน) ตั้ง apply_to_existing เพื่อจัดเก็บอีเมลที่เก็บรักษาไว้ด้วย
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ใช่ | ชื่อป้ายกำกับ เช่น Billing หรือ Clients/Acme ไม่ซ้ำกันภายในเวิร์กสเปซ (ไม่สนตัวพิมพ์) (สูงสุด 64 ตัวอักษร) |
color | string | ไม่ | สีแบบเลขฐานสิบหก เช่น #1a73e8 ไม่บังคับ |
skip_inbox | boolean | ไม่ | โหมด bucket: อีเมลที่ได้รับและได้ป้ายกำกับนี้ (โดยกฎ โดยการตอบกลับบทสนทนาที่ส่งด้วยป้ายกำกับนี้ หรือโดยตนเอง) จะถูกเก็บถาวร จึงปรากฏเฉพาะในป้ายกำกับ ไม่ปรากฏในกล่องเข้า |
rules | object[] | ไม่ | กฎจัดเก็บอัตโนมัติที่ไม่บังคับ (สูงสุด 20) แต่ละกฎต้องมีอย่างน้อยหนึ่งใน inbox_id, from, to, subject (0–20 รายการ) |
rules[].direction | string | ไม่ | เฉพาะอีเมลแบบ in (ได้รับ) หรือ out (ส่ง) ละไว้เพื่อรวมทั้งสองแบบ (หนึ่งใน in, out) |
rules[].inbox_id | string | ไม่ | เฉพาะอีเมลที่กล่องจดหมายนี้ได้รับ (inb_…) จัดเก็บแต่ละที่อยู่ผู้รับเข้าโฟลเดอร์ของตนเอง |
rules[].from | string | ไม่ | ผู้ส่งมีข้อความนี้ (ไม่สนตัวพิมพ์) เช่น @stripe.com (สูงสุด 200 ตัวอักษร) |
rules[].to | string | ไม่ | To/Cc มีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร) |
rules[].subject | string | ไม่ | หัวเรื่องมีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร) |
rules[].skip_inbox | boolean | ไม่ | เก็บถาวรอีเมลที่ได้รับซึ่งตรงกัน เพื่อให้ปรากฏเฉพาะในโฟลเดอร์ป้ายกำกับ ไม่ปรากฏในกล่องเข้า |
apply_to_existing | boolean | ไม่ | จัดเก็บอีเมลที่เก็บรักษาไว้แล้วซึ่งตรงกับกฎด้วย |
{
"name": "create_label",
"arguments": {
"name": "Agent/Orders",
"skip_inbox": true,
"rules": [
{
"from": "@stripe.com"
}
]
}
}update_labelเปลี่ยนชื่อ เปลี่ยนสี หรือเปลี่ยนป้ายกำกับเป็น bucket
เปลี่ยนชื่อป้ายกำกับ เปลี่ยนสี หรือสลับโหมด bucket (skip_inbox) การเปิดโหมด bucket จะเก็บถาวรอีเมลที่ได้รับซึ่งอยู่ในป้ายกำกับอยู่แล้ว
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
label_id | string | ใช่ | ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร) |
name | string | ไม่ | ชื่อใหม่ (สูงสุด 64 ตัวอักษร) |
color | string | ไม่ | สีเลขฐานสิบหกใหม่ |
skip_inbox | boolean | ไม่ | โหมด bucket: อีเมลที่ได้รับและได้ป้ายกำกับนี้ (โดยกฎ โดยการตอบกลับบทสนทนาที่ส่งด้วยป้ายกำกับนี้ หรือโดยตนเอง) จะถูกเก็บถาวร จึงปรากฏเฉพาะในป้ายกำกับ ไม่ปรากฏในกล่องเข้า |
{
"name": "update_label",
"arguments": {
"label_id": "lbl_123",
"name": "Finance/Billing"
}
}delete_labelลบป้ายกำกับ
DESTRUCTIVE: ลบป้ายกำกับและกฎของป้ายกำกับ ตัวอีเมลยังคงอยู่ เพียงแต่ไม่มีป้ายกำกับนี้
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
label_id | string | ใช่ | ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_label",
"arguments": {
"label_id": "lbl_123"
}
}create_label_ruleเพิ่มกฎจัดเก็บอัตโนมัติ
เพิ่มกฎให้ป้ายกำกับเพื่อให้อีเมลใหม่ที่ตรงกันถูกจัดเก็บโดยอัตโนมัติ ทุกเงื่อนไขที่คุณตั้งต้องตรงกัน ใช้ inbox_id เพื่อให้ที่อยู่ผู้รับมีโฟลเดอร์ของตนเอง เพิ่ม skip_inbox เพื่อไม่ให้ปรากฏในกล่องเข้า
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
label_id | string | ใช่ | ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร) |
direction | string | ไม่ | เฉพาะอีเมลแบบ in (ได้รับ) หรือ out (ส่ง) ละไว้เพื่อรวมทั้งสองแบบ (หนึ่งใน in, out) |
inbox_id | string | ไม่ | เฉพาะอีเมลที่กล่องจดหมายนี้ได้รับ (inb_…) จัดเก็บแต่ละที่อยู่ผู้รับเข้าโฟลเดอร์ของตนเอง |
from | string | ไม่ | ผู้ส่งมีข้อความนี้ (ไม่สนตัวพิมพ์) เช่น @stripe.com (สูงสุด 200 ตัวอักษร) |
to | string | ไม่ | To/Cc มีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร) |
subject | string | ไม่ | หัวเรื่องมีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร) |
skip_inbox | boolean | ไม่ | เก็บถาวรอีเมลที่ได้รับซึ่งตรงกัน เพื่อให้ปรากฏเฉพาะในโฟลเดอร์ป้ายกำกับ ไม่ปรากฏในกล่องเข้า |
apply_to_existing | boolean | ไม่ | จัดเก็บอีเมลที่เก็บรักษาไว้แล้วซึ่งตรงกันด้วย |
{
"name": "create_label_rule",
"arguments": {
"label_id": "Billing",
"inbox_id": "inb_123",
"skip_inbox": true
}
}delete_label_ruleลบกฎจัดเก็บอัตโนมัติ
DESTRUCTIVE: ลบกฎจัดเก็บอัตโนมัติหนึ่งกฎ อีเมลที่จัดเก็บไปแล้วยังคงมีป้ายกำกับ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
label_id | string | ใช่ | ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร) |
rule_id | string | ใช่ | ID กฎ (ขึ้นต้นด้วย lrule_) จาก get_label (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_label_rule",
"arguments": {
"label_id": "lbl_123",
"rule_id": "lrule_123"
}
}label_emailเพิ่มหรือลบป้ายกำกับของอีเมล
ย้ายข้อความระหว่างโฟลเดอร์: เพิ่มและ/หรือลบป้ายกำกับด้วยชื่อหรือ ID lbl_… ชื่อที่ไม่รู้จักใน add จะถูกสร้างขึ้น เว้นแต่ create เป็น false
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email_id | string | ใช่ | ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
add | string[] | ไม่ | ป้ายกำกับที่จะเพิ่ม (0–10 รายการ) |
remove | string[] | ไม่ | ป้ายกำกับที่จะลบ (0–10 รายการ) |
create | boolean | ไม่ | สร้างป้ายกำกับที่ไม่รู้จักใน add (ค่าเริ่มต้น true) |
{
"name": "label_email",
"arguments": {
"email_id": "em_123",
"add": [
"Billing"
],
"remove": [
"Support"
]
}
}ฉบับร่าง ไฟล์แนบ และตัวตนผู้ส่ง
list_sending_identitiesแสดงรายการตัวตนผู้ส่งที่ยืนยันแล้ว
ที่อยู่และโดเมนที่เวิร์กสเปซนี้ส่งได้ในขณะนี้ (โดเมนที่ยืนยันแล้ว From เริ่มต้นของโดเมน และที่อยู่กล่องจดหมายที่ใช้งานอยู่) เรียกก่อน send_email เพื่อเลือก from ที่ถูกต้อง
ไม่มีพารามิเตอร์
{
"name": "list_sending_identities",
"arguments": {}
}create_draftสร้างฉบับร่าง
สร้างฉบับร่างของตัวเขียน ฉบับร่างเก็บไฟล์แนบได้: สร้างฉบับร่าง upload_attachment แล้ว send_email พร้อม draft_id ไม่ส่งอะไรทั้งสิ้น
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
from | string | ไม่ | ที่อยู่ผู้ส่งบนโดเมนที่ยืนยันแล้ว (อาจว่างไว้ระหว่างร่าง) |
to | string[] | ไม่ | ผู้รับ (0–100 รายการ) |
cc | string[] | ไม่ | ผู้รับสำเนา (0–100 รายการ) |
bcc | string[] | ไม่ | ผู้รับสำเนาลับ (0–100 รายการ) |
subject | string | ไม่ | หัวเรื่อง (สูงสุด 998 ตัวอักษร) |
html | string | ไม่ | เนื้อหา HTML |
text | string | ไม่ | เนื้อหาข้อความล้วน |
reply_to_email_id | string | ไม่ | ID อีเมลที่ฉบับร่างนี้ตอบกลับ |
thread_id | string | ไม่ | ID เธรดที่ฉบับร่างนี้อยู่ในนั้น |
{
"name": "create_draft",
"arguments": {
"from": "hello@example.com",
"to": [
"owner@example.com"
],
"subject": "Invoice"
}
}list_draftsแสดงรายการฉบับร่าง
แสดงรายการฉบับร่างของตัวเขียน เรียงจากที่อัปเดตล่าสุด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_drafts",
"arguments": {}
}get_draftดึงฉบับร่าง
ดึงฉบับร่างหนึ่งฉบับพร้อมเมทาดาทาของไฟล์แนบ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
draft_id | string | ใช่ | ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "get_draft",
"arguments": {
"draft_id": "dr_123"
}
}update_draftแทนที่เนื้อหาฉบับร่าง
แทนที่เนื้อหาและผู้รับของฉบับร่าง นี่เป็นการแทนที่ทั้งหมด ฟิลด์ที่คุณละไว้จะถูกล้าง ดังนั้นให้อ่าน get_draft ก่อน แล้วส่งทุกฟิลด์ที่ต้องการเก็บไว้ ไฟล์แนบไม่ได้รับผลกระทบ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
draft_id | string | ใช่ | ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
from | string | ไม่ | ที่อยู่ผู้ส่งบนโดเมนที่ยืนยันแล้ว (อาจว่างไว้ระหว่างร่าง) |
to | string[] | ไม่ | ผู้รับ (0–100 รายการ) |
cc | string[] | ไม่ | ผู้รับสำเนา (0–100 รายการ) |
bcc | string[] | ไม่ | ผู้รับสำเนาลับ (0–100 รายการ) |
subject | string | ไม่ | หัวเรื่อง (สูงสุด 998 ตัวอักษร) |
html | string | ไม่ | เนื้อหา HTML |
text | string | ไม่ | เนื้อหาข้อความล้วน |
reply_to_email_id | string | ไม่ | ID อีเมลที่ฉบับร่างนี้ตอบกลับ |
thread_id | string | ไม่ | ID เธรดที่ฉบับร่างนี้อยู่ในนั้น |
{
"name": "update_draft",
"arguments": {
"draft_id": "dr_123",
"from": "hello@example.com",
"to": [
"owner@example.com"
],
"subject": "Invoice (updated)",
"text": "Attached."
}
}delete_draftทิ้งฉบับร่าง
DESTRUCTIVE: ทิ้งฉบับร่างและลบไฟล์แนบที่จัดเก็บของฉบับร่างนั้นอย่างถาวร
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
draft_id | string | ใช่ | ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_draft",
"arguments": {
"draft_id": "dr_123"
}
}upload_attachmentอัปโหลดไฟล์แนบไปยังฉบับร่าง
อัปโหลดหนึ่งไฟล์ไปยังฉบับร่าง (สูงสุด 10 ไฟล์และรวม 10 MB ต่อข้อความ) ระบุ content_base64 หรือ file_path ในเครื่อง ไฟล์แนบต้องใช้แพ็กเกจแบบชำระเงิน ณ เวลาส่ง
ต้องระบุอย่างน้อยหนึ่งรายการ: content_base64, file_path
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
draft_id | string | ใช่ | ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
filename | string | ไม่ | ชื่อไฟล์ที่แสดงแก่ผู้รับ ค่าเริ่มต้นคือ basename ของ file_path (สูงสุด 255 ตัวอักษร) |
content_type | string | ไม่ | MIME type เช่น application/pdf ค่าเริ่มต้นคือ application/octet-stream |
content_base64 | string | ไม่ | เนื้อหาไฟล์แบบ base64 มาตรฐาน |
file_path | string | ไม่ | พาธสัมบูรณ์ของไฟล์ในเครื่องที่โปรเซสของ MCP server อ่านได้ |
{
"name": "upload_attachment",
"arguments": {
"draft_id": "dr_123",
"filename": "invoice.pdf",
"content_type": "application/pdf",
"file_path": "/tmp/invoice.pdf"
}
}download_attachmentดาวน์โหลดไฟล์แนบ
ดาวน์โหลดไฟล์แนบส่วนตัว (ที่ส่ง ได้รับ หรืออยู่ในฉบับร่าง) คืนเนื้อหาแบบ base64 หรือเขียนไฟล์เมื่อตั้ง save_to_path (จะไม่เขียนทับเว้นแต่ overwrite เป็น true)
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
attachment_id | string | ใช่ | ID ไฟล์แนบ (ขึ้นต้นด้วย att_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
save_to_path | string | ไม่ | พาธสัมบูรณ์ในเครื่องที่จะเขียนไฟล์ลง แทนที่จะคืนเป็น base64 (ไม่บังคับ) |
overwrite | boolean | ไม่ | อนุญาตให้แทนที่ไฟล์ที่มีอยู่ที่ save_to_path ค่าเริ่มต้นคือ false |
{
"name": "download_attachment",
"arguments": {
"attachment_id": "att_123",
"save_to_path": "/tmp/invoice.pdf"
}
}delete_attachmentลบไฟล์แนบ
DESTRUCTIVE: ลบไฟล์แนบที่จัดเก็บไว้อย่างถาวร (เช่น นำไฟล์ออกจากฉบับร่างก่อนส่ง)
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
attachment_id | string | ใช่ | ID ไฟล์แนบ (ขึ้นต้นด้วย att_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_attachment",
"arguments": {
"attachment_id": "att_123"
}
}เทมเพลตแบบโฮสต์
list_templatesแสดงรายการเทมเพลตแบบโฮสต์
แสดงรายการเทมเพลตอีเมลแบบโฮสต์พร้อมสถานะการเผยแพร่และการใช้งาน แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
lifecycle | string | ไม่ | active (ค่าเริ่มต้น) archived หรือ all (หนึ่งใน active, archived, all) |
query | string | ไม่ | ค้นหาตามชื่อหรือคีย์ (สูงสุด 120 ตัวอักษร) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_templates",
"arguments": {
"lifecycle": "active"
}
}create_templateสร้างเทมเพลตแบบโฮสต์
สร้างเทมเพลตพร้อมฉบับร่างที่แก้ไขได้ โดยเริ่มจากตัวเริ่มต้นได้ (welcome, reset, receipt หรือ blank) เผยแพร่ก่อนส่งด้วยคีย์
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ใช่ | ชื่อสำหรับมนุษย์ (สูงสุด 120 ตัวอักษร) |
key | string | ไม่ | คีย์การส่งที่คงที่: ตัวอักษรพิมพ์เล็ก ตัวเลข ขีดกลาง ขึ้นต้นด้วยตัวอักษร (2–64 ตัวอักษร) สร้างจากชื่อเมื่อละไว้ |
starter | string | ไม่ | เนื้อหาเริ่มต้น (หนึ่งใน blank, welcome, reset, receipt) |
{
"name": "create_template",
"arguments": {
"name": "Account welcome",
"key": "account-welcome",
"starter": "welcome"
}
}get_templateดึงเทมเพลต
ดึงฉบับร่างปัจจุบันของเทมเพลต (พร้อม revision) รุ่นที่เผยแพร่และใช้งานอยู่ ประวัติรุ่น และการใช้งาน รับ ID หรือคีย์
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID เทมเพลต (tmpl_…) หรือคีย์ (สูงสุด 128 ตัวอักษร) |
{
"name": "get_template",
"arguments": {
"template_id": "account-welcome"
}
}update_template_draftบันทึกฉบับร่างเทมเพลต
บันทึกฉบับร่างที่แก้ไขได้ของเทมเพลตโดยใช้ optimistic concurrency: ส่ง revision ปัจจุบันจาก get_template (409 หมายความว่ามีคนบันทึกก่อน ให้อ่านใหม่แล้วลองอีกครั้ง) นี่เป็นการแทนที่เนื้อหาฉบับร่างทั้งหมด ฟิลด์ที่ละไว้จะถูกล้าง ดังนั้นให้ส่งทุกฟิลด์ที่ต้องการเก็บไว้ ใช้ตัวแทน {{variable}}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
revision | integer | ใช่ | revision ปัจจุบันของฉบับร่างจาก get_template (1–…) |
name | string | ไม่ | ชื่อเทมเพลต (สูงสุด 120 ตัวอักษร) |
subject_template | string | ไม่ | หัวเรื่องพร้อมตัวแทน (สูงสุด 998 ตัวอักษร) |
preheader_template | string | ไม่ | ข้อความตัวอย่าง (สูงสุด 240 ตัวอักษร) |
html_template | string | ไม่ | เนื้อหา HTML พร้อมตัวแทน |
text_template | string | ไม่ | เนื้อหาข้อความล้วนพร้อมตัวแทน |
from | string | ไม่ | ผู้ส่งเริ่มต้นสำหรับการส่งเทมเพลตนี้ |
reply_to | string | ไม่ | Reply-To เริ่มต้น |
variables | object[] | ไม่ | สัญญาตัวแปรที่มีชนิดข้อมูล แต่ละรายการ: {key (ตัวพิมพ์เล็ก/ขีดล่าง), label, type: text|number|url|boolean, required (ค่าเริ่มต้น true), fallback, description} |
variables[].key | string | ใช่ | |
variables[].label | string | ไม่ | |
variables[].type | string | ไม่ | (หนึ่งใน text, number, url, boolean) |
variables[].required | boolean | ไม่ | |
variables[].fallback | any | ไม่ | |
variables[].description | string | ไม่ | |
sample_data | object | ไม่ | ค่าตัวอย่างที่ใช้สำหรับการดูตัวอย่างและการทดสอบ |
{
"name": "update_template_draft",
"arguments": {
"template_id": "account-welcome",
"revision": 3,
"name": "Account welcome",
"subject_template": "Welcome, {{first_name}}",
"text_template": "Hi {{first_name}}",
"variables": [
{
"key": "first_name",
"type": "text",
"required": true
}
],
"sample_data": {
"first_name": "Asha"
}
}
}create_template_draftเริ่มฉบับร่างใหม่จากรุ่นที่เผยแพร่
สร้างฉบับร่างใหม่ที่แก้ไขได้โดยคัดลอกจากรุ่นที่เผยแพร่ปัจจุบัน (409 หากมีฉบับร่างอยู่แล้วหรือยังไม่มีอะไรเผยแพร่)
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
{
"name": "create_template_draft",
"arguments": {
"template_id": "account-welcome"
}
}render_templateเรนเดอร์ตัวอย่างเทมเพลต
เรนเดอร์ผลลัพธ์จริงจากเซิร์ฟเวอร์ (subject, html, text) สำหรับฉบับร่าง รุ่นที่เผยแพร่ หรือรุ่นที่ระบุ ด้วยข้อมูลที่ให้ ไม่ส่งอีเมล คืน 422 พร้อม findings เมื่อข้อมูลละเมิดสัญญาของตัวแปร
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
version_id | string | ไม่ | ID รุ่นที่ไม่บังคับ ค่าเริ่มต้นคือฉบับร่าง แล้วจึงเป็นรุ่นที่เผยแพร่ |
data | object | ไม่ | ค่าของตัวแปร ค่าเริ่มต้นคือข้อมูลตัวอย่างของรุ่นนั้น |
{
"name": "render_template",
"arguments": {
"template_id": "account-welcome",
"data": {
"first_name": "Asha"
}
}
}send_template_testส่งอีเมลทดสอบเทมเพลต
SENDS REAL EMAIL. Send a [Test]-prefixed snapshot of the draft (or a given version) to the given recipients. Counts against usage; trial workspaces can only send to the account email or a mailbox-simulator test address.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
to | string[] | ใช่ | ผู้รับทดสอบ (1–100 รายการ) |
from | string | ไม่ | ผู้ส่งบนโดเมนที่ยืนยันแล้ว ค่าเริ่มต้นคือ From ของเทมเพลต |
version_id | string | ไม่ | ID รุ่นที่ไม่บังคับ |
data | object | ไม่ | ค่าของตัวแปร ค่าเริ่มต้นคือข้อมูลตัวอย่าง |
{
"name": "send_template_test",
"arguments": {
"template_id": "account-welcome",
"to": [
"owner@example.com"
]
}
}publish_templateเผยแพร่รุ่นของเทมเพลต
เผยแพร่ฉบับร่างปัจจุบันเป็นรุ่นที่แก้ไขไม่ได้ ซึ่ง send_email ที่ใช้ template.key จะใช้ล้มเหลวด้วย findings 422 เมื่อมีข้อผิดพลาดในการตรวจสอบ หรือ 409 หากจะทำลายสัญญาตัวแปรที่ใช้งานจริงของเทมเพลตที่ใช้ในระบบจริงอยู่แล้ว
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
{
"name": "publish_template",
"arguments": {
"template_id": "account-welcome"
}
}archive_templateเก็บถาวรเทมเพลต
หยุดการส่งใหม่ที่ใช้เทมเพลตนี้ (เก็บประวัติไว้ และย้อนกลับได้ด้วย restore_template) การเชื่อมต่อใด ๆ ที่ส่งด้วยคีย์นี้จะเริ่มล้มเหลวด้วย 404
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
{
"name": "archive_template",
"arguments": {
"template_id": "account-welcome"
}
}restore_templateกู้คืนเทมเพลตที่เก็บถาวร
ทำให้เทมเพลตที่เก็บถาวรกลับมาใช้งานได้อีกครั้ง
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร) |
{
"name": "restore_template",
"arguments": {
"template_id": "account-welcome"
}
}โดเมนและ DNS
list_domainsแสดงรายการโดเมน
แสดงรายการโดเมนผู้ส่งพร้อม setup_status รวม (verified | checking | pending) สถานะ DNS ต่อเรคคอร์ด และสถานะขาเข้า อาจช้า: โดเมนที่ยังไม่ยืนยันจะถูกตรวจสอบซ้ำแบบสด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_domains",
"arguments": {}
}get_domainดึงรายละเอียดการตั้งค่าโดเมน
ดึงโดเมนหนึ่งรายการพร้อมเรคคอร์ด DNS ที่ต้องเผยแพร่ตรงตัว (type, name, value) สถานะจริงของแต่ละเรคคอร์ดจาก public resolver สองตัว dns_issues พร้อมวิธีแก้ และสถานะขาเข้า
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "get_domain",
"arguments": {
"domain_id": "dom_123"
}
}add_domainเพิ่มโดเมนผู้ส่ง
Register a domain you control for sending. Returns the DNS records (Easy DKIM CNAMEs) the owner must publish. Does not change DNS itself. Counts against the plan's domain limit.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ใช่ | ชื่อโดเมนเปล่า เช่น example.com หรือ mail.example.com (สูงสุด 253 ตัวอักษร) |
default_from | string | ไม่ | ที่อยู่ผู้ส่งเริ่มต้นบนโดเมนนี้ (ไม่บังคับ) |
{
"name": "add_domain",
"arguments": {
"name": "example.com"
}
}verify_domainยืนยันโดเมน
Run a live DNS and DKIM verification check now. Safe to repeat; poll every 30–60 s after DNS changes (propagation can take minutes to hours). Sending is allowed once status is verified.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "verify_domain",
"arguments": {
"domain_id": "dom_123"
}
}delete_domainลบโดเมน
DESTRUCTIVE: ลบโดเมนออกจากเวิร์กสเปซ รวมถึงเส้นทางรับอีเมลขาเข้า การส่งจากโดเมนนี้จะล้มเหลวทันทีหลังจากนั้น ไม่ลบเรคคอร์ด DNS ที่ผู้ให้บริการ DNS ของคุณ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_domain",
"arguments": {
"domain_id": "dom_123"
}
}get_dns_providerตรวจหาผู้ให้บริการ DNS และโฮสต์ของเรคคอร์ด
ตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจของโดเมน และคืนโฮสต์แบบสัมพัทธ์ที่ต้องพิมพ์ในผู้ให้บริการนั้นสำหรับแต่ละเรคคอร์ด เรคคอร์ด DMARC ที่แนะนำ คำแนะนำ MX ขาเข้า และมีการตั้งค่าแบบคลิกเดียว (Domain Connect) หรือไม่
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "get_dns_provider",
"arguments": {
"domain_id": "dom_123"
}
}get_domain_connect_linkดึงลิงก์ตั้งค่า DNS แบบคลิกเดียว
เมื่อ get_dns_provider รายงาน providers.domainConnect.available ให้สร้าง URL ขอความยินยอมที่ลงนามแล้ว ส่งให้มนุษย์ เขาเปิดและอนุมัติการเปลี่ยน DNS ที่ผู้ให้บริการของตน จะไม่มีอะไรเปลี่ยนจนกว่าจะอนุมัติ 409 หากไม่รองรับ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "get_domain_connect_link",
"arguments": {
"domain_id": "dom_123"
}
}อีเมลขาเข้า
setup_inboundเปิดใช้การรับอีเมลขาเข้าสำหรับโดเมน
Provision inbound receiving for a verified domain. Uses the root domain when it has no conflicting MX, otherwise inbound.<domain>. Returns the MX record the owner must publish; it does not edit DNS.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "setup_inbound",
"arguments": {
"domain_id": "dom_123"
}
}verify_inboundยืนยัน MX ขาเข้า
ตรวจสอบเรคคอร์ด MX ขาเข้าอีกครั้ง สถานะจะเป็น ready เมื่อ public resolver ทั้งสองตัวเห็นเรคคอร์ดนั้น
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "verify_inbound",
"arguments": {
"domain_id": "dom_123"
}
}list_inboxesแสดงรายการที่อยู่ขาเข้า
แสดงรายการที่อยู่รับ โดยระบุเฉพาะโดเมนหนึ่งได้ แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ไม่ | ตัวกรอง ID โดเมน (ไม่บังคับ) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_inboxes",
"arguments": {
"domain_id": "dom_123"
}
}get_inboxดึงกล่องจดหมาย
ดึงที่อยู่ขาเข้าหนึ่งรายการ
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
inbox_id | string | ใช่ | ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "get_inbox",
"arguments": {
"inbox_id": "inb_123"
}
}create_inboxสร้างที่อยู่ขาเข้า
สร้างที่อยู่ เช่น support@<receiving domain> บนโดเมนที่สถานะขาเข้าเป็น ready (รัน setup_inbound และ verify_inbound ก่อน) อีเมลที่ได้รับจะปรากฏใน list_emails โดย direction เป็น in
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain_id | string | ใช่ | ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
local_part | string | ใช่ | ส่วนก่อน @ เช่น support (สูงสุด 64 ตัวอักษร) |
name | string | ไม่ | ชื่อที่แสดง (ไม่บังคับ) |
{
"name": "create_inbox",
"arguments": {
"domain_id": "dom_123",
"local_part": "support",
"name": "Support"
}
}update_inboxเปลี่ยนชื่อ เปิดใช้ หรือปิดใช้กล่องจดหมาย
เปลี่ยนชื่อกล่องจดหมายหรือตั้งสถานะเป็น active / disabled
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
inbox_id | string | ใช่ | ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
name | string | ไม่ | ชื่อที่แสดงใหม่ |
status | string | ไม่ | สถานะใหม่ (หนึ่งใน active, disabled) |
{
"name": "update_inbox",
"arguments": {
"inbox_id": "inb_123",
"status": "disabled"
}
}set_inbox_forwardingส่งต่อกล่องจดหมายไปยังที่อยู่อื่น
SENDS REAL EMAIL เมื่อส่งต่อไปยังผู้อื่นที่ไม่ใช่เจ้าของบัญชี: ตั้งค่าว่าจะส่งต่ออีเมลที่กล่องจดหมายได้รับไปที่ใด ที่อยู่ของเจ้าของเองจะเปิดใช้ทันที ที่อยู่อื่นจะได้รับอีเมลยืนยัน และการส่งต่อจะคงสถานะ pending จนกว่าคนที่นั่นจะยืนยัน ส่ง forward_to: null เพื่อปิดการส่งต่อ สำเนาที่ส่งต่อจะมาจากที่อยู่ของกล่องจดหมาย โดยมีผู้ส่งต้นฉบับเป็น Reply-To
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
inbox_id | string | ใช่ | ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
forward_to | string,null | ใช่ | ที่อยู่อีเมลปลายทางของการส่งต่อ หรือ null เพื่อปิดการส่งต่อ (สูงสุด 254 ตัวอักษร) |
{
"name": "set_inbox_forwarding",
"arguments": {
"inbox_id": "inb_123",
"forward_to": "team@example.net"
}
}delete_inboxลบกล่องจดหมาย
DESTRUCTIVE: ลบที่อยู่ขาเข้า อีเมลที่ได้รับไปแล้วยังคงเก็บไว้ อีเมลใหม่ที่ส่งมายังที่อยู่นั้นจะไม่ถูกจัดเก็บเข้าที่อยู่นั้นอีก
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
inbox_id | string | ใช่ | ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร) |
{
"name": "delete_inbox",
"arguments": {
"inbox_id": "inb_123"
}
}ความสามารถในการส่งถึง bounce และการระงับการส่ง
deliverability_statsดึงสถิติการส่งถึงย้อนหลัง 30 วัน
ยอดรวมย้อนหลัง 30 วันทั้งเวิร์กสเปซ: sent, delivery, bounce, complaint, reject, open, click และ deliveryRate (%)
ไม่มีพารามิเตอร์
{
"name": "deliverability_stats",
"arguments": {}
}deliverability_accountGet account delivery rates
Daily ladder, today's usage, 7-day hard-bounce and complaint rates against the promote, hold, and pause thresholds, and a per-day trend. Diagnostic text is plain text.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
days | integer | ไม่ | (one of 7, 30, 90) |
{
"name": "deliverability_account",
"arguments": {
"days": 30
}
}deliverability_domainsGet domain delivery rates
Per sending domain: sent, delivered, hard and soft bounces, complaints, failures, rates, and an active Gmail cap or 4.7.28 backoff when one applies.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
days | integer | ไม่ | |
domain | string | ไม่ | |
limit | integer | ไม่ | |
offset | integer | ไม่ |
{
"name": "deliverability_domains",
"arguments": {
"days": 30
}
}deliverability_sendersGet sender delivery rates
Per From address: sent, delivered, hard and soft bounces, complaints, failures, and rates.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
days | integer | ไม่ | |
domain | string | ไม่ | |
limit | integer | ไม่ | |
offset | integer | ไม่ |
{
"name": "deliverability_senders",
"arguments": {
"days": 30
}
}score_emailScore an email's content
A checklist of one email's content before it is sent: 100 for a plain email with no links and no images, lower for each thing mail filters look at (a designed layout, links to another site than the sender's, link shorteners, images with few words, hidden text, capitals, an empty subject, very long HTML). Returns each finding with the points it costs and a one-line suggestion, most points first. Read-only: nothing is stored or sent. Pass the email as written; the unsubscribe footer and tracking SendHQ adds are not scored. It looks at content only: sender reputation, authentication and how recipients react decide more of where mail lands, so treat it as a checklist, not a prediction.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
subject | string | ไม่ | The subject line. |
html | string | ไม่ | The HTML as written, before SendHQ adds its footer or tracking. (max 2000000 chars) |
text | string | ไม่ | The plain-text part. Compared with the HTML when both are given; scored on its own when there is no HTML. (max 2000000 chars) |
from | string | ไม่ | The sender: an email address or a domain such as example.com. Without it, links to other sites are not judged. (max 320 chars) |
{
"name": "score_email",
"arguments": {
"from": "hello@example.com",
"subject": "Your cart is still here",
"html": "<p>Pick up where you left off.</p><p><a href=\"https://bit.ly/3xyz\">Finish checkout</a></p>"
}
}list_sender_reputationแสดงรายการชื่อเสียงผู้ส่ง
สถานะชื่อเสียงต่อที่อยู่ From ที่ตรงกันทุกตัวอักษร: active, throttled (ขีดจำกัดรายวันต่ำลง) หรือ paused (การส่งคืน 423) พร้อมเหตุผลและขีดจำกัดรายวัน ตรวจสอบเมื่อการส่งล้มเหลวด้วย 423 หรือ 429 แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_sender_reputation",
"arguments": {}
}list_suppressionsแสดงรายการการระงับการส่ง
รายการระงับการส่ง (suppression list) ของเวิร์กสเปซ: ผู้รับที่ถูกบล็อกหลังเกิด bounce ถาวรหรือการร้องเรียนสแปม การส่งถึงผู้รับเหล่านี้ล้มเหลวด้วย 422 แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_suppressions",
"arguments": {}
}remove_suppressionลบการระงับการส่งจาก bounce
DESTRUCTIVE (ลดความเข้มของการบล็อกเพื่อความปลอดภัย): ลบการระงับการส่งจาก bounce เพื่อให้ส่งอีเมลถึงที่อยู่นั้นได้อีก ทำเมื่อมนุษย์ยืนยันว่าที่อยู่นั้นใช้งานได้แล้วเท่านั้น การระงับการส่งจาก complaint ลบไม่ได้ (409)
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email | string | ใช่ | ที่อยู่ผู้รับที่ถูกระงับการส่ง (สูงสุด 320 ตัวอักษร) |
{
"name": "remove_suppression",
"arguments": {
"email": "fixed-mailbox@example.net"
}
}list_blocked_recipientsแสดงรายการผู้รับที่ถูกบล็อก
ทุกผู้รับที่ SendHQ จะปฏิเสธ: bounce, complaint และการยกเลิกการรับอีเมลการตลาดที่จำกัดตามโดเมน พร้อมสรุปตามประเภท อ่านสูงสุด 500 รายการล่าสุด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_blocked_recipients",
"arguments": {}
}Campaigns
list_contactsList contacts
Campaigns: Newest-first contacts with their status, consent evidence, tags, custom fields, engagement (bot-filtered, estimated opens and clicks), and the lists they are subscribed to. Filter by list, status (including dormant), email/name substring (* is an email wildcard, e.g. *@example.com), tag, source, signup date, or a saved segment. Paginated: the result includes pagination {offset, limit, returned, has_more, next_offset}.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
list_id | string | ไม่ | Only members of this list (lst_…). |
status | string | ไม่ | Only contacts with this status. dormant: stopped opening and did not answer list cleanup, so broadcasts skip them. (one of subscribed, pending, unsubscribed, bounced, complained, dormant) |
query | string | ไม่ | Email or name contains this text; * is a wildcard on the email. (max 200 chars) |
tag | string | ไม่ | Only contacts with this tag. (max 60 chars) |
source | string | ไม่ | How the contact was added. (one of form, api, import) |
after | string | ไม่ | Signed up at or after this time. ISO 8601 date or date-time. (max 40 chars) |
before | string | ไม่ | Signed up before this time. ISO 8601 date or date-time. (max 40 chars) |
segment_id | string | ไม่ | Only contacts matching this saved segment (seg_…). |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_contacts",
"arguments": {
"status": "subscribed"
}
}create_contactAdd a contact
Campaigns: Add one contact to the workspace, optionally to lists and with tags. A subscribed contact (the default) needs consent_basis: how this person agreed to receive your email. Only add people who asked for your email. Use status: unsubscribed to record an opt-out. Addresses already suppressed or unsubscribed from the workspace are stored with that status. Fails with 409 if the email already exists.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email | string | ใช่ | Email address. (max 320 chars) |
name | string | ไม่ | Display name; the first word is {{first_name}}. (max 200 chars) |
fields | object | ไม่ | Custom fields (string, number, or boolean values), e.g. {"plan": "pro"}. Usable in broadcasts as {{fields.plan}} or {{plan}}. On update, a null value removes the field. |
tags | string[] | ไม่ | Tags to attach, e.g. ["VIP"]. Up to 50. (0–50 items) |
list_ids | string[] | ไม่ | Lists to add the contact to (lst_…). (0–100 items) |
status | string | ไม่ | subscribed (default, requires consent_basis) or unsubscribed. (one of subscribed, unsubscribed) |
consent_basis | string | ไม่ | How these people agreed to receive your email, recorded as consent evidence, e.g. Signed up on acme.com/newsletter (double opt-in), exported from Mailchimp. 10-500 characters. (max 500 chars) |
{
"name": "create_contact",
"arguments": {
"email": "ada@example.net",
"name": "Ada Lovelace",
"consent_basis": "Ticked the newsletter box at checkout on acme.com"
}
}upsert_contactCreate or update a contact by email
Campaigns: Create the contact with this email, or change the one that exists: set name, timezone, and locale, merge fields, and add tags. A new contact needs consent_basis and takes the status its address already has (bounced or complained when suppressed, unsubscribed when it opted out, otherwise subscribed). An existing contact's status is never changed, so nobody is resubscribed. Unlike create_contact it does not fail when the email exists. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email | string | ใช่ | Email address. (max 320 chars) |
name | string | ไม่ | Display name; the first word is {{first_name}}. (max 200 chars) |
fields | object | ไม่ | Custom fields to merge (string, number, or boolean values), e.g. {"plan": "pro"}. A null value removes a field. |
tags | string[] | ไม่ | Tags to add, e.g. ["VIP"]. Existing tags are kept. (0–50 items) |
timezone | string | ไม่ | IANA time zone, e.g. Europe/Paris. Automation emails respect sending hours in this zone. (max 64 chars) |
locale | string | ไม่ | Language tag, e.g. fr or pt-br. Picks the language version of each automation email. (max 35 chars) |
consent_basis | string | ไม่ | How this person agreed to receive your email, e.g. Created an account on acme.com and accepted product emails. Required when the email is not a contact yet. 10-500 characters. (max 500 chars) |
{
"name": "upsert_contact",
"arguments": {
"email": "ada@example.net",
"name": "Ada Lovelace",
"fields": {
"plan": "pro"
},
"timezone": "Europe/London",
"consent_basis": "Created an account on acme.com and accepted product emails"
}
}get_contactGet a contact
Campaigns: One contact by ID or email: status, consent evidence (source, basis, opt-in and confirmation times), custom fields, and subscribed lists.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
contact_id | string | ใช่ | Contact ID (starts with ct_) or the contact's email address. (max 320 chars) |
{
"name": "get_contact",
"arguments": {
"contact_id": "ct_123"
}
}update_contactUpdate, tag, or unsubscribe a contact
Campaigns: Change a contact's name, merge custom fields (null removes one), change tags (tags replaces the whole set; add_tags and remove_tags change it), or set status to unsubscribed. A contact can never be resubscribed through the API; only the recipient can, by confirming a signup form.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
contact_id | string | ใช่ | Contact ID (starts with ct_) or the contact's email address. (max 320 chars) |
name | string | ไม่ | New display name. (max 200 chars) |
fields | object | ไม่ | Custom fields (string, number, or boolean values), e.g. {"plan": "pro"}. Usable in broadcasts as {{fields.plan}} or {{plan}}. On update, a null value removes the field. |
tags | string[] | ไม่ | Replace all of the contact's tags with these. (0–50 items) |
add_tags | string[] | ไม่ | Tags to add. (0–50 items) |
remove_tags | string[] | ไม่ | Tags to remove. (0–50 items) |
status | string | ไม่ | Only unsubscribed is accepted. (one of unsubscribed) |
{
"name": "update_contact",
"arguments": {
"contact_id": "ct_123",
"fields": {
"plan": "team"
}
}
}delete_contactDelete a contact
DESTRUCTIVE: permanently delete a contact and its list memberships. Suppressions and recorded unsubscribes are kept, so the address still cannot be mailed if it is added again. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
contact_id | string | ใช่ | Contact ID (starts with ct_) or the contact's email address. (max 320 chars) |
{
"name": "delete_contact",
"arguments": {
"contact_id": "ct_123"
}
}import_contactsImport contacts from CSV
Campaigns: Import up to 5,000 CSV rows (5 MB) per call, optionally into a list. The header row needs an email column; name (or first_name/last_name), status, and tags (separated by ; or |) are recognized and other columns become custom fields. consent_basis is required and recorded on every new contact. tags are added to every accepted row. Rows whose status says unsubscribed import as unsubscribed; existing contacts keep their status. Returns counts of accepted, created, existing, skipped (duplicates), and invalid rows with line numbers.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
csv | string | ใช่ | The CSV file content, header row first. (max 5242880 chars) |
list_id | string | ไม่ | Add every accepted row to this list (lst_…). |
consent_basis | string | ใช่ | How these people agreed to receive your email, recorded as consent evidence, e.g. Signed up on acme.com/newsletter (double opt-in), exported from Mailchimp. 10-500 characters. (max 500 chars) |
tags | string[] | ไม่ | Tags to add to every accepted row, e.g. ["imported-2026-11"]. (0–50 items) |
update_existing | boolean | ไม่ | Merge names and fields into contacts that already exist. Their status never changes. |
{
"name": "import_contacts",
"arguments": {
"csv": "email,name\nada@example.net,Ada Lovelace\n",
"consent_basis": "Newsletter signups exported from Mailchimp (double opt-in)"
}
}list_contact_importsList contact imports
Campaigns: Recent CSV imports with their consent basis and row counts.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_contact_imports",
"arguments": {}
}bulk_update_contactsBulk update contacts
DESTRUCTIVE when action is delete (permanent) or unsubscribe (cannot be undone through the API). Apply one action to up to 10,000 contacts: the IDs in contact_ids, or everyone matching filter (the list_contacts filters). Actions: tag / untag (with tags), add_to_list / remove_from_list (with list_id), unsubscribe, delete. Adding to a list mirrors each contact's status, so nobody is resubscribed. delete needs confirm_count equal to the number of contacts it would delete: call once without it to get that count (409), confirm with the user, then repeat with it. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
action | string | ใช่ | What to do. (one of tag, untag, add_to_list, remove_from_list, unsubscribe, delete) |
contact_ids | string[] | ไม่ | Contact IDs (ct_…). Use this or filter. (0–10000 items) |
filter | object | ไม่ | Everyone matching these list_contacts filters. Use this or contact_ids. |
filter.list_id | string | ไม่ | Members of this list. |
filter.status | string | ไม่ | Only contacts with this status. dormant: stopped opening and did not answer list cleanup, so broadcasts skip them. (one of subscribed, pending, unsubscribed, bounced, complained, dormant) |
filter.query | string | ไม่ | Email or name contains; * is an email wildcard. (max 200 chars) |
filter.tag | string | ไม่ | Has this tag. (max 60 chars) |
filter.source | string | ไม่ | How the contact was added. (one of form, api, import) |
filter.after | string | ไม่ | Signed up at or after. ISO 8601 date or date-time. (max 40 chars) |
filter.before | string | ไม่ | Signed up before. ISO 8601 date or date-time. (max 40 chars) |
filter.segment_id | string | ไม่ | Matches this segment. |
tags | string[] | ไม่ | For tag and untag. (0–50 items) |
list_id | string | ไม่ | For add_to_list and remove_from_list (lst_…). |
confirm_count | integer | ไม่ | For delete: the number of contacts that will be deleted, from the 409 response. (0–…) |
{
"name": "bulk_update_contacts",
"arguments": {
"action": "tag",
"tags": [
"october"
],
"filter": {
"list_id": "lst_123",
"status": "subscribed"
}
}
}list_tagsList contact tags
Campaigns: The workspace's contact tags, most used first, with how many contacts carry each (up to 500). Paginated.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_tags",
"arguments": {}
}list_contact_fieldsList custom contact fields
Campaigns: Defined custom contact fields with label and type (text, number, date). Defined fields are known to check_broadcast's merge-tag check and typed in segment conditions. Contacts may also carry undefined keys. Paginated.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_contact_fields",
"arguments": {}
}set_contact_fieldDefine a custom contact field
Campaigns: Create or change a custom field definition (label and type). Values live on each contact's fields. Built-in merge tags (email, name, first_name, last_name, fields, unsubscribe_url) cannot be used as keys. A workspace may define 50 fields.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
field_key | string | ใช่ | Field key: a lowercase letter, then up to 39 of a-z, 0-9, and _ (e.g. plan). Used in content as {{fields.plan}}. (max 40 chars) |
label | string | ไม่ | Label shown in the dashboard. Defaults to the key. (max 80 chars) |
type | string | ไม่ | text (default), number, or date. (one of text, number, date) |
{
"name": "set_contact_field",
"arguments": {
"field_key": "plan",
"label": "Plan",
"type": "text"
}
}delete_contact_fieldDelete a custom field definition
DESTRUCTIVE: delete a custom field definition. Values already stored on contacts are kept. Fails with 404 when the field is not defined. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
field_key | string | ใช่ | Field key: a lowercase letter, then up to 39 of a-z, 0-9, and _ (e.g. plan). Used in content as {{fields.plan}}. (max 40 chars) |
{
"name": "delete_contact_field",
"arguments": {
"field_key": "plan"
}
}list_segmentsList segments
Campaigns: Saved segments with count (subscribed, non-dormant contacts in the workspace that match now) and fields, the condition fields and operators each accepts. Paginated.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_segments",
"arguments": {}
}get_segmentGet a segment
Campaigns: One segment with its conditions and live count.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
segment_id | string | ใช่ | Segment ID (starts with seg_), as returned by list_segments or create_segment. (max 128 chars) |
{
"name": "get_segment",
"arguments": {
"segment_id": "seg_123"
}
}preview_segmentPreview segment conditions
Campaigns: Count and sample (up to 5) the subscribed, non-dormant contacts that match conditions without saving them. Read-only; use it to check conditions before create_segment.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
match | string | ไม่ | all (default): every condition must match. any: at least one. (one of all, any) |
conditions | object[] | ไม่ | Up to 20 conditions. Opened and clicked use bot-filtered, estimated engagement. (0–20 items) |
conditions[].field | string | ใช่ | tag, list, status, source, email, name, signed_up, opened, clicked, opens, sends_without_open, country, or a custom field as fields.<key> (or field together with key). (max 48 chars) |
conditions[].key | string | ไม่ | Custom field key when field is field. (max 40 chars) |
conditions[].op | string | ใช่ | tag: has, not_has. list: in, not_in (a list ID). status: is, is_not (subscribed, pending, unsubscribed, bounced, complained, dormant). source: is, is_not (form, api, import). email: contains, not_contains, ends_with. name: is_set, not_set. signed_up: before, after (YYYY-MM-DD), in_last_days, not_in_last_days. opened / clicked: in_last_days, not_in_last_days, ever, never. opens / sends_without_open: gte, lte. country: is, is_not (two-letter code). Custom fields: equals, not_equals, contains, gt, lt, before, after, is_set, not_set. (one of has, not_has, in, not_in, is, is_not, contains, not_contains, ends_with, is_set, not_set, before, after, in_last_days, not_in_last_days, ever, never, gte, lte, equals, not_equals, gt, lt) |
conditions[].value | string,number | ไม่ | Required except for is_set, not_set, ever, and never. A number of days for in_last_days / not_in_last_days, a number for gte, lte, gt, lt, a date (YYYY-MM-DD) for before / after. |
{
"name": "preview_segment",
"arguments": {
"match": "all",
"conditions": [
{
"field": "tag",
"op": "has",
"value": "VIP"
},
{
"field": "opened",
"op": "in_last_days",
"value": 90
}
]
}
}create_segmentCreate a segment
Campaigns: Save a segment: up to 20 conditions joined by match. Use it as a broadcast's audience.segment_id, as list_contacts segment_id, or in bulk_update_contacts filters. A workspace may have 200 segments.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ใช่ | Segment name. (max 120 chars) |
match | string | ไม่ | all (default): every condition must match. any: at least one. (one of all, any) |
conditions | object[] | ไม่ | Up to 20 conditions. Opened and clicked use bot-filtered, estimated engagement. (0–20 items) |
conditions[].field | string | ใช่ | tag, list, status, source, email, name, signed_up, opened, clicked, opens, sends_without_open, country, or a custom field as fields.<key> (or field together with key). (max 48 chars) |
conditions[].key | string | ไม่ | Custom field key when field is field. (max 40 chars) |
conditions[].op | string | ใช่ | tag: has, not_has. list: in, not_in (a list ID). status: is, is_not (subscribed, pending, unsubscribed, bounced, complained, dormant). source: is, is_not (form, api, import). email: contains, not_contains, ends_with. name: is_set, not_set. signed_up: before, after (YYYY-MM-DD), in_last_days, not_in_last_days. opened / clicked: in_last_days, not_in_last_days, ever, never. opens / sends_without_open: gte, lte. country: is, is_not (two-letter code). Custom fields: equals, not_equals, contains, gt, lt, before, after, is_set, not_set. (one of has, not_has, in, not_in, is, is_not, contains, not_contains, ends_with, is_set, not_set, before, after, in_last_days, not_in_last_days, ever, never, gte, lte, equals, not_equals, gt, lt) |
conditions[].value | string,number | ไม่ | Required except for is_set, not_set, ever, and never. A number of days for in_last_days / not_in_last_days, a number for gte, lte, gt, lt, a date (YYYY-MM-DD) for before / after. |
{
"name": "create_segment",
"arguments": {
"name": "Engaged pro customers",
"conditions": [
{
"field": "fields.plan",
"op": "equals",
"value": "pro"
},
{
"field": "opened",
"op": "in_last_days",
"value": 90
}
]
}
}update_segmentUpdate a segment
Campaigns: Rename a segment or change match or conditions (which replaces the whole list). Broadcasts using it pick up the change when they start sending.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
segment_id | string | ใช่ | Segment ID (starts with seg_), as returned by list_segments or create_segment. (max 128 chars) |
name | string | ไม่ | Segment name. (max 120 chars) |
match | string | ไม่ | all (default): every condition must match. any: at least one. (one of all, any) |
conditions | object[] | ไม่ | Up to 20 conditions. Opened and clicked use bot-filtered, estimated engagement. (0–20 items) |
conditions[].field | string | ใช่ | tag, list, status, source, email, name, signed_up, opened, clicked, opens, sends_without_open, country, or a custom field as fields.<key> (or field together with key). (max 48 chars) |
conditions[].key | string | ไม่ | Custom field key when field is field. (max 40 chars) |
conditions[].op | string | ใช่ | tag: has, not_has. list: in, not_in (a list ID). status: is, is_not (subscribed, pending, unsubscribed, bounced, complained, dormant). source: is, is_not (form, api, import). email: contains, not_contains, ends_with. name: is_set, not_set. signed_up: before, after (YYYY-MM-DD), in_last_days, not_in_last_days. opened / clicked: in_last_days, not_in_last_days, ever, never. opens / sends_without_open: gte, lte. country: is, is_not (two-letter code). Custom fields: equals, not_equals, contains, gt, lt, before, after, is_set, not_set. (one of has, not_has, in, not_in, is, is_not, contains, not_contains, ends_with, is_set, not_set, before, after, in_last_days, not_in_last_days, ever, never, gte, lte, equals, not_equals, gt, lt) |
conditions[].value | string,number | ไม่ | Required except for is_set, not_set, ever, and never. A number of days for in_last_days / not_in_last_days, a number for gte, lte, gt, lt, a date (YYYY-MM-DD) for before / after. |
{
"name": "update_segment",
"arguments": {
"segment_id": "seg_123",
"name": "Pro customers"
}
}delete_segmentDelete a segment
DESTRUCTIVE: delete a saved segment. Contacts are not affected. Fails with 409 while a sending or scheduled broadcast uses it. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
segment_id | string | ใช่ | Segment ID (starts with seg_), as returned by list_segments or create_segment. (max 128 chars) |
{
"name": "delete_segment",
"arguments": {
"segment_id": "seg_123"
}
}list_listsList contact lists
Campaigns: Contact lists with subscribed, pending, and unsubscribed counts and their hosted signup form settings.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_lists",
"arguments": {}
}create_listCreate a list
Campaigns: Create a contact list. Set form_enabled to publish a hosted double opt-in signup form (its URL is in form.url); form_from is the sender, on a verified domain, of the confirmation email, and redirect_url is an optional https page shown after confirming. welcome sends one welcome email when someone confirms. site publishes a public newsletter site at https://sendhq.cc/n/<slug> with the signup form, sent issues, and RSS.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ใช่ | List name, shown on the signup form. (max 200 chars) |
description | string | ไม่ | Short description shown on the signup form. (max 500 chars) |
form_enabled | boolean | ไม่ | Publish the hosted signup form. |
form_from | string | ไม่ | Sender of signup confirmation emails, e.g. Acme <news@example.com>, on a verified domain. (max 320 chars) |
redirect_url | string | ไม่ | https page to open after a signup is confirmed. (max 500 chars) |
welcome | object | ไม่ | Welcome email sent once, from form_from, when someone confirms a signup. Needs subject and html or markdown when enabled. |
welcome.enabled | boolean | ไม่ | Send it. |
welcome.subject | string | ไม่ | Subject; merge tags allowed. (max 300 chars) |
welcome.html | string | ไม่ | HTML body; merge tags allowed. (max 500000 chars) |
welcome.markdown | string | ไม่ | Markdown body instead of html, rendered with the workspace design. (max 200000 chars) |
site | object | ไม่ | Public newsletter site at https://sendhq.cc/n/<slug>: a signup form, every issue sent with web.enabled, and an RSS feed at /n/<slug>/feed.xml. Needs the signup form on. A reserved or taken slug fails with 409. |
site.enabled | boolean | ไม่ | Publish the site. |
site.slug | string,null | ไม่ | Address after /n/ (3-48 characters, a-z, 0-9, -). Defaults to the list name. (max 48 chars) |
site.title | string,null | ไม่ | Site title. Defaults to the list name. (max 120 chars) |
site.description | string,null | ไม่ | Short description under the title. (max 300 chars) |
site.accent | string,null | ไม่ | Accent color, e.g. #0a7d4f. |
{
"name": "create_list",
"arguments": {
"name": "Product updates"
}
}get_listGet a list
Campaigns: One list with member counts and signup form settings.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
list_id | string | ใช่ | List ID (starts with lst_), as returned by a list or create tool. (max 128 chars) |
{
"name": "get_list",
"arguments": {
"list_id": "lst_123"
}
}update_listUpdate a list
Campaigns: Rename a list, change its description, or change its hosted signup form, welcome email, or newsletter site. Omitted keys inside welcome and site keep their value.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
list_id | string | ใช่ | List ID (starts with lst_), as returned by a list or create tool. (max 128 chars) |
name | string | ไม่ | New name. (max 200 chars) |
description | string | ไม่ | New description. (max 500 chars) |
form_enabled | boolean | ไม่ | Publish or unpublish the hosted signup form. |
form_from | string | ไม่ | Sender of signup confirmation emails, on a verified domain. (max 320 chars) |
redirect_url | string | ไม่ | https page to open after a signup is confirmed. (max 500 chars) |
welcome | object | ไม่ | Welcome email sent once, from form_from, when someone confirms a signup. Needs subject and html or markdown when enabled. |
welcome.enabled | boolean | ไม่ | Send it. |
welcome.subject | string | ไม่ | Subject; merge tags allowed. (max 300 chars) |
welcome.html | string | ไม่ | HTML body; merge tags allowed. (max 500000 chars) |
welcome.markdown | string | ไม่ | Markdown body instead of html, rendered with the workspace design. (max 200000 chars) |
site | object | ไม่ | Public newsletter site at https://sendhq.cc/n/<slug>: a signup form, every issue sent with web.enabled, and an RSS feed at /n/<slug>/feed.xml. Needs the signup form on. A reserved or taken slug fails with 409. |
site.enabled | boolean | ไม่ | Publish the site. |
site.slug | string,null | ไม่ | Address after /n/ (3-48 characters, a-z, 0-9, -). Defaults to the list name. (max 48 chars) |
site.title | string,null | ไม่ | Site title. Defaults to the list name. (max 120 chars) |
site.description | string,null | ไม่ | Short description under the title. (max 300 chars) |
site.accent | string,null | ไม่ | Accent color, e.g. #0a7d4f. |
{
"name": "update_list",
"arguments": {
"list_id": "lst_123",
"form_enabled": false
}
}delete_listDelete a list
DESTRUCTIVE: delete a list and its memberships. The contacts themselves are kept. Fails with 409 while a broadcast to the list is sending. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
list_id | string | ใช่ | List ID (starts with lst_), as returned by a list or create tool. (max 128 chars) |
{
"name": "delete_list",
"arguments": {
"list_id": "lst_123"
}
}add_list_contactsAdd contacts to a list
Campaigns: Add up to 500 existing contacts to a list by ID or email. Subscribed contacts join subscribed; others join in their current state. Unknown references come back in notFound.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
list_id | string | ใช่ | List ID (starts with lst_), as returned by a list or create tool. (max 128 chars) |
contact_ids | string[] | ไม่ | Contact IDs (ct_…). (0–500 items) |
emails | string[] | ไม่ | Contact email addresses. (0–500 items) |
{
"name": "add_list_contacts",
"arguments": {
"list_id": "lst_123",
"emails": [
"ada@example.net"
]
}
}remove_list_contactRemove a contact from a list
DESTRUCTIVE: remove one contact from a list. The contact and its status are kept. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
list_id | string | ใช่ | List ID (starts with lst_), as returned by a list or create tool. (max 128 chars) |
contact_id | string | ใช่ | Contact ID (starts with ct_) or the contact's email address. (max 320 chars) |
{
"name": "remove_list_contact",
"arguments": {
"list_id": "lst_123",
"contact_id": "ct_123"
}
}list_broadcastsList broadcasts
Campaigns: Newest-first broadcasts with their status. Paginated: the result includes pagination.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
status | string | ไม่ | Only broadcasts with this status. (one of draft, sending, sent, cancelled, failed) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_broadcasts",
"arguments": {}
}create_broadcastCreate a broadcast draft
Campaigns: Create a draft broadcast to one list. Content is html and/or text, markdown, a block document in content, or a published hosted template. Raw content supports merge tags: {{first_name}}, {{name}}, {{email}}, {{fields.plan}}, with fallbacks like {{first_name | there}}. audience narrows it to a segment and/or a number of people (most engaged first with order: engaged); tracking turns open and click tracking off; web publishes it on the list's newsletter site once sent. Nothing is sent until send_broadcast or schedule_broadcast; run check_broadcast and send_broadcast_test first.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ไม่ | Internal name. Defaults to the subject. (max 200 chars) |
list_id | string | ไม่ | The list to send to (lst_…). |
from | string | ไม่ | Sender on a verified domain, e.g. Acme <news@example.com>. (max 320 chars) |
reply_to | string | ไม่ | Reply-To address. (max 320 chars) |
subject | string | ไม่ | Subject line; merge tags allowed. (max 998 chars) |
preview_text | string | ไม่ | Inbox preview text shown after the subject. (max 300 chars) |
html | string | ไม่ | HTML body; merge tags allowed and escaped. |
text | string | ไม่ | Plain-text body; merge tags allowed. |
template | object | ไม่ | A published hosted template instead of subject/html/text. Template variables are filled from the contact's name, email, and fields. |
template.id | string | ไม่ | |
template.key | string | ไม่ | |
template.version_id | string | ไม่ | |
markdown | string | ไม่ | Markdown body instead of html: converted to a block document and rendered with the workspace design (get_newsletter_settings). Merge tags allowed. Not combinable with html or content. (max 1000000 chars) |
content | object,null | ไม่ | Block document ({"type": "doc", "content": [...]}, the dashboard editor's format: paragraph, heading, bulletList, orderedList, blockquote, image, button, callout, horizontalRule, codeBlock). Rendered with the workspace design unless html is also sent. |
editor | string | ไม่ | Which editor the dashboard opens: html or blocks. Set automatically for markdown and content. (one of html, blocks) |
audience | object | ไม่ | Who gets it, within the list. Subscribed, non-dormant members only. |
audience.segment_id | string,null | ไม่ | Only list members matching this segment (seg_…), or null for the whole list. |
audience.order | string | ไม่ | With a limit: signup (default) or engaged (most engaged first). (one of signup, engaged) |
audience.limit | integer,null | ไม่ | Send to at most this many people (send_broadcast_to_more sends to more later), or null for everyone. (1–10000000) |
tracking | object | ไม่ | Open and click tracking, both on by default. Opens are estimates (bot-filtered pixel loads), never proof that someone read the email. |
tracking.opens | boolean | ไม่ | Add an open pixel. |
tracking.clicks | boolean | ไม่ | Rewrite links to signed SendHQ redirects (the unsubscribe link never is). |
web | object | ไม่ | Publish this issue on the list's newsletter site (see create_list site) once it is sent. |
web.enabled | boolean | ไม่ | Publish it. |
web.slug | string,null | ไม่ | Issue address; defaults to the subject. (max 100 chars) |
web.pinned | boolean | ไม่ | Keep it at the top of the site. |
{
"name": "create_broadcast",
"arguments": {
"list_id": "lst_123",
"from": "news@example.com",
"subject": "October update",
"markdown": "Hi {{first_name | there}}, here's what shipped.",
"audience": {
"order": "engaged",
"limit": 1000
}
}
}get_broadcastGet a broadcast
Campaigns: One broadcast with its content and, once sending, recipient totals (queued, sending, sent, held, skipped, failed). While a limit or reputation pause holds delivery, lastError explains why and nextAttemptAt says when it resumes.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "get_broadcast",
"arguments": {
"broadcast_id": "bc_123"
}
}update_broadcastEdit a draft broadcast
Campaigns: Change any field of an unscheduled draft broadcast (content, audience, tracking, web). A scheduled draft must be unscheduled first (unschedule_broadcast); sent or sending broadcasts cannot be edited.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
name | string | ไม่ | Internal name. (max 200 chars) |
list_id | string | ไม่ | The list to send to. |
from | string | ไม่ | Sender on a verified domain. (max 320 chars) |
reply_to | string | ไม่ | Reply-To address. (max 320 chars) |
subject | string | ไม่ | หัวเรื่อง (สูงสุด 998 ตัวอักษร) |
preview_text | string | ไม่ | Inbox preview text. (max 300 chars) |
html | string | ไม่ | เนื้อหา HTML |
text | string | ไม่ | เนื้อหาข้อความล้วน |
template | object,null | ไม่ | A published hosted template, or null to remove it. |
markdown | string | ไม่ | Markdown body instead of html: converted to a block document and rendered with the workspace design (get_newsletter_settings). Merge tags allowed. Not combinable with html or content. (max 1000000 chars) |
content | object,null | ไม่ | Block document ({"type": "doc", "content": [...]}, the dashboard editor's format: paragraph, heading, bulletList, orderedList, blockquote, image, button, callout, horizontalRule, codeBlock). Rendered with the workspace design unless html is also sent. |
editor | string | ไม่ | Which editor the dashboard opens: html or blocks. Set automatically for markdown and content. (one of html, blocks) |
audience | object | ไม่ | Who gets it, within the list. Subscribed, non-dormant members only. |
audience.segment_id | string,null | ไม่ | Only list members matching this segment (seg_…), or null for the whole list. |
audience.order | string | ไม่ | With a limit: signup (default) or engaged (most engaged first). (one of signup, engaged) |
audience.limit | integer,null | ไม่ | Send to at most this many people (send_broadcast_to_more sends to more later), or null for everyone. (1–10000000) |
tracking | object | ไม่ | Open and click tracking, both on by default. Opens are estimates (bot-filtered pixel loads), never proof that someone read the email. |
tracking.opens | boolean | ไม่ | Add an open pixel. |
tracking.clicks | boolean | ไม่ | Rewrite links to signed SendHQ redirects (the unsubscribe link never is). |
web | object | ไม่ | Publish this issue on the list's newsletter site (see create_list site) once it is sent. |
web.enabled | boolean | ไม่ | Publish it. |
web.slug | string,null | ไม่ | Issue address; defaults to the subject. (max 100 chars) |
web.pinned | boolean | ไม่ | Keep it at the top of the site. |
{
"name": "update_broadcast",
"arguments": {
"broadcast_id": "bc_123",
"subject": "October product update"
}
}delete_broadcastDelete a draft broadcast
DESTRUCTIVE: permanently delete a draft broadcast. Broadcasts that were sent cannot be deleted. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "delete_broadcast",
"arguments": {
"broadcast_id": "bc_123"
}
}send_broadcastSend a broadcast
SENDS REAL EMAIL to the broadcast's audience: every subscribed, non-dormant member of its list, narrowed by its segment and limit. Only call it when the user asked to send this broadcast now. Each message goes through the normal checks (verified domain, marketing plan, suppressions, unsubscribes, reputation, daily and monthly limits) and carries one-click unsubscribe from this list; members that cannot be mailed are skipped. Each contact is sent at most once. Delivery continues in the background: poll get_broadcast for totals and get_broadcast_report for engagement. A scheduled broadcast fails with 409 until unscheduled. Unpaid workspaces (integration trial) can send only to the account email. Pass idempotency_key so a retry cannot start the send twice. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
idempotency_key | string | ไม่ | เฮดเดอร์ Idempotency-Key ใช้ซ้ำเฉพาะเพื่อลองคำขอนี้ใหม่เท่านั้น (สูงสุด 200 ตัวอักษร) |
{
"name": "send_broadcast",
"arguments": {
"broadcast_id": "bc_123",
"idempotency_key": "october-update"
}
}cancel_broadcastCancel a broadcast
DESTRUCTIVE: stop a draft or sending broadcast for good. Recipients not yet sent are marked skipped; messages already handed to the provider are not recalled. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "cancel_broadcast",
"arguments": {
"broadcast_id": "bc_123"
}
}list_broadcast_recipientsList broadcast recipients
Campaigns: Per-recipient outcomes and engagement of a broadcast: queued, sending, sent, held, skipped (with the reason), or failed (with the error), the inbox provider, delivered/opened/clicked/bounced/complained/unsubscribed times, and the email ID to inspect delivery events with list_email_events. Filter by outcome, by activity (who opened, clicked, did not open, ...), or by email. Opens are bot-filtered estimates, never proof of reading. Paginated.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
status | string | ไม่ | Only recipients with this outcome. (one of queued, sending, sent, held, skipped, failed) |
activity | string | ไม่ | Only recipients who did this. (one of opened, clicked, not_opened, not_delivered, bounced, complained, unsubscribed) |
query | string | ไม่ | Recipient email contains this text. (max 200 chars) |
include | string | ไม่ | links adds the links each recipient clicked (implied by activity: clicked). (one of links) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_broadcast_recipients",
"arguments": {
"broadcast_id": "bc_123",
"status": "failed"
}
}check_broadcastRun a broadcast's pre-send checks
Campaigns: The review list shown before sending: sender verification, subject, preview text, content, audience size, size against Gmail's 102 KB clipping limit, postal address, merge tags without data or fallback, empty or shortened links, image descriptions, placeholder text, spam-prone wording, the trial's own-address rule, and whether a test was sent. ready is false while any check has level block; schedule_broadcast refuses then. Fix warn items or tell the user about them.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "check_broadcast",
"arguments": {
"broadcast_id": "bc_123"
}
}send_broadcast_testSend a broadcast test
SENDS REAL EMAIL: a copy of the draft marked [Test] to up to 5 addresses (default: the saved test recipients, or the account email), with merge tags filled from contact_id or a sample contact. Never goes to the list. Only send to addresses the user gave or owns. Limited to 100 test sends a day. Template broadcasts are tested with send_template_test. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
to | string[] | ไม่ | Test recipients (up to 5). (1–5 items) |
contact_id | string | ไม่ | Fill merge tags from this contact (ct_…). (max 320 chars) |
remember | boolean | ไม่ | Save to as the default test recipients. |
{
"name": "send_broadcast_test",
"arguments": {
"broadcast_id": "bc_123",
"to": [
"owner@example.com"
]
}
}schedule_broadcastSchedule a broadcast
SENDS REAL EMAIL at scheduled_at to the broadcast's audience, with the same checks as send_broadcast. Only call it when the user asked to send this broadcast at that time. The pre-send checks run now (422 with checks if one blocks). It starts within about a minute of the time; if it can no longer send then, it returns to a draft with the reason in lastError. A scheduled draft cannot be edited until unschedule_broadcast. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
scheduled_at | string | ใช่ | When to send: ISO 8601 date-time with a timezone, at least a minute and at most a year ahead, e.g. 2026-11-10T09:00:00Z. (max 40 chars) |
{
"name": "schedule_broadcast",
"arguments": {
"broadcast_id": "bc_123",
"scheduled_at": "2026-11-10T09:00:00Z"
}
}unschedule_broadcastUnschedule a broadcast
Campaigns: Return a scheduled broadcast to an editable draft so it does not send. Fails with 409 when it is not scheduled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "unschedule_broadcast",
"arguments": {
"broadcast_id": "bc_123"
}
}duplicate_broadcastDuplicate a broadcast
Campaigns: Copy any broadcast (draft, sent, or cancelled) into a new draft named <name> (copy) with the same list, sender, content, audience, and tracking settings. Nothing is sent.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "duplicate_broadcast",
"arguments": {
"broadcast_id": "bc_123"
}
}send_broadcast_to_moreSend a broadcast to more people
SENDS REAL EMAIL: sends a sent or sending broadcast to up to limit more people in its audience who have not received it (the rest of a limited audience, or people who joined since), in its audience order. Only call it when the user asked for this. Same checks as send_broadcast; each contact still gets it at most once. Fails with 422 when everyone already got it. Pass idempotency_key so a retry cannot add people twice. Part of Campaigns.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
limit | integer | ใช่ | How many more people at most. (1–10000000) |
idempotency_key | string | ไม่ | เฮดเดอร์ Idempotency-Key ใช้ซ้ำเฉพาะเพื่อลองคำขอนี้ใหม่เท่านั้น (สูงสุด 200 ตัวอักษร) |
{
"name": "send_broadcast_to_more",
"arguments": {
"broadcast_id": "bc_123",
"limit": 500,
"idempotency_key": "october-update-more-1"
}
}get_broadcast_reportGet a broadcast report
Campaigns: Engagement for a sending or sent broadcast: unique and total opens and clicks, bounces, complaints, and unsubscribes with rates in percent, the same per inbox provider, clicks per link, first opens and clicks by hour, and the average of the previous five broadcasts. Opens are estimates: automated requests (scanners, link previews, privacy prefetching) are counted only in machine. Never claim that a person read the email. Fails with 409 for a draft.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
broadcast_id | string | ใช่ | Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars) |
{
"name": "get_broadcast_report",
"arguments": {
"broadcast_id": "bc_123"
}
}get_newsletter_settingsGet newsletter settings
Campaigns: The postal address added to every marketing email footer, the design (accent color, font, alignment) used for Markdown and block content, list cleanup settings, and default test recipients.
ไม่มีพารามิเตอร์
{
"name": "get_newsletter_settings",
"arguments": {}
}update_newsletter_settingsUpdate newsletter settings
Campaigns: Change the postal address (required in marketing email by CAN-SPAM and CASL), design, list cleanup, or default test recipients. Omitted keys keep their value. List cleanup is on by default and sends email automatically: a subscriber who got afterSends broadcasts in a row without opening or clicking and has been quiet for quietDays gets one "still want these?" email; a week later those who did not confirm become dormant (kept, but skipped by broadcasts). Confirm with the user before turning it on or changing its email.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
postal_address | string | ไม่ | Sender's postal address for the footer. Empty string removes it. (max 300 chars) |
design | object | ไม่ | Rendering design for Markdown and block content. |
design.accentColor | string,null | ไม่ | Hex color like #0a7d4f, or null for the default. |
design.font | string | ไม่ | Font family. (one of sans, serif, mono) |
design.align | string | ไม่ | Text alignment. (one of left, center) |
cleanup | object | ไม่ | List cleanup of readers who stopped opening. |
cleanup.enabled | boolean | ไม่ | Turn list cleanup on or off. |
cleanup.afterSends | integer | ไม่ | Broadcasts in a row without an open or click (3-50). (3–50) |
cleanup.quietDays | integer | ไม่ | Days without engagement (30-730). (30–730) |
cleanup.subject | string,null | ไม่ | Subject of the cleanup email; merge tags allowed. (max 200 chars) |
cleanup.body | string,null | ไม่ | Body text of the cleanup email. (max 2000 chars) |
cleanup.from | string,null | ไม่ | Sender on a verified domain. Defaults to the last sent broadcast's sender. (max 320 chars) |
test_recipients | string[] | ไม่ | Default addresses for send_broadcast_test (up to 5). (0–5 items) |
{
"name": "update_newsletter_settings",
"arguments": {
"postal_address": "Acme Inc., 1 Main St, Springfield",
"design": {
"accentColor": "#0a7d4f"
}
}
}get_campaign_overviewGet campaign overview
Campaigns: Subscriber growth and recent results for the last days (7-365, default 30): active, dormant, and pending subscribers, joined and left, a daily series, and the six latest broadcasts with open and click rates (bot-filtered estimates) and their average.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
days | integer | ไม่ | Window in days, 7 to 365. Defaults to 30. (7–365) |
{
"name": "get_campaign_overview",
"arguments": {
"days": 30
}
}list_uploaded_imagesList uploaded images
Campaigns: The workspace's 60 most recent editor image uploads with their public URLs (https://sendhq.cc/i/<id>), to reuse in broadcast HTML, Markdown, or image blocks. Uploading needs the dashboard or the REST API (raw image body). Paginated.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_uploaded_images",
"arguments": {}
}Automations, events, and sending limits
track_eventRecord something a contact did
SENDS REAL EMAIL later, when an automation is listening: the contact enters every automation that is on and starts on this event, and that automation then emails them on its schedule, within the workspace's sending limits and hours. Only record what the person really did. In order: the contact changes in contact and the event are saved; open enrolments whose automation names the event as its goal end as converted, and ones that list it as a stop event end; then the contact enters the automations that start on it, unless already in them or reentry forbids it. A contact that is unsubscribed, bounced, or complained is recorded and can leave automations but never enters one. A new contact needs contact.consent_basis. Pass dedupe_key so a retry changes nothing and returns the first result. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
email | string | ใช่ | The contact's email address. (max 320 chars) |
event | string | ใช่ | What they did: a lowercase letter, then a-z, 0-9, and _ (e.g. checkout_started). Names starting email. are reserved. (max 64 chars) |
properties | object | ไม่ | Up to 50 values (string, number, or boolean; strings are cut at 500 characters), e.g. {"plan": "pro"}. Usable in the automation's emails as merge tags such as {{ plan }}. The names email, name, first_name, last_name, and fields are reserved. |
occurred_at | string | ไม่ | When it happened, ISO 8601 with a time zone. Defaults to now; may not be in the future. The automation's emails are timed from it. (max 40 chars) |
dedupe_key | string | ไม่ | Stable ID for this event (max 200 chars). A second call with the same key records nothing and returns the first result. (max 200 chars) |
contact | object | ไม่ | Changes to the contact, applied with the event. |
contact.name | string | ไม่ | Display name. (max 200 chars) |
contact.fields | object | ไม่ | Custom fields to merge (string, number, or boolean values), e.g. {"plan": "pro"}. A null value removes a field. |
contact.timezone | string | ไม่ | IANA time zone, e.g. Europe/Paris. Automation emails respect sending hours in this zone. (max 64 chars) |
contact.locale | string | ไม่ | Language tag, e.g. fr or pt-br. Picks the language version of each automation email. (max 35 chars) |
contact.consent_basis | string | ไม่ | How this person agreed to receive your email, e.g. Created an account on acme.com and accepted product emails. Required when the email is not a contact yet. 10-500 characters. (max 500 chars) |
{
"name": "track_event",
"arguments": {
"email": "ada@example.net",
"event": "checkout_started",
"properties": {
"plan": "pro"
},
"dedupe_key": "checkout_8f3a"
}
}list_automationsList automations
Automations: Every automation in priority order with its status (draft, on, or off), how many emails it has, and totals for the last 30 days (entered, sent, delivered, opened, clicked, converted, bounced, complained, unsubscribed, held). held counts each time an email was made to wait by the sending limits, the sending hours, or the automation's daily cap. Each automation carries domain, the domain of its from_address (null while it has no sender). domain narrows the list to the automations that send from one domain (none: those with no sender yet); domains always lists every sender domain of the workspace, in alphabetical order, with how many automations each has. Email bodies are not included; use get_automation. For other date ranges and daily numbers use get_automation_report. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
domain | string | ไม่ | Only the automations that send from this domain: the exact domain of their from_address (e.g. example.com), or none for automations with no sender yet. (max 253 chars) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_automations",
"arguments": {
"domain": "example.com"
}
}get_automationGet an automation
Automations: One automation with its emails in order and their language versions, how many people are in it now, and overlap: the other automations that are on and currently have the same people in them, with goes_first true for one that ranks above this automation (the shared people get its emails first and wait in this one). to_fill lists what must still be filled in before it can be turned on: placeholders of the template library left in its emails, and workspace names they print that are blank. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
{
"name": "get_automation",
"arguments": {
"automation_key": "checkout-recovery"
}
}create_automationCreate an automation
Automations: Create a timed sequence of emails for one kind of person, as a draft. To start from a ready-made email instead (welcome, onboarding, trial, abandoned checkout, failed payment, winback and more), use use_automation_template. Nothing is sent until set_automation_status turns it on. key is its address and cannot be changed. entry says how people enter, exit_rules when they leave, and steps are the emails, each due offset_seconds after the person entered. from_address must be on a verified domain. Fails with 409 when the key is taken. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
key | string | ใช่ | Address of the automation: 1-63 characters of a-z, 0-9, and - (e.g. checkout-recovery). (max 63 chars) |
name | string | ใช่ | Name shown in the dashboard. (max 200 chars) |
audience_label | string | ไม่ | Who this is for, in plain words, e.g. Started checkout and left. (max 200 chars) |
goal_label | string | ไม่ | What converting means, in a word or two, e.g. paid. (max 80 chars) |
entry | object | ไม่ | How people enter. {type: "event", event} starts on an event recorded with track_event; {type: "manual"} only through enroll_contact. bucket (with segment_id) and date_field (with field) are stored, but nobody enters through them automatically yet. reentry: never (default) or after_end. |
entry.type | string | ใช่ | Entry type. (one of event, bucket, date_field, manual) |
entry.event | string | ไม่ | Event name for an event entry, e.g. checkout_started. |
entry.segment_id | string | ไม่ | Segment ID (seg_…) for a bucket entry. (max 128 chars) |
entry.field | string | ไม่ | Contact field key for a date_field entry. (max 40 chars) |
entry.reentry | string | ไม่ | Whether someone who finished may enter again. (one of never, after_end) |
exit_rules | object | ไม่ | When people leave. goal_event ends the enrolment as converted and credits the latest email sent within attribution_days before it. Each of stop_events ends it without a conversion. An automation with no goal must say so with no_goal: true. Sent whole: it replaces the current rules. |
exit_rules.goal_event | string,null | ไม่ | Event that counts as converting, e.g. payment_completed. |
exit_rules.no_goal | boolean | ไม่ | True when this automation deliberately has no goal. |
exit_rules.stop_events | string[] | ไม่ | Events that take a person out, e.g. ["account_closed"]. (0–20 items) |
exit_rules.attribution_days | integer | ไม่ | Days before the goal within which an email earns the conversion. Default 14. (1–90) |
settings | object | ไม่ | Per-automation settings. Omitted keys keep their value. |
settings.exempt_from_hold | boolean | ไม่ | Skip the workspace's per-person limits (max_emails and min_gap_hours) for this automation. The sending hours still apply, and its emails still count toward the limits of other automations. |
settings.daily_send_cap | integer,null | ไม่ | At most this many emails a day from this automation, counted by the day of the workspace's default_timezone; emails over it wait until the next day. null for no cap. (1–…) |
settings.daily_entry_cap | integer,null | ไม่ | Stored for bucket entries, which are not started automatically yet. It does not limit people entering by event or through enroll_contact. null for no cap. (1–…) |
settings.holdout_pct | number | ไม่ | Percent of people who enter but are sent nothing, to measure what the emails change (0-100). (0–100) |
settings.stale_days | integer | ไม่ | An email more than this many days overdue is skipped instead of sent late. Default 4. (1–365) |
settings.resume_after_days | integer | ไม่ | How long a waiting enrolment waits after the automation ahead of it ends. Default 3. (0–365) |
position | integer | ไม่ | Priority. While one person is in several automations that are on, only the one with the lowest position emails them; the others wait and resume resume_after_days after it ends. (0–100000) |
from_name | string | ไม่ | Sender display name, e.g. Acme. (max 120 chars) |
from_address | string | ไม่ | Sender address on a verified workspace domain (see list_sending_identities). (max 320 chars) |
reply_to | string | ไม่ | Reply-To address. (max 320 chars) |
steps | object[] | ไม่ | The emails, in order. position defaults to the place in this list. (0–50 items) |
steps[].position | integer | ไม่ | Position of the email in the automation, 1 to 50. (1–50) |
steps[].subject | string | ไม่ | Subject line. Merge tags such as {{ first_name | there }} are filled per contact. (max 998 chars) |
steps[].preheader | string | ไม่ | Inbox preview line. (max 300 chars) |
steps[].content | object | ไม่ | Block document ({type: "doc", content: [...]}), as the dashboard editor stores it. Sent without html, it is rendered with the workspace design. On an email built in the dashboard's drag-and-drop builder (editor design) it is the builder's project instead: opaque, never write one by hand, and send it back only unchanged together with its html. |
steps[].html | string | ไม่ | HTML body. The unsubscribe footer is added automatically. |
steps[].text | string | ไม่ | เนื้อหาข้อความล้วน |
steps[].editor | string | ไม่ | How the email is made: blocks (the dashboard's writing editor, the default), html (your own HTML) or design (the dashboard's drag-and-drop builder). Only the builder makes a design; to send a designed email yourself, send html with editor html. (one of blocks, html, design) |
steps[].offset_seconds | integer | ไม่ | When the email is due, in seconds after the moment the person entered (3600 = one hour, 86400 = one day). May be negative for emails that lead up to a date. When several emails are due at once, only the latest is sent and the earlier ones are skipped. (-31622400–31622400) |
steps[].skip_if_empty | string[] | ไม่ | Merge keys, e.g. ["fields.plan"]. The email is skipped for a contact where any of them is blank, 0, or false. (0–20 items) |
steps[].ignore_send_window | boolean | ไม่ | Send as soon as it is due, outside the workspace's sending hours too. The per-person limits still apply. |
{
"name": "create_automation",
"arguments": {
"key": "checkout-recovery",
"name": "Checkout recovery",
"audience_label": "Started checkout and left",
"goal_label": "paid",
"from_name": "Acme",
"from_address": "hello@example.com",
"entry": {
"type": "event",
"event": "checkout_started"
},
"exit_rules": {
"goal_event": "payment_completed"
},
"steps": [
{
"offset_seconds": 3600,
"subject": "Still thinking it over, {{ first_name | there }}?",
"html": "<p>Your cart is waiting.</p>"
}
]
}
}update_automationEdit an automation
Automations: Change an automation's name, labels, entry, exit rules, sender, or priority. settings are merged; entry and exit_rules replace the current ones. The key and the status cannot be changed here (use set_automation_status), and emails are changed with set_automation_step. If the automation is on, the change applies to people in it now, and an edit that would leave it unable to send is refused with 422 automation_not_ready. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
name | string | ไม่ | Name shown in the dashboard. (max 200 chars) |
audience_label | string | ไม่ | Who this is for, in plain words, e.g. Started checkout and left. (max 200 chars) |
goal_label | string | ไม่ | What converting means, in a word or two, e.g. paid. (max 80 chars) |
entry | object | ไม่ | How people enter. {type: "event", event} starts on an event recorded with track_event; {type: "manual"} only through enroll_contact. bucket (with segment_id) and date_field (with field) are stored, but nobody enters through them automatically yet. reentry: never (default) or after_end. |
entry.type | string | ใช่ | Entry type. (one of event, bucket, date_field, manual) |
entry.event | string | ไม่ | Event name for an event entry, e.g. checkout_started. |
entry.segment_id | string | ไม่ | Segment ID (seg_…) for a bucket entry. (max 128 chars) |
entry.field | string | ไม่ | Contact field key for a date_field entry. (max 40 chars) |
entry.reentry | string | ไม่ | Whether someone who finished may enter again. (one of never, after_end) |
exit_rules | object | ไม่ | When people leave. goal_event ends the enrolment as converted and credits the latest email sent within attribution_days before it. Each of stop_events ends it without a conversion. An automation with no goal must say so with no_goal: true. Sent whole: it replaces the current rules. |
exit_rules.goal_event | string,null | ไม่ | Event that counts as converting, e.g. payment_completed. |
exit_rules.no_goal | boolean | ไม่ | True when this automation deliberately has no goal. |
exit_rules.stop_events | string[] | ไม่ | Events that take a person out, e.g. ["account_closed"]. (0–20 items) |
exit_rules.attribution_days | integer | ไม่ | Days before the goal within which an email earns the conversion. Default 14. (1–90) |
settings | object | ไม่ | Per-automation settings. Omitted keys keep their value. |
settings.exempt_from_hold | boolean | ไม่ | Skip the workspace's per-person limits (max_emails and min_gap_hours) for this automation. The sending hours still apply, and its emails still count toward the limits of other automations. |
settings.daily_send_cap | integer,null | ไม่ | At most this many emails a day from this automation, counted by the day of the workspace's default_timezone; emails over it wait until the next day. null for no cap. (1–…) |
settings.daily_entry_cap | integer,null | ไม่ | Stored for bucket entries, which are not started automatically yet. It does not limit people entering by event or through enroll_contact. null for no cap. (1–…) |
settings.holdout_pct | number | ไม่ | Percent of people who enter but are sent nothing, to measure what the emails change (0-100). (0–100) |
settings.stale_days | integer | ไม่ | An email more than this many days overdue is skipped instead of sent late. Default 4. (1–365) |
settings.resume_after_days | integer | ไม่ | How long a waiting enrolment waits after the automation ahead of it ends. Default 3. (0–365) |
position | integer | ไม่ | Priority. While one person is in several automations that are on, only the one with the lowest position emails them; the others wait and resume resume_after_days after it ends. (0–100000) |
from_name | string | ไม่ | Sender display name, e.g. Acme. (max 120 chars) |
from_address | string | ไม่ | Sender address on a verified workspace domain (see list_sending_identities). (max 320 chars) |
reply_to | string | ไม่ | Reply-To address. (max 320 chars) |
{
"name": "update_automation",
"arguments": {
"automation_key": "checkout-recovery",
"name": "Checkout recovery",
"settings": {
"holdout_pct": 10
}
}
}delete_automationDelete an automation
DESTRUCTIVE: permanently delete an automation with its emails, language versions, enrolments, send records, and statistics. Only a draft or switched-off automation that nobody is currently in can be deleted; otherwise it fails with 409. Confirm with the user first. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
{
"name": "delete_automation",
"arguments": {
"automation_key": "checkout-recovery"
}
}set_automation_stepCreate or change an email of an automation
Automations: Create the email at position, or change the fields you pass on the one that is there; fields left out keep their value. If the automation is on, people who have not received this email yet get the new version, so confirm the wording with the user. An existing email keeps its ID: people who already received it are not sent it again. With template, the email becomes that template of the library (see list_automation_templates): its subject, preview text and content replace the email's and its language versions are removed. While the automation is on, an email must keep a subject and content, and may not hold a placeholder of the template library such as [First step] or print a workspace name that is blank (422 automation_not_ready with problems). Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
position | integer | ใช่ | Position of the email in the automation, 1 to 50. (1–50) |
template | string | ไม่ | Id of a template of the library, e.g. welcome-note (not a set). The email becomes that template; other fields passed here are applied on top. The email's wait is not the template's: pass offset_seconds. (max 63 chars) |
subject | string | ไม่ | Subject line. Merge tags such as {{ first_name | there }} are filled per contact. (max 998 chars) |
preheader | string | ไม่ | Inbox preview line. (max 300 chars) |
content | object | ไม่ | Block document ({type: "doc", content: [...]}), as the dashboard editor stores it. Sent without html, it is rendered with the workspace design. On an email built in the dashboard's drag-and-drop builder (editor design) it is the builder's project instead: opaque, never write one by hand, and send it back only unchanged together with its html. |
html | string | ไม่ | HTML body. The unsubscribe footer is added automatically. |
text | string | ไม่ | เนื้อหาข้อความล้วน |
editor | string | ไม่ | How the email is made: blocks (the dashboard's writing editor, the default), html (your own HTML) or design (the dashboard's drag-and-drop builder). Only the builder makes a design; to send a designed email yourself, send html with editor html. (one of blocks, html, design) |
offset_seconds | integer | ไม่ | When the email is due, in seconds after the moment the person entered (3600 = one hour, 86400 = one day). May be negative for emails that lead up to a date. When several emails are due at once, only the latest is sent and the earlier ones are skipped. (-31622400–31622400) |
skip_if_empty | string[] | ไม่ | Merge keys, e.g. ["fields.plan"]. The email is skipped for a contact where any of them is blank, 0, or false. (0–20 items) |
ignore_send_window | boolean | ไม่ | Send as soon as it is due, outside the workspace's sending hours too. The per-person limits still apply. |
{
"name": "set_automation_step",
"arguments": {
"automation_key": "checkout-recovery",
"position": 2,
"offset_seconds": 86400,
"subject": "Your cart is still here",
"html": "<p>Pick up where you left off.</p>"
}
}delete_automation_stepRemove an email from an automation
DESTRUCTIVE: remove the email at position from an automation. It is no longer sent or listed; records of who already received it are kept. While the automation is on, its only email cannot be removed (409). Confirm with the user first. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
position | integer | ใช่ | Position of the email in the automation, 1 to 50. (1–50) |
{
"name": "delete_automation_step",
"arguments": {
"automation_key": "checkout-recovery",
"position": 3
}
}set_automation_step_variantCreate or change a language version of an email
Automations: Save the version of one email for contacts whose locale is this language tag (e.g. fr); a contact with a regional locale such as pt-br gets the pt version when there is no pt-br one. Fields left out keep their value. A version without a body uses the email's own body, and a blank subject or preheader falls back to the email's. Contacts without a matching version get the email as written. If the automation is on, matching contacts who have not received this email yet get this version. While the automation is on, a version may not hold a placeholder of the template library or print a workspace name that is blank (422 automation_not_ready). Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
position | integer | ใช่ | Position of the email in the automation, 1 to 50. (1–50) |
locale | string | ใช่ | Language tag of the version, e.g. fr or pt-br. (max 35 chars) |
subject | string | ไม่ | Subject line. Merge tags such as {{ first_name | there }} are filled per contact. (max 998 chars) |
preheader | string | ไม่ | Inbox preview line. (max 300 chars) |
content | object | ไม่ | Block document ({type: "doc", content: [...]}), as the dashboard editor stores it. Sent without html, it is rendered with the workspace design. On an email built in the dashboard's drag-and-drop builder (editor design) it is the builder's project instead: opaque, never write one by hand, and send it back only unchanged together with its html. |
html | string | ไม่ | HTML body. The unsubscribe footer is added automatically. |
text | string | ไม่ | เนื้อหาข้อความล้วน |
{
"name": "set_automation_step_variant",
"arguments": {
"automation_key": "checkout-recovery",
"position": 1,
"locale": "fr",
"subject": "Vous hésitez encore ?",
"html": "<p>Votre panier vous attend.</p>"
}
}set_automation_statusTurn an automation on or off
SENDS REAL EMAIL when status is on: from then on, everyone who enters the automation is emailed on its schedule, within the workspace's sending limits and hours (get_sending_limits), and people already in it continue. Use preview_automation to see who would get which email. Only turn it on when the user asked for this automation to start. Turning on checks an entry, a goal or exit_rules.no_goal, at least one email with a subject and content, no placeholder of the template library such as [First step] or [Link to plans] left in any email (subject, preview text, body, or a link's address), and no blank workspace name that an email prints (422 automation_not_ready with problems, which names each email and detail; get_automation lists the same under to_fill), a sender on a verified domain (403), and an active subscription (402). off stops new entries and sending; people in it stay and continue if it is turned on again, except that an email more than stale_days overdue by then is skipped. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
status | string | ใช่ | on to start sending, off to stop. (one of on, off) |
{
"name": "set_automation_status",
"arguments": {
"automation_key": "checkout-recovery",
"status": "off"
}
}send_automation_test_emailSend one automation email to yourself as a test
SENDS REAL EMAIL: one email of an automation, marked [Test], to the account's own address (get_account -> user.email) and nowhere else; a recipient cannot be given. It is the email as the automation would send it (the language version for locale, the same sender, unsubscribe footer and checks), with stand-in values for its merge tags; sample replaces any of them. A test is not part of the automation: nobody is enrolled, it is in no report, it counts toward nobody's per-person sending limits, it is not tracked, and the automation does not have to be on. It counts toward the workspace's own sending allowance. With dry_run: true nothing is sent and the result is the email as the test would deliver it, with locales and the sample values used. Fails with 422 automation_not_ready when the automation has no sender or the email has no subject or content, and 429 test_limit_reached after 100 test emails in 24 hours. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
position | integer | ใช่ | Position of the email in the automation, 1 to 50. (1–50) |
locale | string | ไม่ | Send the language version a contact with this language would get (such as fr or pt-br). Omit for the email as written. (max 35 chars) |
sample | object | ไม่ | Values to print for merge tags, by key, in place of the stand-ins (first_name is Alex, and so on). email, product_name, and sender_name cannot be set. |
dry_run | boolean | ไม่ | Send nothing; return the email as the test would deliver it. |
{
"name": "send_automation_test_email",
"arguments": {
"automation_key": "checkout-recovery",
"position": 1
}
}send_automation_testSend every email of an automation to yourself as tests
SENDS REAL EMAIL: every email of an automation, in order, marked [Test 1 of 3], [Test 2 of 3] and so on, to the account's own address (get_account -> user.email) and nowhere else, without waiting for the emails' delays. Rendering, footer, checks and stand-in values are as in send_automation_test_email. A test is not part of the automation: nobody is enrolled, it is in no report, it counts toward nobody's per-person sending limits, it is not tracked, and the automation does not have to be on. It counts toward the workspace's own sending allowance. Nothing is sent unless everything can be: a sender, a subject and content on every email (422 automation_not_ready with problems), and room for all of them under 100 test emails in 24 hours (429 test_limit_reached). If a send is refused after others went out, the rest are not tried and each email's outcome is returned. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
locale | string | ไม่ | Send the language version a contact with this language would get (such as fr or pt-br). Omit for the email as written. (max 35 chars) |
sample | object | ไม่ | Values to print for merge tags, by key, in place of the stand-ins (first_name is Alex, and so on). email, product_name, and sender_name cannot be set. |
{
"name": "send_automation_test",
"arguments": {
"automation_key": "checkout-recovery"
}
}enroll_contactAdd a contact to an automation
SENDS REAL EMAIL on the automation's schedule: starts the automation for one existing, subscribed contact, counting from anchor_at (now by default). Only call it when the user asked for this person to get this sequence. The automation must be on (409 automation_not_on). Fails with 404 when the email is not a contact (add it with upsert_contact), 422 when the contact cannot be mailed, and 409 when the contact is already in it or went through it before and re-entry is not allowed. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
email | string | ใช่ | Email address of an existing contact. (max 320 chars) |
properties | object | ไม่ | Up to 50 values (string, number, or boolean; strings are cut at 500 characters), e.g. {"plan": "pro"}. Usable in the automation's emails as merge tags such as {{ plan }}. The names email, name, first_name, last_name, and fields are reserved. |
anchor_at | string | ไม่ | The moment the emails' offsets count from, ISO 8601 with a time zone. Defaults to now; may lie ahead for emails that lead up to a date. (max 40 chars) |
{
"name": "enroll_contact",
"arguments": {
"automation_key": "checkout-recovery",
"email": "ada@example.net",
"properties": {
"plan": "pro"
}
}
}exit_contactTake a contact out of an automation
Automations: End a contact's open enrolment in one automation, so no further emails of it are sent to them. Other automations and broadcasts are not affected, and the contact stays subscribed. Fails with 404 when the contact is not in it. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
email | string | ใช่ | Email address of the contact. (max 320 chars) |
reason | string | ไม่ | Why, for the record (max 200 chars). Defaults to manual. (max 200 chars) |
{
"name": "exit_contact",
"arguments": {
"automation_key": "checkout-recovery",
"email": "ada@example.net",
"reason": "Asked support to stop"
}
}preview_automationPreview what an automation would send now
Automations: A dry run. For the people in the automation now, in the order they come due, what would happen if each were evaluated at this moment. outcome is send (the email in step would go out), scheduled (nothing is due before until), held (the email waits until until; reason is limit_cap, limit_gap, window, or daily_cap), waiting (behind the higher-priority automation in behind), skip (reason is stale, empty_field, or holdout), exit (the contact can no longer be mailed and would leave), complete, blocked (automation_off or subscription_required), or in_progress. Read-only: nothing is sent or changed. Use it before set_automation_status, or after changing limits, to see who gets which email. It applies the automation's own rules and does not foresee a refusal only a real send meets, such as the workspace's daily sending limit or a paused sender. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "preview_automation",
"arguments": {
"automation_key": "checkout-recovery"
}
}get_automations_overviewGet results across all automations
Automations: What every automation of the workspace did in a date range (the last 30 days by default, at most 366 days): totals and one entry per day for people who entered, emails sent, delivered, opened, clicked, and converted (a goal event credited to an email), plus bounces, complaints, unsubscribes, and held (emails made to wait by a limit). Days on which nothing happened are in the series with zeros. domain narrows it to the automations that send from one domain (none: those with no sender yet). Opens and clicks are estimates: each email counts once, at its first open or click by a person, and automated requests (scanners, link previews, privacy prefetching) are never counted. Never claim that a person read an email. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
from | string | ไม่ | First day of the report as a UTC date (YYYY-MM-DD), inclusive. |
to | string | ไม่ | Last day of the report as a UTC date (YYYY-MM-DD), inclusive. |
domain | string | ไม่ | Only the automations that send from this domain: the exact domain of their from_address (e.g. example.com), or none for automations with no sender yet. (max 253 chars) |
{
"name": "get_automations_overview",
"arguments": {
"from": "2026-10-20",
"to": "2026-11-18"
}
}get_automation_reportGet the results of one automation
Automations: The results of one automation in a date range (the last 30 days by default, at most 366 days): the same totals and daily series as get_automations_overview, and steps, one row per email with what it sent and what came of it. An email that was removed is listed with archived: true while it still has numbers in the range. Opens and clicks are estimates: each email counts once, at its first open or click by a person, and automated requests (scanners, link previews, privacy prefetching) are never counted. Never claim that a person read an email. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
from | string | ไม่ | First day of the report as a UTC date (YYYY-MM-DD), inclusive. |
to | string | ไม่ | Last day of the report as a UTC date (YYYY-MM-DD), inclusive. |
{
"name": "get_automation_report",
"arguments": {
"automation_key": "checkout-recovery"
}
}list_automation_peopleList the people in an automation
Automations: One row per person who did did in an automation, most recent first: entered (the default: everyone who was ever in it), sent, delivered, opened, clicked, converted (their goal was credited to an email), bounced, unsubscribed, or waiting (waiting now behind a higher-priority automation). step narrows every filter except entered and waiting to one email. Each row has the contact's email and name, when they did it, their enrolment's status, and latest: the most recent thing that happened to them in the automation. counts says how many people each filter would list. Read one person's full history with get_automation_person. Opens and clicks are estimates: each email counts once, at its first open or click by a person, and automated requests (scanners, link previews, privacy prefetching) are never counted. Never claim that a person read an email. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
did | string | ไม่ | What the people did. Defaults to entered. (one of entered, sent, delivered, opened, clicked, converted, bounced, unsubscribed, waiting) |
step | integer | ไม่ | Only this email of the automation, by its position. (1–50) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_automation_people",
"arguments": {
"automation_key": "checkout-recovery",
"did": "clicked"
}
}get_automation_personGet one person's history in an automation
Automations: Everything that happened to one contact in an automation: each enrolment and how it ended, each email with when it was sent, delivered, first opened, first clicked, bounced, complained about, or unsubscribed from, every open and click on it (machine: true marks an automated request, which is not counted), and the conversion with the email it was credited to. Fails with 404 for a contact that was never in the automation. Opens and clicks are estimates: each email counts once, at its first open or click by a person, and automated requests (scanners, link previews, privacy prefetching) are never counted. Never claim that a person read an email. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
automation_key | string | ใช่ | Automation key, as returned by list_automations (e.g. checkout-recovery). (max 63 chars) |
contact_id | string | ใช่ | Contact ID (starts with ct_) or the contact's email address. (max 320 chars) |
{
"name": "get_automation_person",
"arguments": {
"automation_key": "checkout-recovery",
"contact_id": "ct_123"
}
}get_sending_limitsGet automation sending limits
Automations: How much automation email one person may get across every automation, and when: at most max_emails in any period_days, at least min_gap_hours apart, only between window_start and window_end (hours in the contact's time zone, or default_timezone) on weekdays (0 = Sunday to 6 = Saturday). An email that would break a limit is not dropped: it waits until the limits allow it. Also product_name and sender_name, available to every automation email as merge tags. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
ไม่มีพารามิเตอร์
{
"name": "get_sending_limits",
"arguments": {}
}update_sending_limitsUpdate automation sending limits
Automations: Change the workspace's per-person limits and sending hours for automation email. Omitted keys keep their value. Looser limits mean people can get more email, sooner: confirm with the user before raising max_emails, shortening min_gap_hours, or widening the hours. product_name and sender_name are the names the emails of the template library print; one that an automation that is on prints cannot be cleared (409 workspace_name_in_use). Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
max_emails | integer | ไม่ | Most automation emails one person may get in period_days. Default 2. (1–50) |
period_days | integer | ไม่ | The period max_emails applies to, in days. Default 7. (1–90) |
min_gap_hours | integer | ไม่ | Least time between two automation emails to one person, in hours. Default 44. (0–720) |
window_start | integer | ไม่ | First hour of the day emails may go out, local time (0-23). Default 9. (0–23) |
window_end | integer | ไม่ | Hour sending stops, local time (1-24); must be later than window_start. Default 18. (1–24) |
weekdays | integer[] | ไม่ | Days emails may go out: 0 = Sunday to 6 = Saturday. Default [1, 2, 3, 4, 5]. (1–7 items) |
default_timezone | string | ไม่ | IANA time zone used for contacts that have none, e.g. Europe/London. (max 64 chars) |
product_name | string | ไม่ | Your product's name, for {{ product_name }}. (max 120 chars) |
sender_name | string | ไม่ | Who the emails are from, for {{ sender_name }}. (max 120 chars) |
{
"name": "update_sending_limits",
"arguments": {
"max_emails": 3,
"min_gap_hours": 24,
"default_timezone": "Europe/London"
}
}list_automation_templatesList automation templates
Automations: The template library: ready-made lifecycle emails to start an automation from instead of writing one. It covers welcome, onboarding tips, a nudge to finish setup (activation), trial ending and trial ended, abandoned checkout, failed payment (dunning), receipt, upgrade at a usage limit, feature announcement, review request, feedback score (NPS), cancellation survey, and winback for retention. Each template has a name, a one-line purpose, the goal it serves (group), its subject, the merge tags it prints, and start: the suggested entry event, the email's wait, and the goal event that ends the automation for a person. sets are templates that arrive together as one automation: three onboarding tips, trial ending then trial ended, and payment failed then a last notice. fill_in lists what only the user knows: placeholders in square brackets such as [First step] or [Link to plans], and the workspace names the email prints. Email bodies are not included; use get_automation_template. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_automation_templates",
"arguments": {}
}get_automation_templateGet an automation template
Automations: One template or one set of the template library, as the draft automation it would make: the suggested start and goal, what the user must fill in, and every email in order with its wait, subject, the email as a block document (content), and preview: the subject and text as this workspace would send them, with sample values for the merge tags. Read it to show the user a welcome, onboarding, trial, abandoned checkout, failed payment (dunning), upgrade, cancellation or winback email before using it. Placeholders such as [First step] are shown as written; a workspace name that is not set reads "Your product" or "Your name" in the preview. Then use_automation_template makes the draft, or set_automation_step with template loads one email into an existing automation. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | Id of a template or a set, as returned by list_automation_templates (e.g. welcome-note, checkout-not-finished, payment-failed-notices). (max 63 chars) |
{
"name": "get_automation_template",
"arguments": {
"template_id": "welcome-note"
}
}use_automation_templateCreate an automation from a template
Automations: Create a draft automation from a template or a set of the library, ready-made: a welcome email, three onboarding tips, a nudge to finish setup, trial ending and trial ended, abandoned checkout, failed payment (dunning) notices, a receipt, an upgrade email at a usage limit, a feature announcement, a review request, a feedback score, a cancellation survey, or a winback for retention. The draft has the emails, the suggested entry event and the suggested goal. Nothing is sent: it stays a draft until set_automation_status turns it on, and that is refused while anything in to_fill is left. to_fill lists each placeholder to replace, by email (ask the user for the real words and links, then use set_automation_step), and each workspace name the emails print that is blank (product_name, sender_name: set with update_sending_limits). Make sure the entry event is one the workspace records (list_event_names); change the start with update_automation. from_address must be on a verified domain. Fails with 404 for an unknown template and 409 when key is taken. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
template_id | string | ใช่ | Id of a template or a set, as returned by list_automation_templates (e.g. welcome-note, checkout-not-finished, payment-failed-notices). (max 63 chars) |
key | string | ไม่ | Address of the new automation: 1-63 characters of a-z, 0-9, and -. Defaults to the template's id, with a number added when that is taken. (max 63 chars) |
name | string | ไม่ | Name shown in the dashboard. Defaults to the template's own name. (max 200 chars) |
from_name | string | ไม่ | Sender display name, e.g. Acme. (max 120 chars) |
from_address | string | ไม่ | Sender address on a verified workspace domain (see list_sending_identities). (max 320 chars) |
reply_to | string | ไม่ | Reply-To address. (max 320 chars) |
{
"name": "use_automation_template",
"arguments": {
"template_id": "welcome-note",
"name": "Welcome",
"from_name": "Dana from Acme",
"from_address": "dana@example.com"
}
}list_eventsList what contacts did
Automations: The events recorded for the workspace, newest first: who (the contact's id, email, and name), what they did (the event name, and the same as words), when, its properties, where it came from (source.type: api for the workspace's own code, connection with the connection's name, upload for a spreadsheet, system for SendHQ itself), and effects: the automations it started, ended, or converted for that contact. Filter by contact (a contact ID or an email address), name (one event name), and from / to. With contact, the result also lists every automation that contact is or was in (enrollments). An event being recorded does not mean an email was sent: check the automation with list_automation_people. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
contact | string | ไม่ | Only this contact: a contact ID or an email address. (max 320 chars) |
name | string | ไม่ | Only this event, e.g. checkout_started. See list_event_names. (max 64 chars) |
from | string | ไม่ | Events from this UTC date (YYYY-MM-DD) or ISO 8601 date-time on. (max 40 chars) |
to | string | ไม่ | Events up to this UTC date (the whole day) or ISO 8601 date-time. (max 40 chars) |
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_events",
"arguments": {
"name": "checkout_started",
"from": "2026-11-01"
}
}list_event_namesList the kinds of event recorded
Automations: Every distinct event name recorded in the last 30 days with how many times, the most frequent first, each with the name as words (checkout_started reads checkout started). Use it to see what the workspace is being told about before creating an automation that starts on an event. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_event_names",
"arguments": {}
}list_connectionsList connections
Automations: The workspace's connections. A connection is a secret address another system posts to, such as a payment provider's webhook; what arrives is recorded as events, exactly as track_event records them. Each has its kind (stripe, dodo, or generic), whether it is enabled, whether a signing secret is set, the last four characters of its address, and last_delivery in plain words such as "Recorded 2 events" or "Refused: bad signature". The address and the signing secret are never returned here. Paginated. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_connections",
"arguments": {}
}get_connectionGet a connection and its last deliveries
Automations: One connection with its last 50 deliveries, newest first: when each arrived, whether it was recorded, skipped, or refused and why (text says it in plain words), the sender's own event type, the names of the events recorded, and the contact's email address. Payloads are not stored. Use it to find out why something a provider sent did not show up. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
connection_id | string | ใช่ | Connection ID, as returned by list_connections (e.g. acn_…). (max 128 chars) |
{
"name": "get_connection",
"arguments": {
"connection_id": "acn_123"
}
}create_connectionCreate a connection
SENDS REAL EMAIL later, when an automation is listening: from the moment the address this returns is given to another system, everything that system posts is recorded as events without anyone looking, and a recorded event starts every automation that is on and starts on it. Only create one when the user asked to connect that system. Returns address once; it cannot be read again, so hand it to the user at once. kind is stripe or dodo (mapped for you: checkout_completed, checkout_abandoned, paid, payment_failed, subscription_started, subscription_renewed, subscription_cancelled, plan_changed) or generic with a mapping. consent_basis is recorded on every contact the connection creates. The provider's signing secret is set by a person in the dashboard or with the REST API, not here. A workspace may have 10 connections (409 connection_limit_reached). Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
name | string | ใช่ | What to call it, e.g. Stripe. (max 80 chars) |
kind | string | ใช่ | stripe, dodo, or generic. (one of generic, stripe, dodo) |
consent_basis | string | ใช่ | How the people this connection tells you about agreed to receive your email, e.g. Bought a plan on acme.com and accepted product emails. Recorded on every contact it creates. 10-500 characters. (max 500 chars) |
event_prefix | string | ไม่ | Put in front of every event name, e.g. stripe_. (max 32 chars) |
enabled | boolean | ไม่ | Defaults to true. Pass false to create it switched off. |
mapping | object | ไม่ | For a generic connection: dotted paths into the payload it posts, such as customer.email. email is required, and either event or event_name. |
mapping.email | string | ไม่ | Where the contact's email address is. (max 120 chars) |
mapping.event | string | ไม่ | Where the payload names what happened. Order Placed becomes the event order_placed. (max 120 chars) |
mapping.event_name | string | ไม่ | One fixed event name, instead of event. (max 64 chars) |
mapping.time | string | ไม่ | Where the time it happened is (ISO 8601, or Unix seconds or milliseconds). Defaults to the time of arrival. (max 120 chars) |
mapping.id | string | ไม่ | Where a unique ID of the message is, so a retried delivery is recorded once. (max 120 chars) |
mapping.keep | string[] | ไม่ | The fields to keep as event properties. Defaults to the top-level text, number, and boolean fields. (0–50 items) |
{
"name": "create_connection",
"arguments": {
"name": "Stripe",
"kind": "stripe",
"consent_basis": "Bought a plan on acme.com and accepted product emails"
}
}update_connectionChange a connection or switch it on or off
SENDS REAL EMAIL later when enabled is set to true: what the connected system posts is recorded as events again, and a recorded event starts every automation that is on and starts on it. Only switch one on when the user asked. Also changes name, consent_basis, event_prefix, or a generic connection's mapping. While enabled is false the address answers 404 and records nothing. The kind cannot be changed. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
connection_id | string | ใช่ | Connection ID, as returned by list_connections (e.g. acn_…). (max 128 chars) |
name | string | ไม่ | A new name. (max 80 chars) |
enabled | boolean | ไม่ | true: record what arrives. false: answer 404 and record nothing. |
consent_basis | string | ไม่ | How the people this connection tells you about agreed to receive your email, e.g. Bought a plan on acme.com and accepted product emails. Recorded on every contact it creates. 10-500 characters. (max 500 chars) |
event_prefix | string | ไม่ | Put in front of every event name, e.g. stripe_. (max 32 chars) |
mapping | object | ไม่ | For a generic connection: dotted paths into the payload it posts, such as customer.email. email is required, and either event or event_name. |
mapping.email | string | ไม่ | Where the contact's email address is. (max 120 chars) |
mapping.event | string | ไม่ | Where the payload names what happened. Order Placed becomes the event order_placed. (max 120 chars) |
mapping.event_name | string | ไม่ | One fixed event name, instead of event. (max 64 chars) |
mapping.time | string | ไม่ | Where the time it happened is (ISO 8601, or Unix seconds or milliseconds). Defaults to the time of arrival. (max 120 chars) |
mapping.id | string | ไม่ | Where a unique ID of the message is, so a retried delivery is recorded once. (max 120 chars) |
mapping.keep | string[] | ไม่ | The fields to keep as event properties. Defaults to the top-level text, number, and boolean fields. (0–50 items) |
{
"name": "update_connection",
"arguments": {
"connection_id": "acn_123",
"enabled": false
}
}delete_connectionDelete a connection
DESTRUCTIVE: permanently delete a connection with its delivery records. Its address stops working at once, so the system that posts to it starts getting 404 and nothing more is recorded from it. The events it already recorded stay. Confirm with the user first; to pause one instead, use update_connection with enabled: false. Automations are enabled workspace by workspace: a workspace that is not enabled gets 403 automations_not_enabled.
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
connection_id | string | ใช่ | Connection ID, as returned by list_connections (e.g. acn_…). (max 128 chars) |
{
"name": "delete_connection",
"arguments": {
"connection_id": "acn_123"
}
}บัญชี การใช้งาน การวิเคราะห์ และคีย์
get_accountดึงบัญชี การใช้งาน และการเรียกเก็บเงิน
อีเมลเจ้าของบัญชี แพ็กเกจ/ระดับการเข้าถึง การส่งถึงผู้รับในรอบปัจจุบันที่ใช้ไปเทียบกับโควตา โดเมนที่ใช้เทียบกับขีดจำกัด การถ่ายโอนไฟล์แนบ สรุปชื่อเสียง สถานะการสมัคร แพ็กเกจที่เผยแพร่ และจำนวนของเวิร์กสเปซ ใช้ตรวจสอบโควตาที่เหลือหรือผู้ที่ช่วงทดลองส่งถึงได้ (อีเมลของบัญชี)
ไม่มีพารามิเตอร์
{
"name": "get_account",
"arguments": {}
}get_account_diagnosticsDiagnose sending and receiving
One read that explains what is wrong with sending or receiving in this workspace: an issues list (unverified domains and missing DKIM records, inbound MX not ready, paused or throttled senders, quota or daily limit reached, trial restrictions, high bounce or complaint rates, failing webhooks), plan and usage against limits, each domain with its DKIM and inbound state, sending identities, 30-day deliverability and sender reputation, suppressions and unsubscribes, and the last 30 days of messages that were not sent (with reasons) plus bounce, complaint and reject events. Start here when a user asks why mail is not arriving. Never returns message bodies or secrets.
ไม่มีพารามิเตอร์
{
"name": "get_account_diagnostics",
"arguments": {}
}get_analyticsดึงการวิเคราะห์การส่ง
การวิเคราะห์ในแดชบอร์ดสำหรับ 7, 30 หรือ 90 วันที่ผ่านมา: ยอดรวมของ sent/received/delivered/bounced/blocked/opened/clicked/complaint ไทม์ไลน์รายวัน โดเมนผู้ส่งอันดับต้น และหัวเรื่องอันดับต้น
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
days | integer | ไม่ | ช่วงเวลาเป็นวัน: 7, 30 (ค่าเริ่มต้น) หรือ 90 (หนึ่งใน 7, 30, 90) |
{
"name": "get_analytics",
"arguments": {
"days": 30
}
}list_api_keysแสดงรายการเมทาดาทาของ API key
แสดงรายการชื่อ API key คำนำหน้าที่ไม่เป็นความลับ และเวลาใช้งานล่าสุด อ่านอย่างเดียว: MCP server นี้สร้าง หมุนเวียน หรือเพิกถอนคีย์ไม่ได้ มนุษย์เป็นผู้ทำในแดชบอร์ด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}
| พารามิเตอร์ | ชนิด | จำเป็น | คำอธิบาย |
|---|---|---|---|
limit | integer | ไม่ | ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200) |
offset | integer | ไม่ | จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…) |
{
"name": "list_api_keys",
"arguments": {}
}get_service_healthตรวจสอบสถานะบริการ SendHQ
ตรวจสอบว่า SendHQ API ทำงานอยู่และผู้ให้บริการอีเมลรายใดใช้งานอยู่ ไม่ต้องใช้ API key ที่ถูกต้อง
ไม่มีพารามิเตอร์
{
"name": "get_service_health",
"arguments": {}
}รายการความครอบคลุมของ API
ทุกการดำเนินการใน API สาธารณะและเครื่องมือที่ครอบคลุม ทุกอย่างที่ผู้ใช้ทำได้ในแดชบอร์ดและมี API จะถูกครอบคลุม ส่วนที่ยกเว้นด้านล่างเป็นการเจตนา
| Endpoint | เครื่องมือ | หมายเหตุ |
|---|---|---|
| POST /emails | send_email | ส่งอีเมลหนึ่งฉบับ |
| POST /emails/batch | send_batch | ส่งข้อความที่ปรับแต่งเฉพาะรายได้สูงสุด 100 ฉบับ |
| GET /emails | list_emails | แสดงรายการอีเมลที่ส่งและได้รับ |
| GET /emails/:id | get_email | ดึงอีเมลและไฟล์แนบ |
| PATCH /emails/:id | mark_email | อัปเดตสถานะอ่านแล้ว การเก็บถาวร สแปม หมวดหมู่ หรือความสำคัญ |
| POST /emails/:id/labels | label_email | เพิ่มหรือลบป้ายกำกับของอีเมล |
| DELETE /emails/:id | delete_email | ลบอีเมลที่เก็บรักษาไว้ |
| GET /emails/:id/events | list_email_events | แสดงรายการอีเวนต์การส่งของอีเมลฉบับหนึ่ง |
| GET /threads/:id | get_thread | ดึงบทสนทนาเรียงตามลำดับเวลา |
| GET /labels | list_labels | แสดงรายการป้ายกำกับพร้อมจำนวนข้อความและกฎการจัดเก็บ |
| POST /labels | create_label | สร้างป้ายกำกับ โดยเลือกใส่กฎจัดเก็บอัตโนมัติได้ |
| GET /labels/:id | get_label | ดึงป้ายกำกับด้วย ID หรือชื่อ |
| PATCH /labels/:id | update_label | เปลี่ยนชื่อ เปลี่ยนสี หรือเปลี่ยนป้ายกำกับให้เป็น bucket |
| DELETE /labels/:id | delete_label | ลบป้ายกำกับโดยไม่ลบอีเมล |
| POST /labels/:id/rules | create_label_rule | เพิ่มกฎจัดเก็บอัตโนมัติให้ป้ายกำกับ |
| DELETE /labels/:id/rules/:rule_id | delete_label_rule | ลบกฎจัดเก็บอัตโนมัติ |
| POST /drafts | create_draft | สร้างฉบับร่างในตัวเขียนอีเมล |
| GET /drafts | list_drafts | แสดงรายการฉบับร่างในตัวเขียนอีเมล |
| GET /drafts/:id | get_draft | ดึงฉบับร่างและไฟล์แนบ |
| PUT /drafts/:id | update_draft | แทนที่เนื้อหาฉบับร่าง |
| DELETE /drafts/:id | delete_draft | ทิ้งฉบับร่าง |
| POST /drafts/:id/attachments | upload_attachment | อัปโหลดไฟล์แนบไปยังฉบับร่าง |
| GET /attachments/:id | download_attachment | ดาวน์โหลดไฟล์แนบส่วนตัว |
| DELETE /attachments/:id | delete_attachment | ลบไฟล์แนบส่วนตัว |
| GET /sending-identities | list_sending_identities | แสดงรายการตัวตนผู้ส่งที่ยืนยันแล้ว |
| GET /templates | list_templates | แสดงรายการเทมเพลตแบบโฮสต์ |
| POST /templates | create_template | สร้างเทมเพลตแบบโฮสต์ |
| GET /templates/:id | get_template | ดึงฉบับร่าง รุ่นที่เผยแพร่ และการใช้งาน |
| PUT /templates/:id/draft | update_template_draft | บันทึกฉบับร่างของเทมเพลตอัตโนมัติ |
| POST /templates/:id/draft | create_template_draft | สร้างฉบับร่างใหม่จากรุ่นที่เผยแพร่ |
| POST /templates/:id/render | render_template | เรนเดอร์ผลลัพธ์จริงจากเซิร์ฟเวอร์ |
| POST /templates/:id/test | send_template_test | ส่งสแนปชอตทดสอบ |
| POST /templates/:id/publish | publish_template | เผยแพร่รุ่นเทมเพลตที่แก้ไขไม่ได้ |
| POST /templates/:id/archive | archive_template | เก็บถาวรเทมเพลต |
| POST /templates/:id/restore | restore_template | กู้คืนเทมเพลตที่เก็บถาวร |
| POST /domains | add_domain | เพิ่มโดเมนผู้ส่ง |
| GET /domains | list_domains | แสดงรายการโดเมนและสถานะ DNS ที่แคชไว้ |
| GET /domains/:id | get_domain | ดึงรายละเอียดการตั้งค่าโดเมน |
| POST /domains/:id/verify | verify_domain | Refresh domain and DNS verification |
| POST /domains/:id/inbound/setup | setup_inbound | Provision inbound receiving |
| POST /domains/:id/inbound/verify | verify_inbound | ยืนยันการกำหนดเส้นทาง MX ขาเข้า |
| DELETE /domains/:id | delete_domain | ลบโดเมน |
| GET /dns/provider | get_dns_provider | ตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจและโฮสต์แบบสัมพัทธ์ของเรคคอร์ด |
| GET /dns/domain-connect/connect | get_domain_connect_link | สร้างลิงก์ขอความยินยอม Domain Connect สำหรับตั้งค่า DNS แบบคลิกเดียว |
| POST /inboxes | create_inbox | สร้างที่อยู่ขาเข้า |
| GET /inboxes | list_inboxes | แสดงรายการที่อยู่ขาเข้า |
| GET /inboxes/:id | get_inbox | ดึงข้อมูลที่อยู่ขาเข้า |
| PATCH /inboxes/:id | update_inbox | เปลี่ยนชื่อ เปิดใช้ หรือปิดใช้กล่องจดหมาย |
| PUT /inboxes/:id/forwarding | set_inbox_forwarding | ส่งต่ออีเมลที่กล่องจดหมายได้รับไปยังที่อยู่อื่น |
| DELETE /inboxes/:id | delete_inbox | ลบกล่องจดหมายโดยเก็บข้อความไว้ |
| GET /deliverability/stats | deliverability_stats | ดึงสถิติการส่งถึงย้อนหลัง 30 วัน |
| GET /deliverability/reputation | list_sender_reputation | แสดงสถานะชื่อเสียงตามตัวตนผู้ส่งที่ตรงกันทุกตัวอักษร |
| GET /deliverability/account | deliverability_account | Account delivery rates, daily ladder, and bounce trend |
| GET /deliverability/domains | deliverability_domains | Per-domain sent, delivered, hard and soft bounces, complaints, and failures |
| GET /deliverability/senders | deliverability_senders | Per-From-address delivery rates |
| POST /deliverability/score | score_email | Score an email's content before it is sent |
| GET /emails/:id/delivery | email_delivery | Delivery timeline for one email, with bounce and complaint reasons |
| GET /threads/:id/delivery | thread_delivery | Per-thread delivery counts and per-message failure reasons |
| GET /suppressions | list_suppressions | แสดงรายการระงับการส่งของเวิร์กสเปซ |
| DELETE /suppressions/:email | remove_suppression | ลบการระงับการส่งจาก bounce ที่มีสิทธิ์ |
| GET /blocked-recipients | list_blocked_recipients | แสดงรายการ bounce, complaint และการยกเลิกการรับ |
| GET /webhooks | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| POST /webhooks | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| GET /webhooks/:id | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| PATCH /webhooks/:id | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| DELETE /webhooks/:id | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| POST /webhooks/:id/rotate-secret | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| POST /webhooks/:id/test | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| GET /webhooks/:id/deliveries | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| GET /webhooks/:id/deliveries/:deliveryId | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| POST /webhooks/:id/deliveries/:deliveryId/retry | ไม่เปิดให้ใช้ | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| GET /contacts | list_contacts | List contacts |
| POST /contacts | create_contact | Add a contact with its consent basis |
| PUT /contacts | upsert_contact | Create or update a contact by email |
| POST /contacts/bulk | bulk_update_contacts | Tag, move, unsubscribe, or delete many contacts at once |
| GET /contacts/export | ไม่เปิดให้ใช้ | Image uploads take a raw binary body and the export returns a CSV file meant for a person to download. Agents reuse uploaded images with list_uploaded_images and read the same contacts, filters, tags, and fields as JSON with list_contacts (paginated). |
| GET /contacts/:id | get_contact | Retrieve a contact by ID or email |
| PATCH /contacts/:id | update_contact | Update a contact's name, fields, or tags, or unsubscribe it |
| DELETE /contacts/:id | delete_contact | Delete a contact and its list memberships |
| POST /contact-imports | import_contacts | Import contacts from CSV |
| GET /contact-imports | list_contact_imports | List recent contact imports |
| GET /tags | list_tags | List contact tags with how many contacts carry each |
| GET /contact-fields | list_contact_fields | List custom contact field definitions |
| PUT /contact-fields/:key | set_contact_field | Define or change a custom contact field |
| DELETE /contact-fields/:key | delete_contact_field | Delete a custom field definition |
| GET /segments | list_segments | List saved segments with live counts |
| POST /segments | create_segment | Save a segment |
| POST /segments/preview | preview_segment | Count and sample the contacts that match unsaved conditions |
| GET /segments/:id | get_segment | Retrieve a segment and its live count |
| PATCH /segments/:id | update_segment | Rename a segment or change its conditions |
| DELETE /segments/:id | delete_segment | Delete a segment |
| GET /lists | list_lists | List contact lists with member counts |
| POST /lists | create_list | Create a list with an optional signup form, welcome email, and newsletter site |
| GET /lists/:id | get_list | Retrieve a list |
| PATCH /lists/:id | update_list | Rename a list or change its signup form, welcome email, or site |
| DELETE /lists/:id | delete_list | Delete a list without deleting its contacts |
| POST /lists/:id/contacts | add_list_contacts | Add existing contacts to a list |
| DELETE /lists/:id/contacts/:contact_id | remove_list_contact | Remove a contact from a list |
| GET /broadcasts | list_broadcasts | List broadcasts |
| POST /broadcasts | create_broadcast | Create a broadcast draft |
| GET /broadcasts/:id | get_broadcast | Retrieve a broadcast and its delivery totals |
| PATCH /broadcasts/:id | update_broadcast | Edit a draft broadcast |
| DELETE /broadcasts/:id | delete_broadcast | Delete a draft broadcast |
| GET /broadcasts/:id/checks | check_broadcast | Run the pre-send checks for a broadcast |
| POST /broadcasts/:id/test | send_broadcast_test | Send a test copy of a draft |
| POST /broadcasts/:id/schedule | schedule_broadcast | Schedule a draft to send later |
| POST /broadcasts/:id/unschedule | unschedule_broadcast | Unschedule a draft |
| POST /broadcasts/:id/duplicate | duplicate_broadcast | Copy a broadcast into a new draft |
| POST /broadcasts/:id/send | send_broadcast | Send a broadcast to its audience |
| POST /broadcasts/:id/send-more | send_broadcast_to_more | Send a sent broadcast to more of its audience |
| POST /broadcasts/:id/cancel | cancel_broadcast | Cancel a draft or sending broadcast |
| GET /broadcasts/:id/recipients | list_broadcast_recipients | List a broadcast's recipients, outcomes, and engagement |
| GET /broadcasts/:id/report | get_broadcast_report | Retrieve a broadcast's engagement report |
| GET /campaigns/overview | get_campaign_overview | Retrieve subscriber growth and recent broadcast performance |
| GET /newsletter-settings | get_newsletter_settings | Retrieve newsletter settings |
| PATCH /newsletter-settings | update_newsletter_settings | Change newsletter settings |
| POST /uploads/images | ไม่เปิดให้ใช้ | Image uploads take a raw binary body and the export returns a CSV file meant for a person to download. Agents reuse uploaded images with list_uploaded_images and read the same contacts, filters, tags, and fields as JSON with list_contacts (paginated). |
| GET /uploads/images | list_uploaded_images | List recently uploaded images |
| POST /events | track_event | Record something a contact did |
| POST /events/batch | ไม่เปิดให้ใช้ | History import is a one-time migration step for the account owner and requires a dashboard session. Bulk events are for server-side backfills through the REST API; an agent records what one person did with track_event, which takes a dedupe_key for safe retries. |
| GET /automations | list_automations | List automations with their 30-day totals |
| POST /automations | create_automation | Create an automation as a draft |
| GET /automations/:key | get_automation | Retrieve an automation with its emails |
| PATCH /automations/:key | update_automation | Edit an automation |
| DELETE /automations/:key | delete_automation | Delete an automation and its history |
| PUT /automations/:key/steps/:position | set_automation_step | Create or change one email of an automation |
| DELETE /automations/:key/steps/:position | delete_automation_step | Remove one email from an automation |
| PUT /automations/:key/steps/:position/variants/:locale | set_automation_step_variant | Create or change a language version of an email |
| POST /automations/:key/steps/:position/test | send_automation_test_email | Send one email of an automation to yourself as a test |
| POST /automations/:key/test | send_automation_test | Send every email of an automation to yourself as tests |
| POST /automations/:key/status | set_automation_status | Turn an automation on or off |
| POST /automations/:key/enroll | enroll_contact | Add a contact to an automation |
| POST /automations/:key/exit | exit_contact | Take a contact out of an automation |
| GET /automations/:key/preview | preview_automation | Dry run: what each person in an automation would get now |
| GET /automations/overview | get_automations_overview | Totals and a daily series across every automation |
| GET /automations/:key/report | get_automation_report | Results of one automation, with one row per email |
| GET /automations/:key/people | list_automation_people | List the people in an automation by what they did |
| GET /automations/:key/people/:contact_id | get_automation_person | One person's history in an automation |
| POST /automations/:key/import-history | ไม่เปิดให้ใช้ | History import is a one-time migration step for the account owner and requires a dashboard session. Bulk events are for server-side backfills through the REST API; an agent records what one person did with track_event, which takes a dedupe_key for safe retries. |
| GET /automation-settings | get_sending_limits | Retrieve the workspace's sending limits for automations |
| PUT /automation-settings | update_sending_limits | Change the workspace's sending limits for automations |
| GET /automation-library | list_automation_templates | List the template library: ready-made lifecycle emails |
| GET /automation-library/:id | get_automation_template | Read one template or set, with the email as it will look |
| POST /automation-library/:id/use | use_automation_template | Create a draft automation from a template or set |
| GET /events | list_events | List what contacts did, newest first |
| GET /events/names | list_event_names | List the kinds of event recorded in the last 30 days |
| POST /events/preview | ไม่เปิดให้ใช้ | These answer the dashboard's connection and spreadsheet screens and take a request body, while this server keeps its read-only tools to GET. An agent sees what a connection did with get_connection, and what an event started with list_events. |
| GET /connections | list_connections | List the workspace's connections (incoming webhooks) |
| POST /connections | create_connection | Create a connection and get its address |
| POST /connections/test | ไม่เปิดให้ใช้ | These answer the dashboard's connection and spreadsheet screens and take a request body, while this server keeps its read-only tools to GET. An agent sees what a connection did with get_connection, and what an event started with list_events. |
| GET /connections/:id | get_connection | Retrieve a connection with its last deliveries |
| PATCH /connections/:id | update_connection | Change a connection or switch it on or off |
| DELETE /connections/:id | delete_connection | Delete a connection |
| POST /connections/:id/address | ไม่เปิดให้ใช้ | The address is a credential: whoever holds it can record events for the workspace. Replacing it cuts off the system that uses the old one, so a person does it in the dashboard, next to that system's own settings. |
| GET /account | get_account | ดึงข้อมูลบัญชี การใช้งาน สถานะการเรียกเก็บเงิน และจำนวนเวิร์กสเปซด้วย API key |
| GET /account/diagnostics | get_account_diagnostics | Diagnose sending and receiving problems in the workspace |
| GET /analytics | get_analytics | ดึง analytics การส่งของแดชบอร์ดสำหรับ 7, 30 หรือ 90 วัน |
| GET /profile | get_account | คู่แฝดแบบเซสชันเท่านั้นของ GET /account MCP server อ่านเส้นทางของ API-key |
| POST /billing/checkout | ไม่เปิดให้ใช้ | การเปลี่ยนแปลงการเรียกเก็บเงินเป็นแบบเซสชันเท่านั้นโดยการออกแบบ และต้องให้เจ้าของบัญชีทำในแดชบอร์ด สถานะการเรียกเก็บเงินอ่านได้ด้วย get_account |
| POST /billing/cancel | ไม่เปิดให้ใช้ | การเปลี่ยนแปลงการเรียกเก็บเงินเป็นแบบเซสชันเท่านั้นโดยการออกแบบ และต้องให้เจ้าของบัญชีทำในแดชบอร์ด สถานะการเรียกเก็บเงินอ่านได้ด้วย get_account |
| POST /keys | ไม่เปิดให้ใช้ | ยกเว้นโดยเจตนา: เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง มนุษย์เป็นผู้จัดการคีย์ในแดชบอร์ด |
| GET /keys | list_api_keys | แสดงรายการเมทาดาทาของ API key |
| DELETE /keys/:id | ไม่เปิดให้ใช้ | ยกเว้นโดยเจตนา: เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง มนุษย์เป็นผู้จัดการคีย์ในแดชบอร์ด |
ไม่มีให้ใช้โดยเจตนา
| ความสามารถ | Endpoint | เหตุผล |
|---|---|---|
| สร้าง หมุนเวียน เพิกถอน หรือลบ API key | POST /keys, DELETE /keys/:id | ยกเว้นโดยเจตนา: เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง มนุษย์เป็นผู้จัดการคีย์ในแดชบอร์ด |
| เริ่มการชำระเงินหรือยกเลิกการสมัคร | POST /billing/checkout, POST /billing/cancel | การเปลี่ยนแปลงการเรียกเก็บเงินเป็นแบบเซสชันเท่านั้นโดยการออกแบบ และต้องให้เจ้าของบัญชีทำในแดชบอร์ด สถานะการเรียกเก็บเงินอ่านได้ด้วย get_account |
| การตั้งค่า DNS แบบคลิกเดียวของ Cloudflare (OAuth) | GET /api/dns/cloudflare/connect | ต้องใช้เซสชันเบราว์เซอร์แบบโต้ตอบและความยินยอม OAuth ของ Cloudflare ให้ใช้เรคคอร์ดจาก get_domain โฮสต์จาก get_dns_provider หรือ get_domain_connect_link แทน |
| สมัครใช้งาน เข้าสู่ระบบ ออกจากระบบ การเชื่อมโยงบัญชี Google | /api/auth/* | การยืนยันตัวตนผ่านเบราว์เซอร์สำหรับมนุษย์ MCP server ยืนยันตัวตนด้วย API key |
| แบบฟอร์มติดต่อซัพพอร์ต | POST /api/contact | แบบฟอร์มสาธารณะบนเว็บไซต์การตลาดสำหรับมนุษย์ ไม่ใช่การดำเนินการของเวิร์กสเปซ |
| Webhook endpoints and deliveries | GET /webhooks, POST /webhooks, GET /webhooks/:id, PATCH /webhooks/:id, DELETE /webhooks/:id, POST /webhooks/:id/rotate-secret, POST /webhooks/:id/test, GET /webhooks/:id/deliveries, GET /webhooks/:id/deliveries/:deliveryId, POST /webhooks/:id/deliveries/:deliveryId/retry | Webhook endpoints are configured once by a human, in the dashboard or the REST API, and their responses carry signing secrets an agent should not hold. An agent reads the same outcomes with list_email_events, list_emails, and list_blocked_recipients. |
| Upload editor images and export contacts as CSV | POST /uploads/images, GET /contacts/export | Image uploads take a raw binary body and the export returns a CSV file meant for a person to download. Agents reuse uploaded images with list_uploaded_images and read the same contacts, filters, tags, and fields as JSON with list_contacts (paginated). |
| Import an automation's send history and record events in bulk | POST /automations/:key/import-history, POST /events/batch | History import is a one-time migration step for the account owner and requires a dashboard session. Bulk events are for server-side backfills through the REST API; an agent records what one person did with track_event, which takes a dedupe_key for safe retries. |
| Move SendHQ's own win-back emails onto automations (backfill and comparison) | POST /automations/platform-backfill, GET /automations/platform-compare | Internal cutover tools for SendHQ's own workspace only: they answer nobody else, need its owner's dashboard session, and are not part of the public API or of /api/v1. The backfill enrols SendHQ's own accounts, so it is run by a person, one page at a time, after reading the dry run. |
| Replace a connection's secret address | POST /connections/:id/address | The address is a credential: whoever holds it can record events for the workspace. Replacing it cuts off the system that uses the old one, so a person does it in the dashboard, next to that system's own settings. |
| Dry runs for a sample payload and for a set of events | POST /connections/test, POST /events/preview | These answer the dashboard's connection and spreadsheet screens and take a request body, while this server keeps its read-only tools to GET. An agent sees what a connection did with get_connection, and what an event started with list_events. |
แค็ตตาล็อกที่เครื่องอ่านได้: /docs/mcp/tools.json (schema, annotation, การจับคู่ endpoint และรายการที่ยกเว้น) หน้านี้ฉบับ Markdown: /docs/mcp.md เมื่อติดตั้ง CLI แล้ว sendhq commands --format json จะพิมพ์แค็ตตาล็อกเดียวกัน