Sign inGet started

Switch Inbox Insights on or off for a sending domain

PATCH
/v1/email/inbox-insights/domains/{sending_domain}
// Requires Insights preview access for the organization.
let sendingDomain: string | undefined;
for await (const domain of bird.email.inboxInsights.domains.list({ search: "mail.example.com" })) {
  if (domain.domain === "mail.example.com") { sendingDomain = domain.domain; break; }
}
if (!sendingDomain) throw new Error("Verify mail.example.com in this workspace first");
const report = await bird.email.inboxInsights.domains.update(sendingDomain, { monitored: false });
console.log(report.monitored);
响应200
{
  "domain": "mail.acme.com",
  "monitored": true
}
Changes the workspace's monitoring preference for one of its verified sending domains. Enabling enrolls the domain with eDataSource before saving the preference. Disabling removes the preference without removing vendor enrollment or history. Report reads remain available for verified owned domains regardless of this setting.
A domain switched on for the first time has to be measured before it has anything to report, so its results start empty and fill in as its mail is seen. Switching off keeps everything measured so far: switching the domain back on restores it in full and takes effect immediately, rather than starting the domain over.
Setting the value it already has changes nothing and answers normally, so this is safe to repeat.
API-key and service-account calls require Insights preview access for your organization.
参数
sending_domain
string
The sending domain to change, exactly as it appears in your sending domains. A domain that is not verified in this workspace answers not-found.
请求载荷
monitored
boolean
必填
Whether the workspace wants this domain monitored. Enabling enrolls it with eDataSource; disabling removes only the workspace preference and preserves vendor enrollment and measurement history. Verified ownership governs report access.
响应载荷
domain
string
必填
The sending domain, lowercased, as it appears in your sending domains.
monitored
boolean
必填
Whether Inbox Insights reports on this domain. Switching it off stops the reporting and keeps the measurement history, so switching it back on restores the full history rather than starting again.