दस्तावेज़ पर जाएँ
Java

client.tools()

इस नेमस्पेस का हर मेथड: उसका सिग्नेचर, उसके पैरामीटर, वह क्या लौटाता है और एक उदाहरण।

मेथड

The free tools on the OpenEmail website: checks of the public mail records of any domain, which are its DMARC policy, its BIMI logo and a deliverability report across MX, SPF, DKIM, DMARC and BIMI, a reader for the sign-in code in a message, and the price of every plan for a usage. They need no scope.

tools().checkDmarc

Check a domain's DMARC policy

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> checkDmarc(String domain, RequestOptions options)

Reads the domain's DMARC record from public DNS, or the record of the organisational domain it inherits from, and says how strict it is and what is wrong with it, the DMARC checker on the OpenEmail website. stage is missing, invalid, monitor for p=none, quarantine or reject, and issues lists the problems written to be shown to a person.

पैरामीटर

domainStringआवश्यक

The domain to check, such as acme.com. An email address or a URL is read as its domain, and any public domain works, not only the ones in this workspace.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with domain, record, inheritedFrom, every tag in tags, stage and issues.

उदाहरण

Map<String, Object> report = client.tools().checkDmarc("acme.com"); System.out.println(report.get("stage") + " " + report.get("tags") + " " + report.get("issues"));

टिप्पणियाँ

  • Needs no scope: any key or access token for the workspace may run it.

  • A domain that does not read as one is 422 invalid_parameter on domain, and DNS that did not answer is 503 unreachable, which is worth retrying.

इनमें भी उपलब्ध

API
GET /tools/dmarc
TypeScript
tools.checkDmarc()
Python
tools.check_dmarc()
Ruby
tools.check_dmarc
PHP
tools->checkDmarc
Go
Tools.CheckDmarc
C#
Tools.CheckDmarcAsync
CLI
openemail tools check-dmarc

tools().checkBimi

Check a domain's BIMI logo

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> checkBimi(String domain, RequestOptions options)

Reads the domain's BIMI record, fetches the logo it names and checks the DMARC policy beside it, since inboxes draw a logo only at p=quarantine or p=reject, the BIMI checker on the OpenEmail website. status is present, partial when the record is there but something stops inboxes showing the logo, absent or invalid, and issues says why.

पैरामीटर

domainStringआवश्यक

The domain to check, such as acme.com. An email address or a URL is read as its domain, and any public domain works, not only the ones in this workspace.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with record, logoUrl, authorityUrl, logoSvg, logoReachable, dmarcPolicy, dmarcEnforced, status and issues.

उदाहरण

Map<String, Object> report = client.tools().checkBimi("acme.com"); System.out.println(report.get("status") + " " + report.get("issues"));

टिप्पणियाँ

  • Needs no scope: any key or access token for the workspace may run it.

  • A domain that does not read as one is 422 invalid_parameter on domain, and DNS that did not answer is 503 unreachable, which is worth retrying.

इनमें भी उपलब्ध

API
GET /tools/bimi
TypeScript
tools.checkBimi()
Python
tools.check_bimi()
Ruby
tools.check_bimi
PHP
tools->checkBimi
Go
Tools.CheckBimi
C#
Tools.CheckBimiAsync
CLI
openemail tools check-bimi

tools().checkDeliverability

Check a domain's deliverability

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> checkDeliverability(String domain, RequestOptions options)

Checks the records a receiving mailbox reads before it trusts mail from the domain, the deliverability checker on the OpenEmail website: MX, SPF, DKIM at the selectors its mail provider uses, DMARC and BIMI. Each check says pass, warn, fail or absent with a verdict and notes, and score weighs them into 0 to 100, graded A to F.

पैरामीटर

domainStringआवश्यक

The domain to check, such as acme.com. An email address or a URL is read as its domain, and any public domain works, not only the ones in this workspace.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with score, grade, provider and checks, a list of maps each with id, label, status, verdict, record and notes.

उदाहरण

Map<String, Object> report = client.tools().checkDeliverability("acme.com"); System.out.println(report.get("grade") + " " + report.get("score") + " " + report.get("checks"));

