Get the choices available for a new seed test
/v1/email/inbox-insights/seed-tests/configuration// 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.seedTests.configuration.get({ sending_domain: sendingDomain });
console.log(report);# Requires Insights preview access for the organization.
sending_domain = None
for domain in client.email.inbox_insights.domains.list(search="mail.example.com"):
if domain.domain == "mail.example.com":
sending_domain = domain.domain
break
if sending_domain is None:
raise ValueError("Verify mail.example.com in this workspace first")
report = client.email.inbox_insights.seed_tests.configuration.get(sending_domain=sending_domain)
print(report.model_dump_json())// Requires Insights preview access for the organization.
client, err := bird.NewClient(option.WithAPIKey(os.Getenv("BIRD_API_KEY")))
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
sendingDomain := ""
for domain, err := range client.Email.InboxInsights.Domains.List(ctx, bird.EmailInboxInsightsDomainsListParams{Search: "mail.example.com"}) {
if err != nil {
log.Fatal(err)
}
if domain.Domain != nil && *domain.Domain == "mail.example.com" {
sendingDomain = *domain.Domain
break
}
}
if sendingDomain == "" {
log.Fatal("Verify mail.example.com in this workspace first")
}
report, err := client.Email.InboxInsights.SeedTests.Configuration.Get(ctx, bird.EmailInboxInsightsSeedTestsConfigurationGetParams{SendingDomain: sendingDomain})
if err != nil {
log.Fatal(err)
}
fmt.Println(report)// Requires Insights preview access for the organization.
$sendingDomain = null;
foreach ($bird->email->inboxInsights->domains->list(['search' => 'mail.example.com']) as $domain) {
if ($domain->getDomain() === 'mail.example.com') {
$sendingDomain = $domain->getDomain();
break;
}
}
if ($sendingDomain === null) {
throw new \RuntimeException('Verify mail.example.com in this workspace first');
}
$report = $bird->email->inboxInsights->seedTests->configuration->get(['sending_domain' => $sendingDomain]);
var_dump($report);bird email inbox-insights seed-tests configuration get --sending-domain mail.acme.comcurl -X GET "https://us1.platform.bird.com/v1/email/inbox-insights/seed-tests/configuration" \
-H "Authorization: Bearer $TOKEN" \
--url-query "sending_domain=mail.acme.com"{
"resource": "seed-test-configuration",
"domain": "mail.acme.com",
"list_types": [
{
"value": "private",
"available": true
}
],
"regions": [
{
"value": "North America - US"
}
],
"engagement_profiles": [
{
"value": "all",
"available": true
}
]
}
Returns what a new seed test can be configured with for a sending domain: the seed pools the account can use, the regions seeds can be placed in, and the engagement behaviours the seeds can simulate.
A seed pool flagged unavailable is one the account has not been provisioned for, and no self-serve route enables one, so leave it out of the choices you offer rather than showing it unpickable. This is reference data that changes only when provisioning does, so it suits being fetched when a configuration form opens rather than on every page view.
Scoped API keys, OAuth and service accounts require organization preview access.
Queryparameters
sending_domainstringThe sending domain a test would be registered for: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.
Response Payload
resourceWhich resource this response is, echoed for self-description.
domainThe sending domain these choices apply to.
list_typesThe seed pools, each flagged with whether the account can use it.
regionsThe regions seeds can be placed in. Objects rather than bare strings, to match the two lists beside it: the measurement reports no availability for a region today, and an object can carry one later without a second array.
engagement_profilesThe engagement behaviours the seeds can simulate, each flagged with whether the account can use it.
Onderliggende attributen tonen
engagement_profiles.valueThe value to send when registering a test against this behaviour.
Possible values (may grow over time): all, engaging, non_engaging
engagement_profiles.availableWhether this behaviour is provisioned for the account. As with the seed pools, an unavailable behaviour is one the account has not been set up for rather than one its plan forbids, so leave it out of the choices you offer rather than showing it unpickable.
Gerelateerde bronnen
Ga verder met de documentatie, handleidingen en voorbeelden voor dit onderwerp.