สำหรับเอเจนต์ 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 109 strictly typed tools. Written for agents first; humans welcome.

109 toolsstdio transport, one command0 key-management tools
ติดตั้งและเชื่อมต่อ (Claude Code)
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 จึงมีสิทธิ์เท่ากับคีย์นั้นทุกประการและไม่เกินกว่านั้น

  • 109 tools in 9 groups, generated from one catalog that is also published as tools.json.
  • JSON Schema ที่เข้มงวด: อาร์กิวเมนต์ที่ไม่รู้จัก ชนิดที่ผิด และฟิลด์บังคับที่ขาดหายจะถูกปฏิเสธในเครื่องก่อนที่จะไปถึง SendHQ
  • ข้อผิดพลาดแบบมีโครงสร้าง พร้อม code ที่คงที่ status ของ HTTP explanation remedy ที่เป็นรูปธรรม และข้อมูลว่าการลองใหม่ช่วยได้หรือไม่
  • ทุกเครื่องมือที่ส่งอีเมลจริงหรือทำลายข้อมูลจะระบุไว้ในคำแรกของคำอธิบาย และมี MCP safety annotation
  • โหมด --read-only ซ่อนทุกเครื่องมือที่ส่งและเปลี่ยนแปลงข้อมูล
  • ไม่มีการบันทึกล็อกใด ๆ stdout ส่งเฉพาะข้อความโปรโตคอล API key และเนื้อหาข้อความจะไม่ไปถึงล็อกเลย
ไม่ใช่ endpoint MCP ของเอกสารSendHQ ยังให้บริการ endpoint MCP ของเอกสารแบบอ่านอย่างเดียวขนาดเล็กที่ https://sendhq.cc/api/mcp (ค้นหาราคาและเอกสาร ไม่เข้าถึงบัญชี) เซิร์ฟเวอร์ในหน้านี้เป็นตัวเต็มที่ผูกกับบัญชี ทำงานในเครื่องหรือเป็นคอนเน็กเตอร์แบบโฮสต์ด้านล่าง

Use SendHQ in Claude, ChatGPT and Grok

ไม่ต้องติดตั้ง SendHQ ยังให้บริการเซิร์ฟเวอร์นี้เป็นคอนเน็กเตอร์แบบโฮสต์ที่ https://mcp.sendhq.cc/mcp พร้อมเครื่องมือชุดเดียวกัน คุณเข้าสู่ระบบด้วยบัญชี SendHQ แทนการวางคีย์

Claude

  1. เปิด Settings → Connectors แล้วค้นหา SendHQ ในไดเรกทอรี หรือเลือก Add custom connector แล้ววาง https://mcp.sendhq.cc/mcp
  2. คลิก Connect เข้าสู่ระบบ SendHQ ตรวจสอบสิทธิ์การเข้าถึง แล้วคลิก Allow
  3. ขอให้ Claude ตรวจสอบกล่องจดหมายของคุณ ส่งอีเมลจากโดเมนที่ยืนยันแล้วของคุณ หรืออธิบายอีเมลตีกลับ

ChatGPT

  1. Open Settings → Security and login and turn on Developer mode.
  2. Go to chatgpt.com/plugins, click Create MCP app, name it SendHQ and enter https://mcp.sendhq.cc/mcp.
  3. Sign in to SendHQ and click Allow, then pick SendHQ from the tools menu in a new chat.

Grok

  1. Go to grok.com/connectors, click New Connector, then Custom.
  2. 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_feature tool 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 เป็นค่าเริ่มต้น

macOS และ Linux
curl -fsSL https://downloads.sendhq.cc/install.sh | sh
Windows PowerShell
irm https://downloads.sendhq.cc/install.ps1 | iex
ตรวจสอบการติดตั้ง
sendhq version
SENDHQ_API_KEY=re_your_key sendhq doctor

สร้าง API key ในแดชบอร์ดที่ https://sendhq.cc/app#/keys MCP server สร้างคีย์ไม่ได้ คำสั่งเดียวที่รันเซิร์ฟเวอร์คือ:

รัน stdio server
SENDHQ_API_KEY=re_your_key sendhq mcp

โดยปกติคุณไม่ต้องรันคำสั่งนั้นด้วยตนเอง MCP client จะเรียกให้ เมื่อรันในเทอร์มินัล มันจะรอ JSON-RPC บน stdin

ตั้งค่าไคลเอนต์ของคุณ

Claude Code

claude mcp add
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

.mcp.json
{
  "mcpServers": {
    "sendhq": {
      "command": "sendhq",
      "args": [
        "mcp"
      ],
      "env": {
        "SENDHQ_API_KEY": "${SENDHQ_API_KEY}"
      }
    }
  }
}

OpenAI Codex

~/.codex/config.toml
[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)