टिप्पणियाँ

  • Needs no scope: any key or access token for the workspace may run it.

  • A domain that does not read as one is 422 invalid_parameter on domain, and DNS that did not answer is 503 unreachable, which is worth retrying.

इनमें भी उपलब्ध

API
GET /tools/deliverability
TypeScript
tools.checkDeliverability()
Python
tools.check_deliverability()
Ruby
tools.check_deliverability
PHP
tools->checkDeliverability
Go
Tools.CheckDeliverability
C#
Tools.CheckDeliverabilityAsync
CLI
openemail tools check-deliverability

tools().readVerificationCode

Read the sign-in code in a message

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> readVerificationCode(Map<String, Object> body, RequestOptions options)

Finds the sign-in or verification code in a message you pass in, with the reader that puts a code at the top of a message in OpenEmail. Send the whole MIME source as raw, or the subject with html or text.

It answers only when it is sure: the message has to hold exactly one code worded as one, such as a verification code, a one-time code or a security code, in any of the common languages. Two different codes, or a number that could be an order, a booking, a meeting, a phone number or a promotion, leave code null.

It reads only what you send, so it cannot tell whether the sender is who it claims to be. The verificationCode that threads().get returns on each message of your mailbox also requires the sender to pass authentication.

पैरामीटर

body.rawString

The whole message as MIME source, as it was received. Wins over the other fields when it is set.

body.subjectString

Subject line, at most 998 characters.

body.htmlString

HTML body. Links are left out before the code is looked for.

body.textString

Plain text body, used when there is no html.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with object set to verification_code and code: the code as you would type it, digits only or capital letters and digits without spaces or dashes, or null when the reader is not sure.

उदाहरण

Map<String, Object> result = client.tools().readVerificationCode(Body.of(    "subject", "Your verification code",    "html", "<p>Your code is <b>396-696</b>. It expires in 10 minutes.</p>")); System.out.println(result.get("code"));

टिप्पणियाँ

  • Needs no scope: any key or access token for the workspace may run it.

  • Nothing is stored and no model is called, so it is safe to run on every message.

  • A body with none of raw, subject, html or text is 422 invalid_parameter.

इनमें भी उपलब्ध

API
POST /tools/verification-code
TypeScript
tools.readVerificationCode()
Python
tools.read_verification_code()
Ruby
tools.read_verification_code
PHP
tools->readVerificationCode
Go
Tools.ReadVerificationCode
C#
Tools.ReadVerificationCodeAsync
CLI
openemail tools read-verification-code

tools().estimateCost

Estimate what OpenEmail costs for a usage

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> estimateCost(RequestOptions options)

Prices every plan for the usage you describe, as the cost calculator on the OpenEmail website does: the plan itself, the extra sends and AI actions it would bill, the monthly total, and whether the plan fits at all. A plan does not fit when the usage needs more domains than it includes, more than one person without team access, or more sends than it allows without billing extra. cheapest names the cheapest plan that fits.

Amounts are in US cents per month. With interval set to year, the plan price is the monthly equivalent of paying yearly.

पैरामीटर

options.sendsint

Emails sent in a month. Defaults to 0.

options.domainsint

Domains you send from. Defaults to 1.

options.peopleint

People who use the workspace. Defaults to 1.

options.aiActionsint

AI actions in a day, such as drafts, rewrites and summaries. Defaults to 0.

options.intervalString

How you pay: month or year, as in uk.openemail.constants.BillingIntervals. Defaults to month.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with object set to cost_estimate, the interval, the need that was priced with its defaults filled in, every plan in plans, each a map with plan, name, fits, blockers, baseCents, extraSends, sendsCents, extraAiActions, aiCents, extrasCents and totalCents, and cheapest, the id of the cheapest plan that fits, or null when none does.

उदाहरण

Map<String, Object> estimate = client.tools().estimateCost(RequestOptions.create()    .set("sends", 25000)    .set("domains", 2)    .set("people", 4)    .set("aiActions", 30)); System.out.println(estimate.get("plans") + " " + estimate.get("cheapest"));

टिप्पणियाँ

  • Needs no scope: any key or access token for the workspace may run it.

  • It prices the plans as they are sold today and reads nothing in the workspace.

  • blockers names what a plan cannot carry: domains, people or sends, the values in uk.openemail.constants.PlanBlockers.

