Sign inGet started

Switch Inbox Insights on for the workspace's main sending domain

POST
/v1/email/inbox-insights/domain-monitoring
// Requires Insights preview access for the organization.
const result = await bird.email.inboxInsights.domainMonitoring.upsert();
console.log(result.outcome, result.domain);
响应200
{
  "outcome": "enabled",
  "domain": "mail.acme.com"
}
Switches Inbox Insights on for the workspace's main sending domain, so a workspace opening the product for the first time has something to read without having to pick a domain first.
The main sending domain is the one verified domain if there is only one, and otherwise the verified domain that has sent the most mail over the last 30 days. Where the main domain cannot be identified, nothing is switched on and the response says so. Which domain matters most is the customer's call, and not a guess worth making on their behalf.
Safe to repeat. A workspace that already has a domain switched on is left exactly as it is, and the response says nothing changed.
This chooses a starting point, not a permanent setting: the domain it picks is switched on the same way as one chosen by hand, and can be switched off or added to at any time.
API-key and service-account calls require Insights preview access for your organization.
响应载荷
outcome
string
必填
What switching on the main sending domain did.
  • enabled: Inbox Insights is now switched on for the domain named alongside this.
  • already_on: at least one domain was already switched on, so nothing changed.
  • choice_required: the main sending domain could not be identified, most often because the workspace has several verified domains and no sending to rank them by. Ask the customer to choose.
  • no_verified_domains: the workspace has no verified sending domain, so there is nothing to report on until one is verified.
Possible values: enabled, already_on, choice_required, no_verified_domains
domain
nullable string
必填
The sending domain this call switched on, lowercased. The server sends a domain with the enabled outcome and null with the other three, already_on included: that outcome says only that the workspace had already made its choice, not which domain it chose. Read the domain list for that. Check outcome first rather than treating a domain as present.