claude_desktop_config.json
{
  "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

ทดสอบ stdio แบบดิบ (ส่งเข้า sendhq mcp ผ่านไปป์)
{"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), and send_broadcast_to_more deliver mail to real people and consume delivery credits. Their descriptions start with SENDS 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), and bulk_update_contacts are marked destructiveHint: true and their descriptions start with DESTRUCTIVE. Confirm with the user first. remove_suppression weakens 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 (machine in get_broadcast_report).
  • อย่าเปลี่ยนไปใช้ที่อยู่ From อื่นเพื่อเลี่ยงการหยุดชั่วคราวแบบ 423 และอย่าเพิ่มผู้รับที่ยกเลิกการรับหรือร้องเรียนกลับเข้าไปอีก

API key อยู่นอกขอบเขต

โดยการออกแบบ ไม่มีเครื่องมือที่สร้าง แก้ไข หมุนเวียน เพิกถอน หรือลบ API key เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง list_api_keys คืนเฉพาะชื่อ คำนำหน้าที่ไม่เป็นความลับ และเวลาใช้งานล่าสุด การจัดการคีย์อยู่ในแดชบอร์ดกับมนุษย์ที่เข้าสู่ระบบ

เวิร์กโฟลว์

1. การส่งครั้งแรก

  1. get_service_health ยืนยันว่าเข้าถึง API ได้ (ใช้งานได้โดยไม่ต้องมีคีย์)
  2. get_account shows the plan (access.tier) and remaining quota. If there is no active plan, do not send: the call returns subscription_required.
  3. list_sending_identities แสดงที่อยู่ From ที่คุณใช้ได้ หากว่างเปล่า ให้ทำเวิร์กโฟลว์โดเมนก่อน
  4. ยืนยันผู้ส่ง ผู้รับ หัวเรื่อง และเนื้อหากับผู้ใช้ จากนั้นเรียก send_email พร้อม idempotency_key
  5. 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. การยืนยันโดเมนตั้งแต่ต้นจนจบ

  1. add_domain with name: "example.com". The result includes the DNS records (DKIM CNAMEs, domain verification, SPF, recommended DMARC).
  2. get_dns_provider พร้อม domain_id ตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจ และคืนโฮสต์แบบสัมพัทธ์ที่ตรงกันที่ต้องกรอกสำหรับแต่ละเรคคอร์ดที่ผู้ให้บริการนั้น
  3. If providers.domainConnect.available is true, get_domain_connect_link returns 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 existing v=spf1 value.
  4. verify_domain rechecks DNS and DKIM verification. Status moves through pending, checking, and propagating to verified. Poll verify_domain or get_domain every 30–60 seconds; DNS can take minutes to hours.
  5. เมื่อ status เป็น verified ที่อยู่ของโดเมนจะปรากฏใน list_sending_identities

3. Bounce, complaint และการระงับการส่ง

  1. list_blocked_recipients คืนทุกที่อยู่ที่ถูกบล็อกพร้อมเหตุผล (bounce, complaint, unsubscribe) และจำนวนสรุป
  2. list_suppressions คืนการระงับการส่งจาก hard bounce และ complaint ส่วน deliverability_stats ให้อัตราการส่งถึง bounce และ complaint ย้อนหลัง 30 วัน และ list_sender_reputation แสดงที่อยู่ From ที่ถูกจำกัดหรือหยุดชั่วคราว
  3. การส่งที่มีผู้รับที่ถูกระงับการส่งจะล้มเหลวด้วย 422 recipient_suppressed ให้ลบผู้รับรายนั้นแล้วส่งใหม่
  4. เรียก remove_suppression เฉพาะเมื่อมนุษย์ยืนยันว่ากล่องจดหมายที่เคยตีกลับใช้งานได้แล้วเท่านั้น การระงับการส่งจาก complaint เป็นแบบถาวร (409 complaint_suppression_locked)

4. รับอีเมลขาเข้า

  1. ต้องยืนยันโดเมน (มักเป็นโดเมนย่อย เช่น inbound.example.com)
  2. setup_inbound จัดเตรียมการรับอีเมลและคืนเรคคอร์ด MX หนึ่งรายการ มนุษย์เป็นผู้เผยแพร่
  3. verify_inbound จนกว่า status จะเป็น ready
  4. create_inbox พร้อม domain_id และ local_part (เช่น support) สร้าง support@inbound.example.com
  5. poll list_emails พร้อม direction: "in" และ unread: true (ใส่ inbox_id ได้หากต้องการ) อ่านข้อความด้วย get_email อ่านบทสนทนาด้วย get_thread ไฟล์แนบด้วย download_attachment และทำเครื่องหมายว่าจัดการแล้วด้วย mark_email (read: true)
  6. ตอบกลับในเธรดเดิมด้วย send_email และ reply_to_email_id SendHQ ตั้งค่า In-Reply-To, References และเธรดให้

5. Webhook และการแจ้งเตือนอีเวนต์

Webhooks push signed email events (email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.failed, email.received) to an endpoint a human configures in the dashboard or with the REST API (see /docs/webhooks). 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. วินิจฉัยความล้มเหลวในการส่งถึง

  1. ค้นหาข้อความ: list_emails พร้อม direction: "out" และ to หรือ query หรือ get_email หากคุณมี ID status: failed หมายความว่า SendHQ หรือผู้ให้บริการปฏิเสธในขั้นตอนการส่งเข้า ข้อผิดพลาดของอีเมลอธิบายสาเหตุ
  2. list_email_events: bounce (ถาวรหรือชั่วคราว พร้อมข้อมูลวินิจฉัยจากผู้ให้บริการ) complaint, reject หรือ delivery หากยังไม่มีอีเวนต์ แสดงว่าผู้ให้บริการยังไม่รายงาน ให้รอแล้วตรวจสอบอีกครั้ง
  3. 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 → inspect list_sender_reputation; account_paused → the workspace is paused for review, read the rates; daily_limit_reached → wait until midnight UTC; quota_exhausted → get_account usage.
  4. get_domain ตรวจสอบว่า DKIM, SPF และ DMARC ยังเผยแพร่อยู่ ส่วน deliverability_stats แสดงว่าปัญหาเกิดกับข้อความเดียวหรือเป็นแนวโน้ม
  5. รายงานสิ่งที่หลักฐานแสดง อีเวนต์ delivery หมายความว่าเซิร์ฟเวอร์ของผู้รับยอมรับข้อความ ไม่ได้หมายความว่าไปถึงกล่องจดหมายหรือถูกอ่านแล้ว

7. ดูแล bucket งาน (ป้ายกำกับ)

  1. create_label พร้อม name (เช่น Agent/Orders) และ skip_inbox: true ซึ่งทำให้ป้ายกำกับเป็น bucket อีเมลที่ได้รับและได้ป้ายกำกับนี้จะถูกเก็บถาวร จึงปรากฏเฉพาะในป้ายกำกับ ไม่ปรากฏในกล่องเข้าของมนุษย์
  2. ส่งอีเมลงานด้วย send_email (หรือ send_batch) และ labels: ["Agent/Orders"] การตอบกลับในบทสนทนานั้นจะสืบทอดป้ายกำกับโดยอัตโนมัติและข้ามกล่องเข้า
  3. สำหรับอีเมลที่เริ่มนอกบทสนทนาของคุณ ให้เพิ่มกฎการจัดเก็บ: create_label_rule พร้อม inbox_id (ที่อยู่เฉพาะ เช่น orders@…) from to หรือ subject ส่ง apply_to_existing: true เพื่อจัดเก็บอีเมลที่ได้รับไปแล้ว
  4. ทำงานกับ bucket: list_emails พร้อม label: "Agent/Orders" direction: "in" และ unread: true อ่านด้วย get_email หรือ get_thread ตอบกลับด้วย send_email และ reply_to_email_id และ mark_email read: true เมื่อจัดการแล้ว
  5. ย้ายข้อความที่หลุดเข้าหรือออกด้วย label_email (add / remove) การเพิ่มป้ายกำกับ bucket ให้ข้อความที่ได้รับจะเก็บถาวรข้อความนั้นด้วย
  6. หากต้องการ set_inbox_forwarding จะส่งสำเนาทุกอย่างที่ที่อยู่ผู้รับได้รับไปยังกล่องจดหมายอื่น (ปลายทางต้องยืนยันทางอีเมลก่อน)
ส่งเข้า bucket
{
  "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

  1. Audience: list_lists (or create_list with a signup form), and optionally preview_segment then create_segment to narrow it, for example to contacts tagged VIP who opened in the last 90 days. Add only people who asked for your email: every subscribed contact needs a consent_basis.
  2. get_newsletter_settings: if postalAddress is empty, ask the user for one and set it with update_newsletter_settings (marketing email needs it).
  3. create_broadcast with list_id, a verified from, subject, preview_text, content (markdown is simplest), and optionally audience (segment_id, limit, order: engaged).
  4. check_broadcast: fix every block item and tell the user about warn items. Then send_broadcast_test to the user's own address so they can look at it.
  5. Only when the user says to send: send_broadcast now (with an idempotency_key), or schedule_broadcast with scheduled_at (unschedule_broadcast to change it).
  6. Follow up with get_broadcast (delivery totals), get_broadcast_report (opens, clicks, links, inbox providers, against your average), and list_broadcast_recipients with activity. Report opens as estimates. With a limited audience, send_broadcast_to_more sends to the next people.
Draft a broadcast
{
  "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_…"
    }
  }
}

ผลลัพธ์ การแบ่งหน้า และข้อผิดพลาด

การเรียกที่สำเร็จจะคืนออบเจ็กต์ 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_required until 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 after resets_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_reached waits 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_limited means Gmail returned 4.7.28; wait until resets_at and 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

codeHTTPลองใหม่?ความหมายและสิ่งที่ต้องทำ
invalid_arguments—ไม่อาร์กิวเมนต์ไม่ผ่าน JSON Schema ของเครื่องมือในเครื่อง ไม่มีอะไรไปถึง SendHQ ให้แก้ฟิลด์ที่ระบุใน problems
auth_error401ไม่API key หายไป ถูกเพิกถอน หรือผิด ตั้ง SENDHQ_API_KEY สำหรับโปรเซสของเซิร์ฟเวอร์ โดยมนุษย์เป็นผู้สร้างคีย์ในแดชบอร์ด
subscription_required402ไม่No active subscription. Nothing is sent, including to the account owner. The owner chooses a plan. Do not retry until then.
payment_required402ไม่ฟีเจอร์นี้ต้องใช้แพ็กเกจแบบชำระเงิน (เช่น ไฟล์แนบ) ให้ส่งโดยไม่ใช้ฟีเจอร์นั้น หรืออัปเกรด
sender_domain_not_owned403ไม่โดเมน From ไม่อยู่ในเวิร์กสเปซนี้ ใช้ list_sending_identities หรือ add_domain
sender_domain_unverified403ไม่โดเมน From ยังไม่ได้รับการยืนยัน get_domain เผยแพร่เรคคอร์ดที่ขาด แล้ว verify_domain
domain_limit_reached403ไม่ถึงขีดจำกัดโดเมนของแพ็กเกจแล้ว ลบโดเมนที่ไม่ได้ใช้ (โดยได้รับอนุมัติ) หรืออัปเกรด
marketing_not_enabled403ไม่คลาส marketing ไม่ได้เปิดใช้สำหรับโดเมนหรือแพ็กเกจนี้ ใช้ transactional เฉพาะเมื่อข้อความเป็น transactional จริง ๆ
forbidden403ไม่นโยบายไม่อนุญาตการดำเนินการนี้ ปรับคำขอ
not_found404ไม่ID ไม่อยู่ในเวิร์กสเปซนี้ ให้แสดงรายการทรัพยากรเพื่อหา ID ที่ถูกต้อง และกู้คืนเทมเพลตที่เก็บถาวรก่อน
idempotency_conflict409ไม่ใช้คีย์ซ้ำกับเนื้อหาที่ต่างกัน ส่งต้นฉบับเดิมอีกครั้ง หรือใช้คีย์ใหม่สำหรับข้อความใหม่
idempotency_in_progress409ใช่คำขอเดิมยังทำงานอยู่ รอ แล้วลองใหม่ด้วยคีย์และเนื้อหาเดิม
revision_conflict409ไม่ฉบับร่างของเทมเพลตเปลี่ยนไปตั้งแต่ที่คุณอ่าน get_template ผสาน แล้วบันทึกอีกครั้ง
complaint_suppression_locked409ไม่ผู้รับร้องเรียน อย่าส่งอีเมลถึงเขาอีก
inbound_not_ready409ไม่การรับอีเมลขาเข้ายังไม่พร้อม setup_inbound เผยแพร่ MX แล้ว verify_inbound
conflict409ไม่ทรัพยากรมีอยู่แล้วหรืออยู่ในสถานะที่ไม่ถูกต้อง อ่านแล้วปรับ
attachments_too_large413ไม่เกิน 10 ไฟล์หรือ 10 MB ลบหรือย่อขนาดไฟล์แนบ
recipient_suppressed422ไม่ผู้รับเคย hard bounce หรือร้องเรียนมาก่อน ให้ลบออก ดู list_blocked_recipients
recipient_unsubscribed422ไม่ผู้รับยกเลิกการรับอีเมลการตลาด ให้ลบออกถาวร
validation_failed422ไม่เนื้อหาถูกปฏิเสธ เช่น ข้อมูลเทมเพลตที่ละเมิดสัญญาของตัวแปร แก้อินพุต
sender_paused423ไม่ที่อยู่ From นี้ถูกหยุดชั่วคราวโดยตัวตัดวงจร bounce/complaint 7 วัน หยุด แก้รายชื่อ แล้วรอการกลับสู่ปกติโดยอัตโนมัติ
account_paused423ไม่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_exhausted429ไม่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_reached429after resetWorkspace daily ladder. Not a short backoff. Wait until resets_at (midnight UTC). The message was not queued.
hourly_limit_reached429after resetHourly pace (about a tenth of the day's cap). Wait until the next UTC hour. Not a short backoff.
gmail_recipient_limit429after reset500 Gmail recipients a day for a sending domain under 30 days old, on any ladder rung. Wait until midnight UTC. Not queued.
gmail_rate_limited429after resetGmail returned 4.7.28 for this domain. Wait until resets_at. Other providers keep sending.
rate_limited429ใช่Slow down; wait retry_after_seconds. This is not a daily, hourly, or Gmail cap.
server_error5xxใช่SendHQ หรือผู้ให้บริการล้มเหลวชั่วคราว ใช้ backoff แล้วลองใหม่ การส่งใช้คีย์และเนื้อหาเดิม หาก idempotent_replayed เป็น true ให้ใช้คีย์ใหม่หลังยืนยันว่าไม่มีอะไรถูกส่ง
network_error—ใช่คำขอหรือการตอบกลับสูญหาย ลองใหม่ สำหรับการส่ง idempotency_key เดิมทำให้ปลอดภัย
invalid_request400ไม่คำขอผิดรูปแบบ อ่าน 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, list_sender_reputation, list_suppressions, remove_suppression, list_blocked_recipients
Campaigns: list_contacts, create_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
Account, usage, analytics, and keys: get_account, get_account_diagnostics, get_analytics, list_api_keys, get_service_health

อีเมลและเธรด

ส่งอีเมลจริงsend_email
POST /emails

ส่งอีเมลหนึ่งฉบับ

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

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
fromstringใช่ผู้ส่ง เช่น Acme <hello@example.com> โดเมนต้องได้รับการยืนยันในเวิร์กสเปซนี้ (ดู list_sending_identities) (สูงสุด 998 ตัวอักษร)
tostring[]ใช่ผู้รับ แต่ละรายการเป็นที่อยู่ โดยจะใส่ชื่อที่แสดงหรือไม่ก็ได้ To+cc+bcc รวมกันได้สูงสุด 100 รายการ ทุกปลายทางใช้เครดิตการส่งหนึ่งเครดิต (1–100 รายการ)
ccstring[]ไม่ผู้รับสำเนา (0–100 รายการ)
bccstring[]ไม่ผู้รับสำเนาลับ (0–100 รายการ)
subjectstringไม่หัวเรื่อง ละไว้เมื่อส่งเทมเพลต (สูงสุด 998 ตัวอักษร)
textstringไม่เนื้อหาข้อความล้วน ระบุ text, html หรือ template
htmlstringไม่เนื้อหา HTML SendHQ ทำความสะอาดให้และสร้าง text เมื่อละ text
reply_tostringไม่ที่อยู่ Reply-To
headersobjectไม่เฮดเดอร์กำหนดเองที่ปลอดภัยเพิ่มเติม (ค่าเป็นสตริง) เช่น {"X-Entity-Ref-ID": "123"} เฮดเดอร์การกำหนดเส้นทาง เช่น From/To/Message-ID ควบคุมโดย SendHQ
message_classstringไม่transactional (ค่าเริ่มต้น) หรือ marketing Marketing ต้องใช้แพ็กเกจหรือโดเมนที่เปิดใช้ marketing และเพิ่มการจัดการยกเลิกการรับ (หนึ่งใน transactional, marketing)
reply_to_email_idstringไม่ตอบกลับภายในบทสนทนาที่มีอยู่: ID em_… ของข้อความที่ตอบ SendHQ ตั้งค่า In-Reply-To/References และเธรดให้
thread_idstringไม่ID เธรดที่ระบุชัดเจนเพื่อจัดเก็บข้อความ
draft_idstringไม่ส่งไฟล์แนบของฉบับร่างที่เก็บไว้ (dr_…) พร้อมข้อความนี้ ฉบับร่างจะถูกลบหลังส่งสำเร็จ
templateobjectไม่ส่งเทมเพลตแบบโฮสต์ที่เผยแพร่แล้วแทน html/text ดิบ ต้องมีผู้รับ to หนึ่งรายพอดีและไม่มี cc/bcc เทมเพลตเป็นผู้ระบุหัวเรื่อง ต้องระบุอย่างน้อยหนึ่งรายการ: id, key
template.idstringไม่ID เทมเพลต (tmpl_…) ระบุ id หรือ key
template.keystringไม่คีย์เทมเพลต เช่น account-welcome ระบุ id หรือ key
template.version_idstringไม่ID รุ่นที่เผยแพร่แล้ว (tmplv_…) ซึ่งไม่บังคับ ค่าเริ่มต้นคือรุ่นที่เผยแพร่ปัจจุบัน
template.dataobjectไม่ค่าสำหรับตัวแปรที่มีชนิดข้อมูลของเทมเพลต
labelsstring[]ไม่ชื่อป้ายกำกับหรือ ID lbl_… ที่จะจัดเก็บข้อความนี้ ชื่อที่ไม่รู้จักจะถูกสร้างขึ้น การตอบกลับในบทสนทนาจะสืบทอดป้ายกำกับ และป้ายกำกับ bucket (skip_inbox) จะเก็บการตอบกลับเหล่านั้นไม่ให้เข้ากล่องเข้า สูงสุด 10 (0–10 รายการ)
idempotency_keystringไม่เฮดเดอร์ Idempotency-Key ใช้ซ้ำเฉพาะเพื่อลองคำขอนี้ใหม่เท่านั้น (สูงสุด 200 ตัวอักษร)
attachmentsobject[]ไม่ไฟล์ที่จะแนบ (สูงสุด 10 ไฟล์ รวม 10 MB) แต่ละไฟล์ต้องมี content_base64 (พร้อม filename) หรือ file_path ในเครื่อง (0–10 รายการ) ต้องระบุอย่างน้อยหนึ่งรายการ: content_base64, file_path
attachments[].filenamestringไม่ชื่อไฟล์ที่แสดงแก่ผู้รับ จำเป็นเมื่อใช้ content_base64 ค่าเริ่มต้นคือ basename ของ file_path (สูงสุด 255 ตัวอักษร)
attachments[].content_typestringไม่MIME type เช่น application/pdf ค่าเริ่มต้นคือ application/octet-stream
attachments[].content_base64stringไม่เนื้อหาไฟล์แบบ base64 มาตรฐาน
attachments[].file_pathstringไม่พาธสัมบูรณ์ของไฟล์ในเครื่องที่โปรเซสของ MCP server อ่านได้
ค่าที่คืน{id: em_…, providerMessageId, threadId, templateId, templateVersionId, isTest} การยอมรับไม่เท่ากับการส่งถึง ให้ติดตามผลด้วย list_email_events
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "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
POST /emails/batch

ส่งอีเมลชุดที่ปรับแต่งเฉพาะราย

SENDS REAL EMAIL ส่งข้อความอิสระ 1–100 ฉบับในคำขอเดียว (ใช้สำหรับปรับแต่งเทมเพลตเฉพาะผู้รับ) แต่ละรายการมีรูปแบบเดียวกับ send_email (ไม่มี attachments/idempotency_key) แต่ละรายการสำเร็จหรือล้มเหลวแยกกัน HTTP 207 หมายถึงสำเร็จบางส่วน ให้ตรวจสอบ data[i].ok และ data[i].error แต่ละรายการ idempotency_key หนึ่งคีย์ครอบคลุมเนื้อหาชุดทั้งหมด

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
emailsobject[]ใช่ข้อความที่จะส่ง (1–100 รายการ) ต้องระบุอย่างน้อยหนึ่งรายการ: html, text, template
idempotency_keystringไม่Idempotency-Key สำหรับทั้งชุด (สูงสุด 200 ตัวอักษร)
ค่าที่คืน{data: [{index, ok, id?, error?: {message, status}}], count, successful, failed}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "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
GET /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}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
directionstringไม่in สำหรับที่ได้รับ out สำหรับที่ส่ง (หนึ่งใน in, out)
statusstringไม่ตัวกรองสถานะ เช่น queued, sent, delivered, bounced, complained, failed
domainstringไม่เฉพาะข้อความของโดเมนนี้ หรือรายการโดเมนที่คั่นด้วยเครื่องหมายจุลภาค (ตรงกับข้อใดข้อหนึ่ง)
inbox_idstringไม่เฉพาะข้อความที่กล่องจดหมายนี้ได้รับ (inb_…)
labelstringไม่เฉพาะข้อความที่มีป้ายกำกับนี้: ID ป้ายกำกับ lbl_… หรือชื่อที่ตรงกันทุกตัวอักษร หรือรายการที่คั่นด้วยเครื่องหมายจุลภาค (ตรงกับข้อใดข้อหนึ่ง) ใช้ list_labels เพื่อดูโฟลเดอร์
archivedbooleanไม่false = มุมมองกล่องเข้า (อีเมลที่ได้รับซึ่งยังไม่เก็บถาวร) true = เฉพาะที่เก็บถาวร ละไว้เพื่อดูอีเมลทั้งหมด
categorystringไม่primary (บุคคล) updates (จดหมายข่าว อีเมลจำนวนมาก อัตโนมัติ) หรือ spam หรือรายการที่คั่นด้วยเครื่องหมายจุลภาค สแปมจะถูกซ่อนเว้นแต่ร้องขอ
importantbooleanไม่true = เฉพาะข้อความที่ทำเครื่องหมายว่าสำคัญ (การตอบกลับบทสนทนาที่คุณเริ่ม และผู้ส่งที่ทำเครื่องหมายว่าสำคัญ)
include_spambooleanไม่รวมสแปมในผลลัพธ์ (สำหรับการค้นหาข้ามทุกโฟลเดอร์)
fromstringไม่ที่อยู่ผู้ส่งมีค่านี้อยู่
tostringไม่ที่อยู่ผู้รับมีค่านี้อยู่
unreadbooleanไม่true = เฉพาะที่ยังไม่อ่าน false = เฉพาะที่อ่านแล้ว
afterstringไม่ไทม์สแตมป์ ISO-8601 เฉพาะข้อความที่สร้างหลังจากนั้น (date-time)
beforestringไม่ไทม์สแตมป์ ISO-8601 เฉพาะข้อความที่สร้างก่อนหน้านั้น (date-time)
querystringไม่ค้นหาข้อความอิสระในหัวเรื่อง เนื้อหา ที่อยู่ผู้ส่ง/ผู้รับ และชื่อไฟล์แนบ (สูงสุด 200 ตัวอักษร)
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [สรุปอีเมล], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_emails",
  "arguments": {
    "direction": "in",
    "unread": true,
    "limit": 25
  }
}
อ่านอย่างเดียวget_email
GET /emails/:email_id