इनमें भी उपलब्ध

API
GET /tools/cost
TypeScript
tools.estimateCost()
Python
tools.estimate_cost()
Ruby
tools.estimate_cost
PHP
tools->estimateCost
Go
Tools.EstimateCost
C#
Tools.EstimateCostAsync
CLI
openemail tools estimate-cost

tools().checkAddress

Check an email address

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> checkAddress(String email, RequestOptions options)

Says whether an address is worth sending to, the email checker on the OpenEmail website: result is valid, risky, invalid or unknown, and reasons says why. It checks the syntax, whether the domain takes mail at all, whether it is a throwaway domain or a shared address such as info@, and offers a correction in suggestion for a likely typo such as gmial.com. Run it on a sign-up form before the first message, or over a list before a broadcast.

With the emails:read scope, workspace also says what this workspace knows: whether it suppressed the address and when it last delivered to it or saw it bounce. It never shows another workspace's history, and without the scope it is null.

deep also asks whether the mailbox itself exists, in checks.mailbox. A deep check is billed per address through pay as you go and needs the emails:send scope. Without it the check is free and checks.mailbox is null.

पैरामीटर

emailStringआवश्यक

The address to check, such as [email protected].

options.deepboolean

Also ask whether the mailbox exists. Billed per address through pay as you go. Defaults to false.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with email, normalized, result, reasons, suggestion, checks, workspace and checkedAt.

उदाहरण

Map<String, Object> check = client.tools().checkAddress("[email protected]"); System.out.println(check.get("result") + " " + check.get("reasons") + " " + check.get("suggestion"));

टिप्पणियाँ

  • Needs no scope without deep: any key or access token for the workspace may run it.

  • An address whose syntax is wrong is not an error: it returns with result invalid and the reason invalid_syntax. The values are in uk.openemail.constants.AddressCheckResults and uk.openemail.constants.AddressCheckReasons.

  • With deep, a workspace where pay as you go is off, paused or not part of the plan is 409 deep_check_unavailable, a check that would pass its monthly limit is 409 deep_check_limit_reached, and a mailbox check that did not answer is 503 deep_check_unavailable. Nothing is billed for any of them.

  • A GET is retried automatically on network failure and on 408, 429, 500, 502, 503 and 504 responses, up to the client's maxRetries.

इनमें भी उपलब्ध

API
GET /tools/address
TypeScript
tools.checkAddress()
Python
tools.check_address()
Ruby
tools.check_address
PHP
tools->checkAddress
Go
Tools.CheckAddress
C#
Tools.CheckAddressAsync
CLI
openemail tools check-address

tools().checkAddresses

Check several email addresses

कोई स्कोप नहीं
सिग्नेचर
Map<String, Object> checkAddresses(Map<String, Object> body, RequestOptions options)

Checks up to 100 addresses in one call, each as checkAddress does, and returns them in the order they were sent. Use it to clean a list before importing it or sending a broadcast to it.

deep applies to every address and is billed for each one that reaches the mailbox check, through pay as you go, and needs the emails:send scope.

पैरामीटर

body.emailsList<String>आवश्यक

The addresses to check, a list of 1 to 100 strings.

body.deepboolean

Also ask whether each mailbox exists. Billed per address through pay as you go. Defaults to false.

options.apiKeyString

Overrides the client's API key for this call only.

लौटाता है

A map with one map per address in data, in the order they were sent.

उदाहरण

Map<String, Object> result = client.tools().checkAddresses(Body.of("emails", List.of("[email protected]", "[email protected]"))); System.out.println(result.get("object"));

टिप्पणियाँ

  • Needs no scope without deep: any key or access token for the workspace may run it.

  • More than 100 addresses, or none, is 422 invalid_parameter on emails.

  • It changes nothing, so it is safe to run again, but the SDK does not retry a POST.

इनमें भी उपलब्ध

API
POST /tools/addresses
TypeScript
tools.checkAddresses()
Python
tools.check_addresses()
Ruby
tools.check_addresses
PHP
tools->checkAddresses
Go
Tools.CheckAddresses
C#
Tools.CheckAddressesAsync
CLI
openemail tools check-addresses