ดึงอีเมลหนึ่งฉบับ

ดึงข้อความหนึ่งฉบับพร้อมเฮดเดอร์ เนื้อหา html/text สถานะ เมทาดาทาของเธรด และเมทาดาทาของไฟล์แนบ (ดาวน์โหลดไบต์ด้วย download_attachment)

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
email_idstringใช่ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืนออบเจ็กต์อีเมล: {id, direction, status, from, to, cc, bcc, subject, html, text, threadId, messageId, providerMessageId, readAt, createdAt, attachments: [{id, filename, contentType, sizeBytes, available}]}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_email",
  "arguments": {
    "email_id": "em_123"
  }
}
เปลี่ยนสถานะmark_email
PATCH /emails/:email_id

ทำเครื่องหมายว่าอ่านแล้ว เก็บถาวร สแปม หรือสำคัญ

อัปเดตข้อความหนึ่งฉบับ: read, archived, category (primary, updates, spam เฉพาะอีเมลที่ได้รับ) และ important การรายงานสแปมหรือทำเครื่องหมายว่าสำคัญเป็นการสอน SendHQ เกี่ยวกับผู้ส่งรายนั้นสำหรับอีเมลในอนาคต ส่ง learn: false เพื่อเปลี่ยนเฉพาะข้อความนี้ ต้องส่งอย่างน้อยหนึ่งฟิลด์

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
email_idstringใช่ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
readbooleanไม่true = อ่านแล้ว false = ยังไม่อ่าน
archivedbooleanไม่true = เก็บถาวร (ข้ามกล่องเข้า) false = ย้ายกลับไปกล่องเข้า
categorystringไม่ย้ายข้อความที่ได้รับไปยัง primary, updates หรือ spam (หนึ่งใน primary, updates, spam)
importantbooleanไม่ทำเครื่องหมายหรือยกเลิกการทำเครื่องหมายข้อความว่าสำคัญ
learnbooleanไม่false = ไม่จดจำคำตัดสินนี้สำหรับผู้ส่ง (ค่าเริ่มต้น true)
ค่าที่คืนออบเจ็กต์อีเมลที่อัปเดตแล้ว
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "mark_email",
  "arguments": {
    "email_id": "em_123",
    "read": true
  }
}
ทำลายข้อมูลdelete_email
DELETE /emails/:email_id

ลบอีเมล

DESTRUCTIVE: ลบข้อความที่เก็บรักษาไว้และไฟล์แนบที่จัดเก็บออกจาก SendHQ อย่างถาวร ไม่ได้เรียกคืนข้อความที่ส่งถึงแล้ว

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
email_idstringใช่ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_email",
  "arguments": {
    "email_id": "em_123"
  }
}
อ่านอย่างเดียวlist_email_events
GET /emails/:email_id/events

แสดงรายการอีเวนต์การส่งของอีเมลฉบับหนึ่ง

อีเวนต์จากผู้ให้บริการสำหรับข้อความที่ส่งหนึ่งฉบับ: delivery, bounce, complaint, reject, open, click นี่คือหลักฐานว่าข้อความส่งถึงหรือไม่ หรือเหตุใดจึงล้มเหลว แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
email_idstringใช่ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{event_type, recipient, reason, created_at, …}], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_email_events",
  "arguments": {
    "email_id": "em_123"
  }
}
อ่านอย่างเดียวget_thread
GET /threads/:thread_id

ดึงบทสนทนา

ดึงทุกข้อความในบทสนทนาตามลำดับเวลา (ทั้งที่ส่งและได้รับ) พร้อมเมทาดาทาของไฟล์แนบของแต่ละข้อความ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
thread_idstringใช่ID เธรด (โดยปกติคือ ID em_… ของข้อความแรก ดู threadId ในอีเมลใด ๆ) (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{id, subject, data: [อีเมล]}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_thread",
  "arguments": {
    "thread_id": "em_123"
  }
}
Read-onlyemail_delivery
GET /emails/:email_id/delivery

Get 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_idstringใช่
limitintegerไม่
offsetintegerไม่
Returns{emailId, status, timeline, count, limit, offset}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "email_delivery",
  "arguments": {
    "email_id": "em_123"
  }
}
Read-onlythread_delivery
GET /threads/:thread_id/delivery

Get a thread delivery summary

Counts of delivered, bounced, complained, and failed outbound messages in one conversation, plus each message's failure reason.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
thread_idstringใช่
Returns{threadId, delivered, bounced, complained, failed, messages}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "thread_delivery",
  "arguments": {
    "thread_id": "thr_123"
  }
}

ป้ายกำกับและกฎจัดเก็บอัตโนมัติ

อ่านอย่างเดียวlist_labels
GET /labels

แสดงรายการป้ายกำกับ

แสดงรายการป้ายกำกับ (โฟลเดอร์) ของเวิร์กสเปซพร้อมจำนวนทั้งหมดและจำนวนที่ยังไม่อ่าน และกฎจัดเก็บอัตโนมัติ แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{id, name, color, totalCount, unreadCount, rules: [...]}], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_labels",
  "arguments": {}
}
อ่านอย่างเดียวget_label
GET /labels/:label_id

ดึงป้ายกำกับ

ดึงป้ายกำกับหนึ่งรายการพร้อมจำนวนและกฎจัดเก็บอัตโนมัติ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
label_idstringใช่ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร)
ค่าที่คืนออบเจ็กต์ป้ายกำกับ
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_label",
  "arguments": {
    "label_id": "Billing"
  }
}
เปลี่ยนสถานะcreate_label
POST /labels

สร้างป้ายกำกับ

สร้างป้ายกำกับแบบโฟลเดอร์ ตั้ง skip_inbox: true เพื่อทำให้เป็น bucket ที่เอเจนต์เป็นเจ้าของ ส่งด้วย labels: [name] แล้วการตอบกลับจะถูกจัดเก็บเข้าป้ายกำกับและอยู่นอกกล่องเข้า กฎจัดเก็บอัตโนมัติที่ไม่บังคับจะจัดเก็บอีเมลใหม่ที่ส่ง/ได้รับ (ทุกเงื่อนไขในกฎต้องตรงกัน) ตั้ง apply_to_existing เพื่อจัดเก็บอีเมลที่เก็บรักษาไว้ด้วย

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
namestringใช่ชื่อป้ายกำกับ เช่น Billing หรือ Clients/Acme ไม่ซ้ำกันภายในเวิร์กสเปซ (ไม่สนตัวพิมพ์) (สูงสุด 64 ตัวอักษร)
colorstringไม่สีแบบเลขฐานสิบหก เช่น #1a73e8 ไม่บังคับ
skip_inboxbooleanไม่โหมด bucket: อีเมลที่ได้รับและได้ป้ายกำกับนี้ (โดยกฎ โดยการตอบกลับบทสนทนาที่ส่งด้วยป้ายกำกับนี้ หรือโดยตนเอง) จะถูกเก็บถาวร จึงปรากฏเฉพาะในป้ายกำกับ ไม่ปรากฏในกล่องเข้า
rulesobject[]ไม่กฎจัดเก็บอัตโนมัติที่ไม่บังคับ (สูงสุด 20) แต่ละกฎต้องมีอย่างน้อยหนึ่งใน inbox_id, from, to, subject (0–20 รายการ)
rules[].directionstringไม่เฉพาะอีเมลแบบ in (ได้รับ) หรือ out (ส่ง) ละไว้เพื่อรวมทั้งสองแบบ (หนึ่งใน in, out)
rules[].inbox_idstringไม่เฉพาะอีเมลที่กล่องจดหมายนี้ได้รับ (inb_…) จัดเก็บแต่ละที่อยู่ผู้รับเข้าโฟลเดอร์ของตนเอง
rules[].fromstringไม่ผู้ส่งมีข้อความนี้ (ไม่สนตัวพิมพ์) เช่น @stripe.com (สูงสุด 200 ตัวอักษร)
rules[].tostringไม่To/Cc มีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร)
rules[].subjectstringไม่หัวเรื่องมีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร)
rules[].skip_inboxbooleanไม่เก็บถาวรอีเมลที่ได้รับซึ่งตรงกัน เพื่อให้ปรากฏเฉพาะในโฟลเดอร์ป้ายกำกับ ไม่ปรากฏในกล่องเข้า
apply_to_existingbooleanไม่จัดเก็บอีเมลที่เก็บรักษาไว้แล้วซึ่งตรงกับกฎด้วย
ค่าที่คืนป้ายกำกับที่สร้างพร้อมกฎ
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_label",
  "arguments": {
    "name": "Agent/Orders",
    "skip_inbox": true,
    "rules": [
      {
        "from": "@stripe.com"
      }
    ]
  }
}
เปลี่ยนสถานะupdate_label
PATCH /labels/:label_id

เปลี่ยนชื่อ เปลี่ยนสี หรือเปลี่ยนป้ายกำกับเป็น bucket

เปลี่ยนชื่อป้ายกำกับ เปลี่ยนสี หรือสลับโหมด bucket (skip_inbox) การเปิดโหมด bucket จะเก็บถาวรอีเมลที่ได้รับซึ่งอยู่ในป้ายกำกับอยู่แล้ว

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
label_idstringใช่ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร)
namestringไม่ชื่อใหม่ (สูงสุด 64 ตัวอักษร)
colorstringไม่สีเลขฐานสิบหกใหม่
skip_inboxbooleanไม่โหมด bucket: อีเมลที่ได้รับและได้ป้ายกำกับนี้ (โดยกฎ โดยการตอบกลับบทสนทนาที่ส่งด้วยป้ายกำกับนี้ หรือโดยตนเอง) จะถูกเก็บถาวร จึงปรากฏเฉพาะในป้ายกำกับ ไม่ปรากฏในกล่องเข้า
ค่าที่คืนป้ายกำกับที่อัปเดตแล้ว
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_label",
  "arguments": {
    "label_id": "lbl_123",
    "name": "Finance/Billing"
  }
}
ทำลายข้อมูลdelete_label
DELETE /labels/:label_id

ลบป้ายกำกับ

DESTRUCTIVE: ลบป้ายกำกับและกฎของป้ายกำกับ ตัวอีเมลยังคงอยู่ เพียงแต่ไม่มีป้ายกำกับนี้

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
label_idstringใช่ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_label",
  "arguments": {
    "label_id": "lbl_123"
  }
}
เปลี่ยนสถานะcreate_label_rule
POST /labels/:label_id/rules

เพิ่มกฎจัดเก็บอัตโนมัติ

เพิ่มกฎให้ป้ายกำกับเพื่อให้อีเมลใหม่ที่ตรงกันถูกจัดเก็บโดยอัตโนมัติ ทุกเงื่อนไขที่คุณตั้งต้องตรงกัน ใช้ inbox_id เพื่อให้ที่อยู่ผู้รับมีโฟลเดอร์ของตนเอง เพิ่ม skip_inbox เพื่อไม่ให้ปรากฏในกล่องเข้า

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
label_idstringใช่ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร)
directionstringไม่เฉพาะอีเมลแบบ in (ได้รับ) หรือ out (ส่ง) ละไว้เพื่อรวมทั้งสองแบบ (หนึ่งใน in, out)
inbox_idstringไม่เฉพาะอีเมลที่กล่องจดหมายนี้ได้รับ (inb_…) จัดเก็บแต่ละที่อยู่ผู้รับเข้าโฟลเดอร์ของตนเอง
fromstringไม่ผู้ส่งมีข้อความนี้ (ไม่สนตัวพิมพ์) เช่น @stripe.com (สูงสุด 200 ตัวอักษร)
tostringไม่To/Cc มีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร)
subjectstringไม่หัวเรื่องมีข้อความนี้ (ไม่สนตัวพิมพ์) (สูงสุด 200 ตัวอักษร)
skip_inboxbooleanไม่เก็บถาวรอีเมลที่ได้รับซึ่งตรงกัน เพื่อให้ปรากฏเฉพาะในโฟลเดอร์ป้ายกำกับ ไม่ปรากฏในกล่องเข้า
apply_to_existingbooleanไม่จัดเก็บอีเมลที่เก็บรักษาไว้แล้วซึ่งตรงกันด้วย
ค่าที่คืน{id: lrule_…, labelId, direction, inboxId, from, to, subject, skipInbox}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_label_rule",
  "arguments": {
    "label_id": "Billing",
    "inbox_id": "inb_123",
    "skip_inbox": true
  }
}
ทำลายข้อมูลdelete_label_rule
DELETE /labels/:label_id/rules/:rule_id

ลบกฎจัดเก็บอัตโนมัติ

DESTRUCTIVE: ลบกฎจัดเก็บอัตโนมัติหนึ่งกฎ อีเมลที่จัดเก็บไปแล้วยังคงมีป้ายกำกับ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
label_idstringใช่ID ป้ายกำกับ (ขึ้นต้นด้วย lbl_) หรือชื่อป้ายกำกับที่ตรงกันทุกตัวอักษร (สูงสุด 128 ตัวอักษร)
rule_idstringใช่ID กฎ (ขึ้นต้นด้วย lrule_) จาก get_label (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_label_rule",
  "arguments": {
    "label_id": "lbl_123",
    "rule_id": "lrule_123"
  }
}
เปลี่ยนสถานะlabel_email
POST /emails/:email_id/labels

เพิ่มหรือลบป้ายกำกับของอีเมล

ย้ายข้อความระหว่างโฟลเดอร์: เพิ่มและ/หรือลบป้ายกำกับด้วยชื่อหรือ ID lbl_… ชื่อที่ไม่รู้จักใน add จะถูกสร้างขึ้น เว้นแต่ create เป็น false

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
email_idstringใช่ID อีเมล (ขึ้นต้นด้วย em_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
addstring[]ไม่ป้ายกำกับที่จะเพิ่ม (0–10 รายการ)
removestring[]ไม่ป้ายกำกับที่จะลบ (0–10 รายการ)
createbooleanไม่สร้างป้ายกำกับที่ไม่รู้จักใน add (ค่าเริ่มต้น true)
ค่าที่คืนอีเมลที่อัปเดตแล้วพร้อม labels
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "label_email",
  "arguments": {
    "email_id": "em_123",
    "add": [
      "Billing"
    ],
    "remove": [
      "Support"
    ]
  }
}

ฉบับร่าง ไฟล์แนบ และตัวตนผู้ส่ง

อ่านอย่างเดียวlist_sending_identities
GET /sending-identities

แสดงรายการตัวตนผู้ส่งที่ยืนยันแล้ว

ที่อยู่และโดเมนที่เวิร์กสเปซนี้ส่งได้ในขณะนี้ (โดเมนที่ยืนยันแล้ว From เริ่มต้นของโดเมน และที่อยู่กล่องจดหมายที่ใช้งานอยู่) เรียกก่อน send_email เพื่อเลือก from ที่ถูกต้อง

ไม่มีพารามิเตอร์

ค่าที่คืน{domains: [ชื่อโดเมนที่ยืนยันแล้ว], addresses: [ที่อยู่ผู้ส่ง], localParts: [...]}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_sending_identities",
  "arguments": {}
}
เปลี่ยนสถานะcreate_draft
POST /drafts

สร้างฉบับร่าง

สร้างฉบับร่างของตัวเขียน ฉบับร่างเก็บไฟล์แนบได้: สร้างฉบับร่าง upload_attachment แล้ว send_email พร้อม draft_id ไม่ส่งอะไรทั้งสิ้น

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
fromstringไม่ที่อยู่ผู้ส่งบนโดเมนที่ยืนยันแล้ว (อาจว่างไว้ระหว่างร่าง)
tostring[]ไม่ผู้รับ (0–100 รายการ)
ccstring[]ไม่ผู้รับสำเนา (0–100 รายการ)
bccstring[]ไม่ผู้รับสำเนาลับ (0–100 รายการ)
subjectstringไม่หัวเรื่อง (สูงสุด 998 ตัวอักษร)
htmlstringไม่เนื้อหา HTML
textstringไม่เนื้อหาข้อความล้วน
reply_to_email_idstringไม่ID อีเมลที่ฉบับร่างนี้ตอบกลับ
thread_idstringไม่ID เธรดที่ฉบับร่างนี้อยู่ในนั้น
ค่าที่คืนออบเจ็กต์ฉบับร่าง {id: dr_…, from, to, cc, bcc, subject, html, text, attachments: []}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_draft",
  "arguments": {
    "from": "hello@example.com",
    "to": [
      "owner@example.com"
    ],
    "subject": "Invoice"
  }
}
อ่านอย่างเดียวlist_drafts
GET /drafts

แสดงรายการฉบับร่าง

แสดงรายการฉบับร่างของตัวเขียน เรียงจากที่อัปเดตล่าสุด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [ฉบับร่าง], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_drafts",
  "arguments": {}
}
อ่านอย่างเดียวget_draft
GET /drafts/:draft_id

ดึงฉบับร่าง

ดึงฉบับร่างหนึ่งฉบับพร้อมเมทาดาทาของไฟล์แนบ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
draft_idstringใช่ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืนออบเจ็กต์ฉบับร่างพร้อม attachments
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_draft",
  "arguments": {
    "draft_id": "dr_123"
  }
}
เปลี่ยนสถานะupdate_draft
PUT /drafts/:draft_id

แทนที่เนื้อหาฉบับร่าง

แทนที่เนื้อหาและผู้รับของฉบับร่าง นี่เป็นการแทนที่ทั้งหมด ฟิลด์ที่คุณละไว้จะถูกล้าง ดังนั้นให้อ่าน get_draft ก่อน แล้วส่งทุกฟิลด์ที่ต้องการเก็บไว้ ไฟล์แนบไม่ได้รับผลกระทบ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
draft_idstringใช่ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
fromstringไม่ที่อยู่ผู้ส่งบนโดเมนที่ยืนยันแล้ว (อาจว่างไว้ระหว่างร่าง)
tostring[]ไม่ผู้รับ (0–100 รายการ)
ccstring[]ไม่ผู้รับสำเนา (0–100 รายการ)
bccstring[]ไม่ผู้รับสำเนาลับ (0–100 รายการ)
subjectstringไม่หัวเรื่อง (สูงสุด 998 ตัวอักษร)
htmlstringไม่เนื้อหา HTML
textstringไม่เนื้อหาข้อความล้วน
reply_to_email_idstringไม่ID อีเมลที่ฉบับร่างนี้ตอบกลับ
thread_idstringไม่ID เธรดที่ฉบับร่างนี้อยู่ในนั้น
ค่าที่คืนออบเจ็กต์ฉบับร่างที่อัปเดตแล้ว
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_draft",
  "arguments": {
    "draft_id": "dr_123",
    "from": "hello@example.com",
    "to": [
      "owner@example.com"
    ],
    "subject": "Invoice (updated)",
    "text": "Attached."
  }
}
ทำลายข้อมูลdelete_draft
DELETE /drafts/:draft_id

ทิ้งฉบับร่าง

DESTRUCTIVE: ทิ้งฉบับร่างและลบไฟล์แนบที่จัดเก็บของฉบับร่างนั้นอย่างถาวร

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
draft_idstringใช่ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_draft",
  "arguments": {
    "draft_id": "dr_123"
  }
}
เปลี่ยนสถานะupload_attachment
POST /drafts/:draft_id/attachments

อัปโหลดไฟล์แนบไปยังฉบับร่าง

อัปโหลดหนึ่งไฟล์ไปยังฉบับร่าง (สูงสุด 10 ไฟล์และรวม 10 MB ต่อข้อความ) ระบุ content_base64 หรือ file_path ในเครื่อง ไฟล์แนบต้องใช้แพ็กเกจแบบชำระเงิน ณ เวลาส่ง

ต้องระบุอย่างน้อยหนึ่งรายการ: content_base64, file_path

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
draft_idstringใช่ID ฉบับร่าง (ขึ้นต้นด้วย dr_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
filenamestringไม่ชื่อไฟล์ที่แสดงแก่ผู้รับ ค่าเริ่มต้นคือ basename ของ file_path (สูงสุด 255 ตัวอักษร)
content_typestringไม่MIME type เช่น application/pdf ค่าเริ่มต้นคือ application/octet-stream
content_base64stringไม่เนื้อหาไฟล์แบบ base64 มาตรฐาน
file_pathstringไม่พาธสัมบูรณ์ของไฟล์ในเครื่องที่โปรเซสของ MCP server อ่านได้
ค่าที่คืน{id: att_…, filename, contentType, sizeBytes, available}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "upload_attachment",
  "arguments": {
    "draft_id": "dr_123",
    "filename": "invoice.pdf",
    "content_type": "application/pdf",
    "file_path": "/tmp/invoice.pdf"
  }
}
อ่านอย่างเดียวdownload_attachment
GET /attachments/:attachment_id

ดาวน์โหลดไฟล์แนบ

ดาวน์โหลดไฟล์แนบส่วนตัว (ที่ส่ง ได้รับ หรืออยู่ในฉบับร่าง) คืนเนื้อหาแบบ base64 หรือเขียนไฟล์เมื่อตั้ง save_to_path (จะไม่เขียนทับเว้นแต่ overwrite เป็น true)

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
attachment_idstringใช่ID ไฟล์แนบ (ขึ้นต้นด้วย att_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
save_to_pathstringไม่พาธสัมบูรณ์ในเครื่องที่จะเขียนไฟล์ลง แทนที่จะคืนเป็น base64 (ไม่บังคับ)
overwritebooleanไม่อนุญาตให้แทนที่ไฟล์ที่มีอยู่ที่ save_to_path ค่าเริ่มต้นคือ false
ค่าที่คืน{attachment_id, filename, content_type, size_bytes, content_base64} หรือ {attachment_id, filename, content_type, size_bytes, saved_to}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "download_attachment",
  "arguments": {
    "attachment_id": "att_123",
    "save_to_path": "/tmp/invoice.pdf"
  }
}
ทำลายข้อมูลdelete_attachment
DELETE /attachments/:attachment_id

ลบไฟล์แนบ

DESTRUCTIVE: ลบไฟล์แนบที่จัดเก็บไว้อย่างถาวร (เช่น นำไฟล์ออกจากฉบับร่างก่อนส่ง)

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
attachment_idstringใช่ID ไฟล์แนบ (ขึ้นต้นด้วย att_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_attachment",
  "arguments": {
    "attachment_id": "att_123"
  }
}

เทมเพลตแบบโฮสต์

อ่านอย่างเดียวlist_templates
GET /templates

แสดงรายการเทมเพลตแบบโฮสต์

แสดงรายการเทมเพลตอีเมลแบบโฮสต์พร้อมสถานะการเผยแพร่และการใช้งาน แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
lifecyclestringไม่active (ค่าเริ่มต้น) archived หรือ all (หนึ่งใน active, archived, all)
querystringไม่ค้นหาตามชื่อหรือคีย์ (สูงสุด 120 ตัวอักษร)
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [เทมเพลต], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_templates",
  "arguments": {
    "lifecycle": "active"
  }
}
เปลี่ยนสถานะcreate_template
POST /templates

สร้างเทมเพลตแบบโฮสต์

สร้างเทมเพลตพร้อมฉบับร่างที่แก้ไขได้ โดยเริ่มจากตัวเริ่มต้นได้ (welcome, reset, receipt หรือ blank) เผยแพร่ก่อนส่งด้วยคีย์

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
namestringใช่ชื่อสำหรับมนุษย์ (สูงสุด 120 ตัวอักษร)
keystringไม่คีย์การส่งที่คงที่: ตัวอักษรพิมพ์เล็ก ตัวเลข ขีดกลาง ขึ้นต้นด้วยตัวอักษร (2–64 ตัวอักษร) สร้างจากชื่อเมื่อละไว้
starterstringไม่เนื้อหาเริ่มต้น (หนึ่งใน blank, welcome, reset, receipt)
ค่าที่คืน{template, draft, activeVersion, versions, usage}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_template",
  "arguments": {
    "name": "Account welcome",
    "key": "account-welcome",
    "starter": "welcome"
  }
}
อ่านอย่างเดียวget_template
GET /templates/:template_id

ดึงเทมเพลต

ดึงฉบับร่างปัจจุบันของเทมเพลต (พร้อม revision) รุ่นที่เผยแพร่และใช้งานอยู่ ประวัติรุ่น และการใช้งาน รับ ID หรือคีย์

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID เทมเพลต (tmpl_…) หรือคีย์ (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{template, draft: {id, revision, subjectTemplate, htmlTemplate, textTemplate, variables, sampleData, …} | null, activeVersion, versions, usage}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_template",
  "arguments": {
    "template_id": "account-welcome"
  }
}
เปลี่ยนสถานะupdate_template_draft
PUT /templates/:template_id/draft

บันทึกฉบับร่างเทมเพลต

บันทึกฉบับร่างที่แก้ไขได้ของเทมเพลตโดยใช้ optimistic concurrency: ส่ง revision ปัจจุบันจาก get_template (409 หมายความว่ามีคนบันทึกก่อน ให้อ่านใหม่แล้วลองอีกครั้ง) นี่เป็นการแทนที่เนื้อหาฉบับร่างทั้งหมด ฟิลด์ที่ละไว้จะถูกล้าง ดังนั้นให้ส่งทุกฟิลด์ที่ต้องการเก็บไว้ ใช้ตัวแทน {{variable}}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
revisionintegerใช่revision ปัจจุบันของฉบับร่างจาก get_template (1–…)
namestringไม่ชื่อเทมเพลต (สูงสุด 120 ตัวอักษร)
subject_templatestringไม่หัวเรื่องพร้อมตัวแทน (สูงสุด 998 ตัวอักษร)
preheader_templatestringไม่ข้อความตัวอย่าง (สูงสุด 240 ตัวอักษร)
html_templatestringไม่เนื้อหา HTML พร้อมตัวแทน
text_templatestringไม่เนื้อหาข้อความล้วนพร้อมตัวแทน
fromstringไม่ผู้ส่งเริ่มต้นสำหรับการส่งเทมเพลตนี้
reply_tostringไม่Reply-To เริ่มต้น
variablesobject[]ไม่สัญญาตัวแปรที่มีชนิดข้อมูล แต่ละรายการ: {key (ตัวพิมพ์เล็ก/ขีดล่าง), label, type: text|number|url|boolean, required (ค่าเริ่มต้น true), fallback, description}
variables[].keystringใช่
variables[].labelstringไม่
variables[].typestringไม่(หนึ่งใน text, number, url, boolean)
variables[].requiredbooleanไม่
variables[].fallbackanyไม่
variables[].descriptionstringไม่
sample_dataobjectไม่ค่าตัวอย่างที่ใช้สำหรับการดูตัวอย่างและการทดสอบ
ค่าที่คืน{template, draft: {revision: next}, validation: {valid, findings}}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "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
POST /templates/:template_id/draft

เริ่มฉบับร่างใหม่จากรุ่นที่เผยแพร่

สร้างฉบับร่างใหม่ที่แก้ไขได้โดยคัดลอกจากรุ่นที่เผยแพร่ปัจจุบัน (409 หากมีฉบับร่างอยู่แล้วหรือยังไม่มีอะไรเผยแพร่)

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{draft}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_template_draft",
  "arguments": {
    "template_id": "account-welcome"
  }
}
อ่านอย่างเดียวrender_template
POST /templates/:template_id/render

เรนเดอร์ตัวอย่างเทมเพลต

เรนเดอร์ผลลัพธ์จริงจากเซิร์ฟเวอร์ (subject, html, text) สำหรับฉบับร่าง รุ่นที่เผยแพร่ หรือรุ่นที่ระบุ ด้วยข้อมูลที่ให้ ไม่ส่งอีเมล คืน 422 พร้อม findings เมื่อข้อมูลละเมิดสัญญาของตัวแปร

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
version_idstringไม่ID รุ่นที่ไม่บังคับ ค่าเริ่มต้นคือฉบับร่าง แล้วจึงเป็นรุ่นที่เผยแพร่
dataobjectไม่ค่าของตัวแปร ค่าเริ่มต้นคือข้อมูลตัวอย่างของรุ่นนั้น
ค่าที่คืน{subject, html, text, preheader, versionId, versionNumber, isDraft, findings}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "render_template",
  "arguments": {
    "template_id": "account-welcome",
    "data": {
      "first_name": "Asha"
    }
  }
}
ส่งอีเมลจริงsend_template_test
POST /templates/:template_id/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_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
tostring[]ใช่ผู้รับทดสอบ (1–100 รายการ)
fromstringไม่ผู้ส่งบนโดเมนที่ยืนยันแล้ว ค่าเริ่มต้นคือ From ของเทมเพลต
version_idstringไม่ID รุ่นที่ไม่บังคับ
dataobjectไม่ค่าของตัวแปร ค่าเริ่มต้นคือข้อมูลตัวอย่าง
ค่าที่คืน{id: em_…, providerMessageId, threadId, isTest: true}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "send_template_test",
  "arguments": {
    "template_id": "account-welcome",
    "to": [
      "owner@example.com"
    ]
  }
}
เปลี่ยนสถานะpublish_template
POST /templates/:template_id/publish

เผยแพร่รุ่นของเทมเพลต

เผยแพร่ฉบับร่างปัจจุบันเป็นรุ่นที่แก้ไขไม่ได้ ซึ่ง send_email ที่ใช้ template.key จะใช้ล้มเหลวด้วย findings 422 เมื่อมีข้อผิดพลาดในการตรวจสอบ หรือ 409 หากจะทำลายสัญญาตัวแปรที่ใช้งานจริงของเทมเพลตที่ใช้ในระบบจริงอยู่แล้ว

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{template, published}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "publish_template",
  "arguments": {
    "template_id": "account-welcome"
  }
}
เปลี่ยนสถานะarchive_template
POST /templates/:template_id/archive

เก็บถาวรเทมเพลต

หยุดการส่งใหม่ที่ใช้เทมเพลตนี้ (เก็บประวัติไว้ และย้อนกลับได้ด้วย restore_template) การเชื่อมต่อใด ๆ ที่ส่งด้วยคีย์นี้จะเริ่มล้มเหลวด้วย 404

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{template}
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "archive_template",
  "arguments": {
    "template_id": "account-welcome"
  }
}
เปลี่ยนสถานะrestore_template
POST /templates/:template_id/restore

กู้คืนเทมเพลตที่เก็บถาวร

ทำให้เทมเพลตที่เก็บถาวรกลับมาใช้งานได้อีกครั้ง

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
template_idstringใช่ID หรือคีย์ของเทมเพลต (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{template}
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "restore_template",
  "arguments": {
    "template_id": "account-welcome"
  }
}

โดเมนและ DNS

อ่านอย่างเดียวlist_domains
GET /domains

แสดงรายการโดเมน

แสดงรายการโดเมนผู้ส่งพร้อม setup_status รวม (verified | checking | pending) สถานะ DNS ต่อเรคคอร์ด และสถานะขาเข้า อาจช้า: โดเมนที่ยังไม่ยืนยันจะถูกตรวจสอบซ้ำแบบสด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [โดเมนพร้อมเรคคอร์ด], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_domains",
  "arguments": {}
}
อ่านอย่างเดียวget_domain
GET /domains/:domain_id

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

ดึงโดเมนหนึ่งรายการพร้อมเรคคอร์ด DNS ที่ต้องเผยแพร่ตรงตัว (type, name, value) สถานะจริงของแต่ละเรคคอร์ดจาก public resolver สองตัว dns_issues พร้อมวิธีแก้ และสถานะขาเข้า

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
domain_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{id, name, status, setup_status, dns_propagating, records: [{type, name, value, verified, dns_state}], dns_issues: [{code, message, …}], inbound_domain, inbound_status}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_domain",
  "arguments": {
    "domain_id": "dom_123"
  }
}
เปลี่ยนสถานะadd_domain
POST /domains

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

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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
namestringใช่ชื่อโดเมนเปล่า เช่น example.com หรือ mail.example.com (สูงสุด 253 ตัวอักษร)
default_fromstringไม่ที่อยู่ผู้ส่งเริ่มต้นบนโดเมนนี้ (ไม่บังคับ)
ค่าที่คืน{id: dom_…, name, status: pending, records: [...], ses: {configured}}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "add_domain",
  "arguments": {
    "name": "example.com"
  }
}
เปลี่ยนสถานะverify_domain
POST /domains/:domain_id/verify

ยืนยันโดเมน

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_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{domain, checks: {ses, dkim, dkim_status}, status: verified|pending}
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "verify_domain",
  "arguments": {
    "domain_id": "dom_123"
  }
}
ทำลายข้อมูลdelete_domain
DELETE /domains/:domain_id

ลบโดเมน

DESTRUCTIVE: ลบโดเมนออกจากเวิร์กสเปซ รวมถึงเส้นทางรับอีเมลขาเข้า การส่งจากโดเมนนี้จะล้มเหลวทันทีหลังจากนั้น ไม่ลบเรคคอร์ด DNS ที่ผู้ให้บริการ DNS ของคุณ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
domain_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_domain",
  "arguments": {
    "domain_id": "dom_123"
  }
}
อ่านอย่างเดียวget_dns_provider
GET /dns/provider

ตรวจหาผู้ให้บริการ DNS และโฮสต์ของเรคคอร์ด

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

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
domain_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{detectionStatus, detected, zone, nameservers, recordHosts: {recordId: host}, inbound, recommendations, authentication, providers: {domainConnect: {available, providerName}}}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_dns_provider",
  "arguments": {
    "domain_id": "dom_123"
  }
}

อีเมลขาเข้า

เปลี่ยนสถานะsetup_inbound
POST /domains/:domain_id/inbound/setup

เปิดใช้การรับอีเมลขาเข้าสำหรับโดเมน

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_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{domain: โดเมนรับ, status: dns_pending|ready, record: {type: MX, name, value}}
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "setup_inbound",
  "arguments": {
    "domain_id": "dom_123"
  }
}
เปลี่ยนสถานะverify_inbound
POST /domains/:domain_id/inbound/verify

ยืนยัน MX ขาเข้า

ตรวจสอบเรคคอร์ด MX ขาเข้าอีกครั้ง สถานะจะเป็น ready เมื่อ public resolver ทั้งสองตัวเห็นเรคคอร์ดนั้น

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
domain_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{domain, status: ready|dns_pending|propagating|checking, record}
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "verify_inbound",
  "arguments": {
    "domain_id": "dom_123"
  }
}
อ่านอย่างเดียวlist_inboxes
GET /inboxes

แสดงรายการที่อยู่ขาเข้า

แสดงรายการที่อยู่รับ โดยระบุเฉพาะโดเมนหนึ่งได้ แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
domain_idstringไม่ตัวกรอง ID โดเมน (ไม่บังคับ)
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{id, address, name, status, domainId}], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_inboxes",
  "arguments": {
    "domain_id": "dom_123"
  }
}
อ่านอย่างเดียวget_inbox
GET /inboxes/:inbox_id

ดึงกล่องจดหมาย

ดึงที่อยู่ขาเข้าหนึ่งรายการ

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
inbox_idstringใช่ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืนออบเจ็กต์กล่องจดหมาย
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_inbox",
  "arguments": {
    "inbox_id": "inb_123"
  }
}
เปลี่ยนสถานะcreate_inbox
POST /inboxes

สร้างที่อยู่ขาเข้า

สร้างที่อยู่ เช่น support@<receiving domain> บนโดเมนที่สถานะขาเข้าเป็น ready (รัน setup_inbound และ verify_inbound ก่อน) อีเมลที่ได้รับจะปรากฏใน list_emails โดย direction เป็น in

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
domain_idstringใช่ID โดเมน (ขึ้นต้นด้วย dom_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
local_partstringใช่ส่วนก่อน @ เช่น support (สูงสุด 64 ตัวอักษร)
namestringไม่ชื่อที่แสดง (ไม่บังคับ)
ค่าที่คืน{id: inb_…, address, name, status: active}
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_inbox",
  "arguments": {
    "domain_id": "dom_123",
    "local_part": "support",
    "name": "Support"
  }
}
เปลี่ยนสถานะupdate_inbox
PATCH /inboxes/:inbox_id

เปลี่ยนชื่อ เปิดใช้ หรือปิดใช้กล่องจดหมาย

เปลี่ยนชื่อกล่องจดหมายหรือตั้งสถานะเป็น active / disabled

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
inbox_idstringใช่ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
namestringไม่ชื่อที่แสดงใหม่
statusstringไม่สถานะใหม่ (หนึ่งใน active, disabled)
ค่าที่คืนกล่องจดหมายที่อัปเดตแล้ว
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_inbox",
  "arguments": {
    "inbox_id": "inb_123",
    "status": "disabled"
  }
}
ส่งอีเมลจริงset_inbox_forwarding
PUT /inboxes/:inbox_id/forwarding

ส่งต่อกล่องจดหมายไปยังที่อยู่อื่น

SENDS REAL EMAIL เมื่อส่งต่อไปยังผู้อื่นที่ไม่ใช่เจ้าของบัญชี: ตั้งค่าว่าจะส่งต่ออีเมลที่กล่องจดหมายได้รับไปที่ใด ที่อยู่ของเจ้าของเองจะเปิดใช้ทันที ที่อยู่อื่นจะได้รับอีเมลยืนยัน และการส่งต่อจะคงสถานะ pending จนกว่าคนที่นั่นจะยืนยัน ส่ง forward_to: null เพื่อปิดการส่งต่อ สำเนาที่ส่งต่อจะมาจากที่อยู่ของกล่องจดหมาย โดยมีผู้ส่งต้นฉบับเป็น Reply-To

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
inbox_idstringใช่ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
forward_tostring,nullใช่ที่อยู่อีเมลปลายทางของการส่งต่อ หรือ null เพื่อปิดการส่งต่อ (สูงสุด 254 ตัวอักษร)
ค่าที่คืนกล่องจดหมายพร้อม forwardTo และ forwardStatus (off, pending หรือ active)
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "set_inbox_forwarding",
  "arguments": {
    "inbox_id": "inb_123",
    "forward_to": "team@example.net"
  }
}
ทำลายข้อมูลdelete_inbox
DELETE /inboxes/:inbox_id

ลบกล่องจดหมาย

DESTRUCTIVE: ลบที่อยู่ขาเข้า อีเมลที่ได้รับไปแล้วยังคงเก็บไว้ อีเมลใหม่ที่ส่งมายังที่อยู่นั้นจะไม่ถูกจัดเก็บเข้าที่อยู่นั้นอีก

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
inbox_idstringใช่ID กล่องจดหมาย (ขึ้นต้นด้วย inb_) ตามที่เครื่องมือแสดงรายการหรือสร้างคืนมา (สูงสุด 128 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_inbox",
  "arguments": {
    "inbox_id": "inb_123"
  }
}

ความสามารถในการส่งถึง bounce และการระงับการส่ง

อ่านอย่างเดียวdeliverability_stats
GET /deliverability/stats

ดึงสถิติการส่งถึงย้อนหลัง 30 วัน

ยอดรวมย้อนหลัง 30 วันทั้งเวิร์กสเปซ: sent, delivery, bounce, complaint, reject, open, click และ deliveryRate (%)

ไม่มีพารามิเตอร์

ค่าที่คืน{window: 30d, sent, delivery, bounce, complaint, reject, open, click, deliveryRate}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "deliverability_stats",
  "arguments": {}
}
Read-onlydeliverability_account
GET /deliverability/account

Get 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
daysintegerไม่(one of 7, 30, 90)
Returns{days, trend, rolling7d, thresholds, ladder}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "deliverability_account",
  "arguments": {
    "days": 30
  }
}
Read-onlydeliverability_domains
GET /deliverability/domains

Get 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
daysintegerไม่
domainstringไม่
limitintegerไม่
offsetintegerไม่
Returns{days, data, count, limit, offset}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "deliverability_domains",
  "arguments": {
    "days": 30
  }
}
Read-onlydeliverability_senders
GET /deliverability/senders

Get sender delivery rates

Per From address: sent, delivered, hard and soft bounces, complaints, failures, and rates.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
daysintegerไม่
domainstringไม่
limitintegerไม่
offsetintegerไม่
Returns{days, data, count, limit, offset}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "deliverability_senders",
  "arguments": {
    "days": 30
  }
}
อ่านอย่างเดียวlist_sender_reputation
GET /deliverability/reputation

แสดงรายการชื่อเสียงผู้ส่ง

สถานะชื่อเสียงต่อที่อยู่ From ที่ตรงกันทุกตัวอักษร: active, throttled (ขีดจำกัดรายวันต่ำลง) หรือ paused (การส่งคืน 423) พร้อมเหตุผลและขีดจำกัดรายวัน ตรวจสอบเมื่อการส่งล้มเหลวด้วย 423 หรือ 429 แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{sender, status, dailyLimit, reason, cleanSince, warnedAt, pausedAt, evaluatedAt}], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_sender_reputation",
  "arguments": {}
}
อ่านอย่างเดียวlist_suppressions
GET /suppressions

แสดงรายการการระงับการส่ง

รายการระงับการส่ง (suppression list) ของเวิร์กสเปซ: ผู้รับที่ถูกบล็อกหลังเกิด bounce ถาวรหรือการร้องเรียนสแปม การส่งถึงผู้รับเหล่านี้ล้มเหลวด้วย 422 แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{email, reason, detail, created_at}], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_suppressions",
  "arguments": {}
}
ทำลายข้อมูลremove_suppression
DELETE /suppressions/:email

ลบการระงับการส่งจาก bounce

DESTRUCTIVE (ลดความเข้มของการบล็อกเพื่อความปลอดภัย): ลบการระงับการส่งจาก bounce เพื่อให้ส่งอีเมลถึงที่อยู่นั้นได้อีก ทำเมื่อมนุษย์ยืนยันว่าที่อยู่นั้นใช้งานได้แล้วเท่านั้น การระงับการส่งจาก complaint ลบไม่ได้ (409)

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
emailstringใช่ที่อยู่ผู้รับที่ถูกระงับการส่ง (สูงสุด 320 ตัวอักษร)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "remove_suppression",
  "arguments": {
    "email": "fixed-mailbox@example.net"
  }
}
อ่านอย่างเดียวlist_blocked_recipients
GET /blocked-recipients

แสดงรายการผู้รับที่ถูกบล็อก

ทุกผู้รับที่ SendHQ จะปฏิเสธ: bounce, complaint และการยกเลิกการรับอีเมลการตลาดที่จำกัดตามโดเมน พร้อมสรุปตามประเภท อ่านสูงสุด 500 รายการล่าสุด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{email, domain, kind: bounce|complaint|unsubscribe, reason, detail, source, status, created_at}], count, summary: {total, bounce, complaint, unsubscribe}, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_blocked_recipients",
  "arguments": {}
}

Campaigns

Read-onlylist_contacts
GET /contacts

List 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_idstringไม่Only members of this list (lst_…).
statusstringไม่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)
querystringไม่Email or name contains this text; * is a wildcard on the email. (max 200 chars)
tagstringไม่Only contacts with this tag. (max 60 chars)
sourcestringไม่How the contact was added. (one of form, api, import)
afterstringไม่Signed up at or after this time. ISO 8601 date or date-time. (max 40 chars)
beforestringไม่Signed up before this time. ISO 8601 date or date-time. (max 40 chars)
segment_idstringไม่Only contacts matching this saved segment (seg_…).
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [contacts with tags, engagement, dormant, country], count, total, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_contacts",
  "arguments": {
    "status": "subscribed"
  }
}
Changes statecreate_contact
POST /contacts

Add 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
emailstringใช่Email address. (max 320 chars)
namestringไม่Display name; the first word is {{first_name}}. (max 200 chars)
fieldsobjectไม่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.
tagsstring[]ไม่Tags to attach, e.g. ["VIP"]. Up to 50. (0–50 items)
list_idsstring[]ไม่Lists to add the contact to (lst_…). (0–100 items)
statusstringไม่subscribed (default, requires consent_basis) or unsubscribed. (one of subscribed, unsubscribed)
consent_basisstringไม่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)
ReturnsThe contact.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_contact",
  "arguments": {
    "email": "ada@example.net",
    "name": "Ada Lovelace",
    "consent_basis": "Ticked the newsletter box at checkout on acme.com"
  }
}
Read-onlyget_contact
GET /contacts/:contact_id

Get 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_idstringใช่Contact ID (starts with ct_) or the contact's email address. (max 320 chars)
ReturnsThe contact.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_contact",
  "arguments": {
    "contact_id": "ct_123"
  }
}
Changes stateupdate_contact
PATCH /contacts/:contact_id

Update, 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_idstringใช่Contact ID (starts with ct_) or the contact's email address. (max 320 chars)
namestringไม่New display name. (max 200 chars)
fieldsobjectไม่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.
tagsstring[]ไม่Replace all of the contact's tags with these. (0–50 items)
add_tagsstring[]ไม่Tags to add. (0–50 items)
remove_tagsstring[]ไม่Tags to remove. (0–50 items)
statusstringไม่Only unsubscribed is accepted. (one of unsubscribed)
ReturnsThe updated contact.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_contact",
  "arguments": {
    "contact_id": "ct_123",
    "fields": {
      "plan": "team"
    }
  }
}
Destructivedelete_contact
DELETE /contacts/:contact_id

Delete 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_idstringใช่Contact ID (starts with ct_) or the contact's email address. (max 320 chars)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_contact",
  "arguments": {
    "contact_id": "ct_123"
  }
}
Changes stateimport_contacts
POST /contact-imports

Import 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
csvstringใช่The CSV file content, header row first. (max 5242880 chars)
list_idstringไม่Add every accepted row to this list (lst_…).
consent_basisstringใช่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)
tagsstring[]ไม่Tags to add to every accepted row, e.g. ["imported-2026-11"]. (0–50 items)
update_existingbooleanไม่Merge names and fields into contacts that already exist. Their status never changes.
Returns{id, accepted, created, existing, skipped, invalid, errors: [{line, reason}], tags}.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "import_contacts",
  "arguments": {
    "csv": "email,name\nada@example.net,Ada Lovelace\n",
    "consent_basis": "Newsletter signups exported from Mailchimp (double opt-in)"
  }
}
Read-onlylist_contact_imports
GET /contact-imports

List contact imports

Campaigns: Recent CSV imports with their consent basis and row counts.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [imports], count, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_contact_imports",
  "arguments": {}
}
Destructivebulk_update_contacts
POST /contacts/bulk

Bulk 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
actionstringใช่What to do. (one of tag, untag, add_to_list, remove_from_list, unsubscribe, delete)
contact_idsstring[]ไม่Contact IDs (ct_…). Use this or filter. (0–10000 items)
filterobjectไม่Everyone matching these list_contacts filters. Use this or contact_ids.
filter.list_idstringไม่Members of this list.
filter.statusstringไม่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.querystringไม่Email or name contains; * is an email wildcard. (max 200 chars)
filter.tagstringไม่Has this tag. (max 60 chars)
filter.sourcestringไม่How the contact was added. (one of form, api, import)
filter.afterstringไม่Signed up at or after. ISO 8601 date or date-time. (max 40 chars)
filter.beforestringไม่Signed up before. ISO 8601 date or date-time. (max 40 chars)
filter.segment_idstringไม่Matches this segment.
tagsstring[]ไม่For tag and untag. (0–50 items)
list_idstringไม่For add_to_list and remove_from_list (lst_…).
confirm_countintegerไม่For delete: the number of contacts that will be deleted, from the 409 response. (0–…)
Returns{ok, action, count}; for an unconfirmed delete, a 409 error whose message gives the count.
AnnotationsdestructiveHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "bulk_update_contacts",
  "arguments": {
    "action": "tag",
    "tags": [
      "october"
    ],
    "filter": {
      "list_id": "lst_123",
      "status": "subscribed"
    }
  }
}
Read-onlylist_tags
GET /tags

List contact tags

Campaigns: The workspace's contact tags, most used first, with how many contacts carry each (up to 500). Paginated.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [{tag, count}], count, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_tags",
  "arguments": {}
}
Read-onlylist_contact_fields
GET /contact-fields

List 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [{key, label, type, createdAt}], count, types, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_contact_fields",
  "arguments": {}
}
Changes stateset_contact_field
PUT /contact-fields/:field_key

Define 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_keystringใช่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)
labelstringไม่Label shown in the dashboard. Defaults to the key. (max 80 chars)
typestringไม่text (default), number, or date. (one of text, number, date)
Returns{key, label, type, createdAt}.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "set_contact_field",
  "arguments": {
    "field_key": "plan",
    "label": "Plan",
    "type": "text"
  }
}
Destructivedelete_contact_field
DELETE /contact-fields/:field_key

Delete 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_keystringใช่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)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_contact_field",
  "arguments": {
    "field_key": "plan"
  }
}
Read-onlylist_segments
GET /segments

List 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [{id, name, match, conditions, count}], count, fields, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_segments",
  "arguments": {}
}
Read-onlyget_segment
GET /segments/:segment_id

Get a segment

Campaigns: One segment with its conditions and live count.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
segment_idstringใช่Segment ID (starts with seg_), as returned by list_segments or create_segment. (max 128 chars)
Returns{id, name, match, conditions, count}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_segment",
  "arguments": {
    "segment_id": "seg_123"
  }
}
Read-onlypreview_segment
POST /segments/preview

Preview 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
matchstringไม่all (default): every condition must match. any: at least one. (one of all, any)
conditionsobject[]ไม่Up to 20 conditions. Opened and clicked use bot-filtered, estimated engagement. (0–20 items)
conditions[].fieldstringใช่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[].keystringไม่Custom field key when field is field. (max 40 chars)
conditions[].opstringใช่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[].valuestring,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.
Returns{count, sample: [contacts]}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "preview_segment",
  "arguments": {
    "match": "all",
    "conditions": [
      {
        "field": "tag",
        "op": "has",
        "value": "VIP"
      },
      {
        "field": "opened",
        "op": "in_last_days",
        "value": 90
      }
    ]
  }
}
Changes statecreate_segment
POST /segments

Create 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
namestringใช่Segment name. (max 120 chars)
matchstringไม่all (default): every condition must match. any: at least one. (one of all, any)
conditionsobject[]ไม่Up to 20 conditions. Opened and clicked use bot-filtered, estimated engagement. (0–20 items)
conditions[].fieldstringใช่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[].keystringไม่Custom field key when field is field. (max 40 chars)
conditions[].opstringใช่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[].valuestring,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.
ReturnsThe segment with its count.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_segment",
  "arguments": {
    "name": "Engaged pro customers",
    "conditions": [
      {
        "field": "fields.plan",
        "op": "equals",
        "value": "pro"
      },
      {
        "field": "opened",
        "op": "in_last_days",
        "value": 90
      }
    ]
  }
}
Changes stateupdate_segment
PATCH /segments/:segment_id

Update 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_idstringใช่Segment ID (starts with seg_), as returned by list_segments or create_segment. (max 128 chars)
namestringไม่Segment name. (max 120 chars)
matchstringไม่all (default): every condition must match. any: at least one. (one of all, any)
conditionsobject[]ไม่Up to 20 conditions. Opened and clicked use bot-filtered, estimated engagement. (0–20 items)
conditions[].fieldstringใช่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[].keystringไม่Custom field key when field is field. (max 40 chars)
conditions[].opstringใช่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[].valuestring,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.
ReturnsThe updated segment with its count.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_segment",
  "arguments": {
    "segment_id": "seg_123",
    "name": "Pro customers"
  }
}
Destructivedelete_segment
DELETE /segments/:segment_id

Delete 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_idstringใช่Segment ID (starts with seg_), as returned by list_segments or create_segment. (max 128 chars)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_segment",
  "arguments": {
    "segment_id": "seg_123"
  }
}
Read-onlylist_lists
GET /lists

List contact lists

Campaigns: Contact lists with subscribed, pending, and unsubscribed counts and their hosted signup form settings.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [lists], count, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_lists",
  "arguments": {}
}
Changes statecreate_list
POST /lists

Create 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
namestringใช่List name, shown on the signup form. (max 200 chars)
descriptionstringไม่Short description shown on the signup form. (max 500 chars)
form_enabledbooleanไม่Publish the hosted signup form.
form_fromstringไม่Sender of signup confirmation emails, e.g. Acme <news@example.com>, on a verified domain. (max 320 chars)
redirect_urlstringไม่https page to open after a signup is confirmed. (max 500 chars)
welcomeobjectไม่Welcome email sent once, from form_from, when someone confirms a signup. Needs subject and html or markdown when enabled.
welcome.enabledbooleanไม่Send it.
welcome.subjectstringไม่Subject; merge tags allowed. (max 300 chars)
welcome.htmlstringไม่HTML body; merge tags allowed. (max 500000 chars)
welcome.markdownstringไม่Markdown body instead of html, rendered with the workspace design. (max 200000 chars)
siteobjectไม่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.enabledbooleanไม่Publish the site.
site.slugstring,nullไม่Address after /n/ (3-48 characters, a-z, 0-9, -). Defaults to the list name. (max 48 chars)
site.titlestring,nullไม่Site title. Defaults to the list name. (max 120 chars)
site.descriptionstring,nullไม่Short description under the title. (max 300 chars)
site.accentstring,nullไม่Accent color, e.g. #0a7d4f.
ReturnsThe list.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "create_list",
  "arguments": {
    "name": "Product updates"
  }
}
Read-onlyget_list
GET /lists/:list_id

Get a list

Campaigns: One list with member counts and signup form settings.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
list_idstringใช่List ID (starts with lst_), as returned by a list or create tool. (max 128 chars)
ReturnsThe list.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_list",
  "arguments": {
    "list_id": "lst_123"
  }
}
Changes stateupdate_list
PATCH /lists/:list_id

Update 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_idstringใช่List ID (starts with lst_), as returned by a list or create tool. (max 128 chars)
namestringไม่New name. (max 200 chars)
descriptionstringไม่New description. (max 500 chars)
form_enabledbooleanไม่Publish or unpublish the hosted signup form.
form_fromstringไม่Sender of signup confirmation emails, on a verified domain. (max 320 chars)
redirect_urlstringไม่https page to open after a signup is confirmed. (max 500 chars)
welcomeobjectไม่Welcome email sent once, from form_from, when someone confirms a signup. Needs subject and html or markdown when enabled.
welcome.enabledbooleanไม่Send it.
welcome.subjectstringไม่Subject; merge tags allowed. (max 300 chars)
welcome.htmlstringไม่HTML body; merge tags allowed. (max 500000 chars)
welcome.markdownstringไม่Markdown body instead of html, rendered with the workspace design. (max 200000 chars)
siteobjectไม่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.enabledbooleanไม่Publish the site.
site.slugstring,nullไม่Address after /n/ (3-48 characters, a-z, 0-9, -). Defaults to the list name. (max 48 chars)
site.titlestring,nullไม่Site title. Defaults to the list name. (max 120 chars)
site.descriptionstring,nullไม่Short description under the title. (max 300 chars)
site.accentstring,nullไม่Accent color, e.g. #0a7d4f.
ReturnsThe updated list.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_list",
  "arguments": {
    "list_id": "lst_123",
    "form_enabled": false
  }
}
Destructivedelete_list
DELETE /lists/:list_id

Delete 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_idstringใช่List ID (starts with lst_), as returned by a list or create tool. (max 128 chars)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_list",
  "arguments": {
    "list_id": "lst_123"
  }
}
Changes stateadd_list_contacts
POST /lists/:list_id/contacts

Add 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_idstringใช่List ID (starts with lst_), as returned by a list or create tool. (max 128 chars)
contact_idsstring[]ไม่Contact IDs (ct_…). (0–500 items)
emailsstring[]ไม่Contact email addresses. (0–500 items)
Returns{listId, added, notFound, list}.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "add_list_contacts",
  "arguments": {
    "list_id": "lst_123",
    "emails": [
      "ada@example.net"
    ]
  }
}
Destructiveremove_list_contact
DELETE /lists/:list_id/contacts/:contact_id

Remove a contact from a list

DESTRUCTIVE: remove one contact from a list. The contact and its status are kept. Part of Campaigns.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
list_idstringใช่List ID (starts with lst_), as returned by a list or create tool. (max 128 chars)
contact_idstringใช่Contact ID (starts with ct_) or the contact's email address. (max 320 chars)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "remove_list_contact",
  "arguments": {
    "list_id": "lst_123",
    "contact_id": "ct_123"
  }
}
Read-onlylist_broadcasts
GET /broadcasts

List broadcasts

Campaigns: Newest-first broadcasts with their status. Paginated: the result includes pagination.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
statusstringไม่Only broadcasts with this status. (one of draft, sending, sent, cancelled, failed)
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [broadcasts], count, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_broadcasts",
  "arguments": {}
}
Changes statecreate_broadcast
POST /broadcasts

Create 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
namestringไม่Internal name. Defaults to the subject. (max 200 chars)
list_idstringไม่The list to send to (lst_…).
fromstringไม่Sender on a verified domain, e.g. Acme <news@example.com>. (max 320 chars)
reply_tostringไม่Reply-To address. (max 320 chars)
subjectstringไม่Subject line; merge tags allowed. (max 998 chars)
preview_textstringไม่Inbox preview text shown after the subject. (max 300 chars)
htmlstringไม่HTML body; merge tags allowed and escaped.
textstringไม่Plain-text body; merge tags allowed.
templateobjectไม่A published hosted template instead of subject/html/text. Template variables are filled from the contact's name, email, and fields.
template.idstringไม่
template.keystringไม่
template.version_idstringไม่
markdownstringไม่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)
contentobject,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.
editorstringไม่Which editor the dashboard opens: html or blocks. Set automatically for markdown and content. (one of html, blocks)
audienceobjectไม่Who gets it, within the list. Subscribed, non-dormant members only.
audience.segment_idstring,nullไม่Only list members matching this segment (seg_…), or null for the whole list.
audience.orderstringไม่With a limit: signup (default) or engaged (most engaged first). (one of signup, engaged)
audience.limitinteger,nullไม่Send to at most this many people (send_broadcast_to_more sends to more later), or null for everyone. (1–10000000)
trackingobjectไม่Open and click tracking, both on by default. Opens are estimates (bot-filtered pixel loads), never proof that someone read the email.
tracking.opensbooleanไม่Add an open pixel.
tracking.clicksbooleanไม่Rewrite links to signed SendHQ redirects (the unsubscribe link never is).
webobjectไม่Publish this issue on the list's newsletter site (see create_list site) once it is sent.
web.enabledbooleanไม่Publish it.
web.slugstring,nullไม่Issue address; defaults to the subject. (max 100 chars)
web.pinnedbooleanไม่Keep it at the top of the site.
ReturnsThe draft broadcast.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "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
    }
  }
}
Read-onlyget_broadcast
GET /broadcasts/:broadcast_id

Get 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
ReturnsThe broadcast.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_broadcast",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Changes stateupdate_broadcast
PATCH /broadcasts/:broadcast_id

Edit 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
namestringไม่Internal name. (max 200 chars)
list_idstringไม่The list to send to.
fromstringไม่Sender on a verified domain. (max 320 chars)
reply_tostringไม่Reply-To address. (max 320 chars)
subjectstringไม่หัวเรื่อง (สูงสุด 998 ตัวอักษร)
preview_textstringไม่Inbox preview text. (max 300 chars)
htmlstringไม่เนื้อหา HTML
textstringไม่เนื้อหาข้อความล้วน
templateobject,nullไม่A published hosted template, or null to remove it.
markdownstringไม่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)
contentobject,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.
editorstringไม่Which editor the dashboard opens: html or blocks. Set automatically for markdown and content. (one of html, blocks)
audienceobjectไม่Who gets it, within the list. Subscribed, non-dormant members only.
audience.segment_idstring,nullไม่Only list members matching this segment (seg_…), or null for the whole list.
audience.orderstringไม่With a limit: signup (default) or engaged (most engaged first). (one of signup, engaged)
audience.limitinteger,nullไม่Send to at most this many people (send_broadcast_to_more sends to more later), or null for everyone. (1–10000000)
trackingobjectไม่Open and click tracking, both on by default. Opens are estimates (bot-filtered pixel loads), never proof that someone read the email.
tracking.opensbooleanไม่Add an open pixel.
tracking.clicksbooleanไม่Rewrite links to signed SendHQ redirects (the unsubscribe link never is).
webobjectไม่Publish this issue on the list's newsletter site (see create_list site) once it is sent.
web.enabledbooleanไม่Publish it.
web.slugstring,nullไม่Issue address; defaults to the subject. (max 100 chars)
web.pinnedbooleanไม่Keep it at the top of the site.
ReturnsThe updated draft.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_broadcast",
  "arguments": {
    "broadcast_id": "bc_123",
    "subject": "October product update"
  }
}
Destructivedelete_broadcast
DELETE /broadcasts/:broadcast_id

Delete a draft broadcast

DESTRUCTIVE: permanently delete a draft broadcast. Broadcasts that were sent cannot be deleted. Part of Campaigns.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
broadcast_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
ค่าที่คืน{ok: true}
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "delete_broadcast",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Sends real emailsend_broadcast
POST /broadcasts/:broadcast_id/send

Send 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
idempotency_keystringไม่เฮดเดอร์ Idempotency-Key ใช้ซ้ำเฉพาะเพื่อลองคำขอนี้ใหม่เท่านั้น (สูงสุด 200 ตัวอักษร)
ReturnsThe broadcast with status sending and totals.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "send_broadcast",
  "arguments": {
    "broadcast_id": "bc_123",
    "idempotency_key": "october-update"
  }
}
Destructivecancel_broadcast
POST /broadcasts/:broadcast_id/cancel

Cancel 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
ReturnsThe cancelled broadcast with totals.
AnnotationdestructiveHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "cancel_broadcast",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Read-onlylist_broadcast_recipients
GET /broadcasts/:broadcast_id/recipients

List 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
statusstringไม่Only recipients with this outcome. (one of queued, sending, sent, held, skipped, failed)
activitystringไม่Only recipients who did this. (one of opened, clicked, not_opened, not_delivered, bounced, complained, unsubscribed)
querystringไม่Recipient email contains this text. (max 200 chars)
includestringไม่links adds the links each recipient clicked (implied by activity: clicked). (one of links)
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [{contactId, email, status, skipReason, emailId, error, provider, deliveredAt, openedAt, clickedAt, opens, clicks, bouncedAt, complainedAt, unsubscribedAt, links?}], count, totals, pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_broadcast_recipients",
  "arguments": {
    "broadcast_id": "bc_123",
    "status": "failed"
  }
}
Read-onlycheck_broadcast
GET /broadcasts/:broadcast_id/checks

Run 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
Returns{ready, checks: [{id, level: ok|warn|block, label, detail}], audience: {total, matching}}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "check_broadcast",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Sends real emailsend_broadcast_test
POST /broadcasts/:broadcast_id/test

Send 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
tostring[]ไม่Test recipients (up to 5). (1–5 items)
contact_idstringไม่Fill merge tags from this contact (ct_…). (max 320 chars)
rememberbooleanไม่Save to as the default test recipients.
Returns{data: [{to, id, status: sent|failed, error?}]}.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "send_broadcast_test",
  "arguments": {
    "broadcast_id": "bc_123",
    "to": [
      "owner@example.com"
    ]
  }
}
Sends real emailschedule_broadcast
POST /broadcasts/:broadcast_id/schedule

Schedule 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
scheduled_atstringใช่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)
ReturnsThe broadcast with scheduledAt.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "schedule_broadcast",
  "arguments": {
    "broadcast_id": "bc_123",
    "scheduled_at": "2026-11-10T09:00:00Z"
  }
}
Changes stateunschedule_broadcast
POST /broadcasts/:broadcast_id/unschedule

Unschedule 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
ReturnsThe draft broadcast.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "unschedule_broadcast",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Changes stateduplicate_broadcast
POST /broadcasts/:broadcast_id/duplicate

Duplicate 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
ReturnsThe new draft broadcast.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "duplicate_broadcast",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Sends real emailsend_broadcast_to_more
POST /broadcasts/:broadcast_id/send-more

Send 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
limitintegerใช่How many more people at most. (1–10000000)
idempotency_keystringไม่เฮดเดอร์ Idempotency-Key ใช้ซ้ำเฉพาะเพื่อลองคำขอนี้ใหม่เท่านั้น (สูงสุด 200 ตัวอักษร)
Returns{added, broadcast}.
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "send_broadcast_to_more",
  "arguments": {
    "broadcast_id": "bc_123",
    "limit": 500,
    "idempotency_key": "october-update-more-1"
  }
}
Read-onlyget_broadcast_report
GET /broadcasts/:broadcast_id/report

Get 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_idstringใช่Broadcast ID (starts with bc_), as returned by a list or create tool. (max 128 chars)
Returns{stats: {sent, delivered, opened, clicked, bounced, complained, unsubscribed, opens, clicks, rates}, providers, links, timeline, average, machine, tracking, totals, remaining}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_broadcast_report",
  "arguments": {
    "broadcast_id": "bc_123"
  }
}
Read-onlyget_newsletter_settings
GET /newsletter-settings

Get 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.

ไม่มีพารามิเตอร์

Returns{postalAddress, design: {accentColor, font, align}, cleanup: {enabled, afterSends, quietDays, subject, body, from}, testRecipients}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_newsletter_settings",
  "arguments": {}
}
Changes stateupdate_newsletter_settings
PATCH /newsletter-settings

Update 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_addressstringไม่Sender's postal address for the footer. Empty string removes it. (max 300 chars)
designobjectไม่Rendering design for Markdown and block content.
design.accentColorstring,nullไม่Hex color like #0a7d4f, or null for the default.
design.fontstringไม่Font family. (one of sans, serif, mono)
design.alignstringไม่Text alignment. (one of left, center)
cleanupobjectไม่List cleanup of readers who stopped opening.
cleanup.enabledbooleanไม่Turn list cleanup on or off.
cleanup.afterSendsintegerไม่Broadcasts in a row without an open or click (3-50). (3–50)
cleanup.quietDaysintegerไม่Days without engagement (30-730). (30–730)
cleanup.subjectstring,nullไม่Subject of the cleanup email; merge tags allowed. (max 200 chars)
cleanup.bodystring,nullไม่Body text of the cleanup email. (max 2000 chars)
cleanup.fromstring,nullไม่Sender on a verified domain. Defaults to the last sent broadcast's sender. (max 320 chars)
test_recipientsstring[]ไม่Default addresses for send_broadcast_test (up to 5). (0–5 items)
ReturnsThe updated settings.
AnnotationidempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "update_newsletter_settings",
  "arguments": {
    "postal_address": "Acme Inc., 1 Main St, Springfield",
    "design": {
      "accentColor": "#0a7d4f"
    }
  }
}
Read-onlyget_campaign_overview
GET /campaigns/overview

Get 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
daysintegerไม่Window in days, 7 to 365. Defaults to 30. (7–365)
Returns{subscribers: {active, dormant, pending, joined, left}, series: [{day, subscribers, joined, left}], recent: [{id, name, subject, status, startedAt, sent, openRate, clickRate}], averages}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_campaign_overview",
  "arguments": {
    "days": 30
  }
}
Read-onlylist_uploaded_images
GET /uploads/images

List 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.

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
Returns{data: [{id, url, width, height, size, filename, createdAt}], pagination}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_uploaded_images",
  "arguments": {}
}

บัญชี การใช้งาน การวิเคราะห์ และคีย์

อ่านอย่างเดียวget_account
GET /account

ดึงบัญชี การใช้งาน และการเรียกเก็บเงิน

อีเมลเจ้าของบัญชี แพ็กเกจ/ระดับการเข้าถึง การส่งถึงผู้รับในรอบปัจจุบันที่ใช้ไปเทียบกับโควตา โดเมนที่ใช้เทียบกับขีดจำกัด การถ่ายโอนไฟล์แนบ สรุปชื่อเสียง สถานะการสมัคร แพ็กเกจที่เผยแพร่ และจำนวนของเวิร์กสเปซ ใช้ตรวจสอบโควตาที่เหลือหรือผู้ที่ช่วงทดลองส่งถึงได้ (อีเมลของบัญชี)

ไม่มีพารามิเตอร์

ค่าที่คืน{user: {email, …}, usage: {domainsUsed, domainLimit, recipientDeliveries, emailQuotaMonth, attachmentBytes, attachmentByteLimit, periodKey}, access: {tier, planCode}, reputation, infrastructure, billing: {status, subscriptions, …}, plans, workspace: {mailer, stats}}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_account",
  "arguments": {}
}
Read-onlyget_account_diagnostics
GET /account/diagnostics

Diagnose 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.

ไม่มีพารามิเตอร์

Returns{generatedAt, windowDays, issues: [{severity, code, message}], plan: {tier, usage, sendingLimit}, domains: [{name, status, dkim: {required, verified, missing}, inbound}], sendingIdentities, inbound, deliverability: {sent, delivered, bounced, complained, rates, senders}, suppressions: {total, byReason, unsubscribes, recent}, failures: {notSent, recentNotSent, recentProviderEvents}, webhooks}.
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_account_diagnostics",
  "arguments": {}
}
อ่านอย่างเดียวget_analytics
GET /analytics

ดึงการวิเคราะห์การส่ง

การวิเคราะห์ในแดชบอร์ดสำหรับ 7, 30 หรือ 90 วันที่ผ่านมา: ยอดรวมของ sent/received/delivered/bounced/blocked/opened/clicked/complaint ไทม์ไลน์รายวัน โดเมนผู้ส่งอันดับต้น และหัวเรื่องอันดับต้น

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
daysintegerไม่ช่วงเวลาเป็นวัน: 7, 30 (ค่าเริ่มต้น) หรือ 90 (หนึ่งใน 7, 30, 90)
ค่าที่คืน{window, days, metrics, timeline: [{day, sent, received}], domains, topContent}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_analytics",
  "arguments": {
    "days": 30
  }
}
อ่านอย่างเดียวlist_api_keys
GET /keys

แสดงรายการเมทาดาทาของ API key

แสดงรายการชื่อ API key คำนำหน้าที่ไม่เป็นความลับ และเวลาใช้งานล่าสุด อ่านอย่างเดียว: MCP server นี้สร้าง หมุนเวียน หรือเพิกถอนคีย์ไม่ได้ มนุษย์เป็นผู้ทำในแดชบอร์ด แบ่งหน้า: ผลลัพธ์มี pagination {offset, limit, returned, total?, has_more, next_offset}

พารามิเตอร์ชนิดจำเป็นคำอธิบาย
limitintegerไม่ขนาดหน้า ค่าเริ่มต้นคือ 50 (ค่าเริ่มต้น 50; 1–200)
offsetintegerไม่จำนวนระเบียนที่จะข้าม ใช้ pagination.next_offset จากหน้าก่อนหน้า (ค่าเริ่มต้น 0; 0–…)
ค่าที่คืน{data: [{id, name, prefix, lastUsedAt, createdAt}], count, pagination}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "list_api_keys",
  "arguments": {}
}
อ่านอย่างเดียวget_service_health
GET /health

ตรวจสอบสถานะบริการ SendHQ

ตรวจสอบว่า SendHQ API ทำงานอยู่และผู้ให้บริการอีเมลรายใดใช้งานอยู่ ไม่ต้องใช้ API key ที่ถูกต้อง

ไม่มีพารามิเตอร์

ค่าที่คืน{ok, service, mailer}
AnnotationreadOnlyHint idempotentHint
ตัวอย่างพารามิเตอร์ของ tools/call
{
  "name": "get_service_health",
  "arguments": {}
}

รายการความครอบคลุมของ API

ทุกการดำเนินการใน API สาธารณะและเครื่องมือที่ครอบคลุม ทุกอย่างที่ผู้ใช้ทำได้ในแดชบอร์ดและมี API จะถูกครอบคลุม ส่วนที่ยกเว้นด้านล่างเป็นการเจตนา

Endpointเครื่องมือหมายเหตุ
POST /emailssend_emailส่งอีเมลหนึ่งฉบับ
POST /emails/batchsend_batchส่งข้อความที่ปรับแต่งเฉพาะรายได้สูงสุด 100 ฉบับ
GET /emailslist_emailsแสดงรายการอีเมลที่ส่งและได้รับ
GET /emails/:idget_emailดึงอีเมลและไฟล์แนบ
PATCH /emails/:idmark_emailอัปเดตสถานะอ่านแล้ว การเก็บถาวร สแปม หมวดหมู่ หรือความสำคัญ
POST /emails/:id/labelslabel_emailเพิ่มหรือลบป้ายกำกับของอีเมล
DELETE /emails/:iddelete_emailลบอีเมลที่เก็บรักษาไว้
GET /emails/:id/eventslist_email_eventsแสดงรายการอีเวนต์การส่งของอีเมลฉบับหนึ่ง
GET /threads/:idget_threadดึงบทสนทนาเรียงตามลำดับเวลา
GET /labelslist_labelsแสดงรายการป้ายกำกับพร้อมจำนวนข้อความและกฎการจัดเก็บ
POST /labelscreate_labelสร้างป้ายกำกับ โดยเลือกใส่กฎจัดเก็บอัตโนมัติได้
GET /labels/:idget_labelดึงป้ายกำกับด้วย ID หรือชื่อ
PATCH /labels/:idupdate_labelเปลี่ยนชื่อ เปลี่ยนสี หรือเปลี่ยนป้ายกำกับให้เป็น bucket
DELETE /labels/:iddelete_labelลบป้ายกำกับโดยไม่ลบอีเมล
POST /labels/:id/rulescreate_label_ruleเพิ่มกฎจัดเก็บอัตโนมัติให้ป้ายกำกับ
DELETE /labels/:id/rules/:rule_iddelete_label_ruleลบกฎจัดเก็บอัตโนมัติ
POST /draftscreate_draftสร้างฉบับร่างในตัวเขียนอีเมล
GET /draftslist_draftsแสดงรายการฉบับร่างในตัวเขียนอีเมล
GET /drafts/:idget_draftดึงฉบับร่างและไฟล์แนบ
PUT /drafts/:idupdate_draftแทนที่เนื้อหาฉบับร่าง
DELETE /drafts/:iddelete_draftทิ้งฉบับร่าง
POST /drafts/:id/attachmentsupload_attachmentอัปโหลดไฟล์แนบไปยังฉบับร่าง
GET /attachments/:iddownload_attachmentดาวน์โหลดไฟล์แนบส่วนตัว
DELETE /attachments/:iddelete_attachmentลบไฟล์แนบส่วนตัว
GET /sending-identitieslist_sending_identitiesแสดงรายการตัวตนผู้ส่งที่ยืนยันแล้ว
GET /templateslist_templatesแสดงรายการเทมเพลตแบบโฮสต์
POST /templatescreate_templateสร้างเทมเพลตแบบโฮสต์
GET /templates/:idget_templateดึงฉบับร่าง รุ่นที่เผยแพร่ และการใช้งาน
PUT /templates/:id/draftupdate_template_draftบันทึกฉบับร่างของเทมเพลตอัตโนมัติ
POST /templates/:id/draftcreate_template_draftสร้างฉบับร่างใหม่จากรุ่นที่เผยแพร่
POST /templates/:id/renderrender_templateเรนเดอร์ผลลัพธ์จริงจากเซิร์ฟเวอร์
POST /templates/:id/testsend_template_testส่งสแนปชอตทดสอบ
POST /templates/:id/publishpublish_templateเผยแพร่รุ่นเทมเพลตที่แก้ไขไม่ได้
POST /templates/:id/archivearchive_templateเก็บถาวรเทมเพลต
POST /templates/:id/restorerestore_templateกู้คืนเทมเพลตที่เก็บถาวร
POST /domainsadd_domainเพิ่มโดเมนผู้ส่ง
GET /domainslist_domainsแสดงรายการโดเมนและสถานะ DNS ที่แคชไว้
GET /domains/:idget_domainดึงรายละเอียดการตั้งค่าโดเมน
POST /domains/:id/verifyverify_domainRefresh domain and DNS verification
POST /domains/:id/inbound/setupsetup_inboundProvision inbound receiving
POST /domains/:id/inbound/verifyverify_inboundยืนยันการกำหนดเส้นทาง MX ขาเข้า
DELETE /domains/:iddelete_domainลบโดเมน
GET /dns/providerget_dns_providerตรวจหาผู้ให้บริการ DNS ที่เป็นผู้มีอำนาจและโฮสต์แบบสัมพัทธ์ของเรคคอร์ด
GET /dns/domain-connect/connectget_domain_connect_linkสร้างลิงก์ขอความยินยอม Domain Connect สำหรับตั้งค่า DNS แบบคลิกเดียว
POST /inboxescreate_inboxสร้างที่อยู่ขาเข้า
GET /inboxeslist_inboxesแสดงรายการที่อยู่ขาเข้า
GET /inboxes/:idget_inboxดึงข้อมูลที่อยู่ขาเข้า
PATCH /inboxes/:idupdate_inboxเปลี่ยนชื่อ เปิดใช้ หรือปิดใช้กล่องจดหมาย
PUT /inboxes/:id/forwardingset_inbox_forwardingส่งต่ออีเมลที่กล่องจดหมายได้รับไปยังที่อยู่อื่น
DELETE /inboxes/:iddelete_inboxลบกล่องจดหมายโดยเก็บข้อความไว้
GET /deliverability/statsdeliverability_statsดึงสถิติการส่งถึงย้อนหลัง 30 วัน
GET /deliverability/reputationlist_sender_reputationแสดงสถานะชื่อเสียงตามตัวตนผู้ส่งที่ตรงกันทุกตัวอักษร
GET /deliverability/accountdeliverability_accountAccount delivery rates, daily ladder, and bounce trend
GET /deliverability/domainsdeliverability_domainsPer-domain sent, delivered, hard and soft bounces, complaints, and failures
GET /deliverability/sendersdeliverability_sendersPer-From-address delivery rates
GET /emails/:id/deliveryemail_deliveryDelivery timeline for one email, with bounce and complaint reasons
GET /threads/:id/deliverythread_deliveryPer-thread delivery counts and per-message failure reasons
GET /suppressionslist_suppressionsแสดงรายการระงับการส่งของเวิร์กสเปซ
DELETE /suppressions/:emailremove_suppressionลบการระงับการส่งจาก bounce ที่มีสิทธิ์
GET /blocked-recipientslist_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 /contactslist_contactsList contacts
POST /contactscreate_contactAdd a contact with its consent basis
POST /contacts/bulkbulk_update_contactsTag, 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/:idget_contactRetrieve a contact by ID or email
PATCH /contacts/:idupdate_contactUpdate a contact's name, fields, or tags, or unsubscribe it
DELETE /contacts/:iddelete_contactDelete a contact and its list memberships
POST /contact-importsimport_contactsImport contacts from CSV
GET /contact-importslist_contact_importsList recent contact imports
GET /tagslist_tagsList contact tags with how many contacts carry each
GET /contact-fieldslist_contact_fieldsList custom contact field definitions
PUT /contact-fields/:keyset_contact_fieldDefine or change a custom contact field
DELETE /contact-fields/:keydelete_contact_fieldDelete a custom field definition
GET /segmentslist_segmentsList saved segments with live counts
POST /segmentscreate_segmentSave a segment
POST /segments/previewpreview_segmentCount and sample the contacts that match unsaved conditions
GET /segments/:idget_segmentRetrieve a segment and its live count
PATCH /segments/:idupdate_segmentRename a segment or change its conditions
DELETE /segments/:iddelete_segmentDelete a segment
GET /listslist_listsList contact lists with member counts
POST /listscreate_listCreate a list with an optional signup form, welcome email, and newsletter site
GET /lists/:idget_listRetrieve a list
PATCH /lists/:idupdate_listRename a list or change its signup form, welcome email, or site
DELETE /lists/:iddelete_listDelete a list without deleting its contacts
POST /lists/:id/contactsadd_list_contactsAdd existing contacts to a list
DELETE /lists/:id/contacts/:contact_idremove_list_contactRemove a contact from a list
GET /broadcastslist_broadcastsList broadcasts
POST /broadcastscreate_broadcastCreate a broadcast draft
GET /broadcasts/:idget_broadcastRetrieve a broadcast and its delivery totals
PATCH /broadcasts/:idupdate_broadcastEdit a draft broadcast
DELETE /broadcasts/:iddelete_broadcastDelete a draft broadcast
GET /broadcasts/:id/checkscheck_broadcastRun the pre-send checks for a broadcast
POST /broadcasts/:id/testsend_broadcast_testSend a test copy of a draft
POST /broadcasts/:id/scheduleschedule_broadcastSchedule a draft to send later
POST /broadcasts/:id/unscheduleunschedule_broadcastUnschedule a draft
POST /broadcasts/:id/duplicateduplicate_broadcastCopy a broadcast into a new draft
POST /broadcasts/:id/sendsend_broadcastSend a broadcast to its audience
POST /broadcasts/:id/send-moresend_broadcast_to_moreSend a sent broadcast to more of its audience
POST /broadcasts/:id/cancelcancel_broadcastCancel a draft or sending broadcast
GET /broadcasts/:id/recipientslist_broadcast_recipientsList a broadcast's recipients, outcomes, and engagement
GET /broadcasts/:id/reportget_broadcast_reportRetrieve a broadcast's engagement report
GET /campaigns/overviewget_campaign_overviewRetrieve subscriber growth and recent broadcast performance
GET /newsletter-settingsget_newsletter_settingsRetrieve newsletter settings
PATCH /newsletter-settingsupdate_newsletter_settingsChange 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/imageslist_uploaded_imagesList recently uploaded images
GET /accountget_accountดึงข้อมูลบัญชี การใช้งาน สถานะการเรียกเก็บเงิน และจำนวนเวิร์กสเปซด้วย API key
GET /account/diagnosticsget_account_diagnosticsDiagnose sending and receiving problems in the workspace
GET /analyticsget_analyticsดึง analytics การส่งของแดชบอร์ดสำหรับ 7, 30 หรือ 90 วัน
GET /profileget_accountคู่แฝดแบบเซสชันเท่านั้นของ GET /account MCP server อ่านเส้นทางของ API-key
POST /billing/checkoutไม่เปิดให้ใช้การเปลี่ยนแปลงการเรียกเก็บเงินเป็นแบบเซสชันเท่านั้นโดยการออกแบบ และต้องให้เจ้าของบัญชีทำในแดชบอร์ด สถานะการเรียกเก็บเงินอ่านได้ด้วย get_account
POST /billing/cancelไม่เปิดให้ใช้การเปลี่ยนแปลงการเรียกเก็บเงินเป็นแบบเซสชันเท่านั้นโดยการออกแบบ และต้องให้เจ้าของบัญชีทำในแดชบอร์ด สถานะการเรียกเก็บเงินอ่านได้ด้วย get_account
POST /keysไม่เปิดให้ใช้ยกเว้นโดยเจตนา: เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง มนุษย์เป็นผู้จัดการคีย์ในแดชบอร์ด
GET /keyslist_api_keysแสดงรายการเมทาดาทาของ API key
DELETE /keys/:idไม่เปิดให้ใช้ยกเว้นโดยเจตนา: เอเจนต์ต้องไม่สร้างหรือทำลายข้อมูลรับรอง มนุษย์เป็นผู้จัดการคีย์ในแดชบอร์ด

ไม่มีให้ใช้โดยเจตนา

ความสามารถEndpointเหตุผล
สร้าง หมุนเวียน เพิกถอน หรือลบ API keyPOST /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 deliveriesGET /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/retryWebhook 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 CSVPOST /uploads/images, GET /contacts/exportImage 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).

แค็ตตาล็อกที่เครื่องอ่านได้: /docs/mcp/tools.json (schema, annotation, การจับคู่ endpoint และรายการที่ยกเว้น) หน้านี้ฉบับ Markdown: /docs/mcp.md เมื่อติดตั้ง CLI แล้ว sendhq commands --format json จะพิมพ์แค็ตตาล็อกเดียวกัน