Domains
Add a domain, check its records, and set its policies.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
On this page
The Domain object
A domain on Mailset: its DNS records, what works, and its policies.
Attributes
The domain’s id.
The domain’s name.
mail: Mailset sends and receives for it.sending: Mailset only sends.parked: no mail to or from it.One of
mailsendingparkedpending: not receiving yet.receiving: its mailboxes work.ready: sending works too.parked: a parked domain’s records are right.One of
pendingreceivingreadyparkedWhether it can send:
pending,readyorblocked.One of
pendingreadyblockedWhich provider sends for it. Null on a parked domain.
The DNS records it needs, and whether each is in place.
Show child attributesHide child attributes
What the record is for:
mx,spf,dkim,dmarc,bounceand the like.One of
mxdkimdkim2dkim3bouncebounce_spfspfdmarcmta_stsmta_sts_hosttls_rptbimiThe record’s type: MX, TXT or CNAME.
One of
MXTXTCNAMEThe record’s name, in full.
What the record has to hold.
An MX’s priority. Null on any other record.
ok: DNS answers with it.missing: nothing is there.wrong: something else is.One of
okmissingwrongWhat DNS answered instead, when it isn’t what the record should hold.
Its MTA-STS policy and TLS reports. Null on a parked domain.
Show child attributesHide child attributes
One of
testingenforceOne of
pendingtestingenforcingbrokenWhat’s wrong or what it’s waiting for. Null when there’s nothing to say.
Why
enforcewould be refused, as of the last check. Empty: it’s allowed.
Its DMARC record and reports. Null on a parked domain.
Show child attributesHide child attributes
What’s wrong with the record for mail Mailset sends, one sentence each. Empty: nothing.
The record to publish instead, the owner’s policy kept. Null when nothing needs changing.
Whether Mailset’s zone lets receivers send this domain’s reports to Mailset.
Show child attributesHide child attributes
Messages that passed DMARC.
The DKIM-verified domains that sent reports:
google.com.The sources that failed, most messages first.
When its records were last checked, in ms since the epoch. Null: never.
When it was added, in ms since the epoch.
Answered by
domains.listdomains.adddomains.parkdomains.checkdomains.applydomains.sts
{
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"provider": "text",
"records": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
"found": "text"
}
],
domains.list
List an org’s domains.
POST/v1/domains.list
Parameters
It takes no input: send an empty object.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is a list of Domain objects.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.list();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.list()
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
answer, err := client.Domains.List(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.list
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->list();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Domain;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
List<Domain> answer = mailset.domains().list();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.domains().list().await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.list \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains list
{
"ok": true,
"data": [
{
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"provider": "text",
"records": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
domains.plan
Show what adding a domain would change.
POST/v1/domains.plan
Parameters
The domain’s name, such as
example.com.Sending only: just the records sending needs, with MX and SPF left as they are.
Default
false.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
The host’s own page for this zone’s records, when it has one.
Mailset can write to this DNS host itself.
The records that can be named now. The DKIM and bounce records come once the domain is added.
Records old providers left, on
domains plan.Show child attributesHide child attributes
Mailset read the zone. False: its DNS host has to be checked by hand.
Each provider in
found, and whether it still sends as the domain.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.plan({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.plan({"name": "example.com"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsPlanParams{
Name: "example.com",
}
answer, err := client.Domains.Plan(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.plan(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->plan([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainPlan;
import app.mailset.model.DomainsPlanParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsPlanParams.builder()
.name("example.com")
.build();
DomainPlan answer = mailset.domains().plan(params);
System.out.println(answer);
use mailset::types::DomainsPlanParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.plan(DomainsPlanParams {
name: "example.com".into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.plan \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains plan example.com
{
"ok": true,
"data": {
"name": "Acme API",
"zone": "text",
"dnsHost": "text",
"dnsPage": "text",
"writable": true,
"changes": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"from": "moc.elpmaxe@olleh",
"to": "moc.elpmaxe@ana"
}
],
"warnings": [
domains.add
Add a domain and get its DNS records.
POST/v1/domains.add
Parameters
The domain’s name, such as
example.com.Sending only: its mail keeps arriving where it does today, so it needs only the DKIM, bounce and DMARC records, and a domain key sends as the addresses it names there.
Default
false.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is the Domain object.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.add({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.add({"name": "example.com"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsAddParams{
Name: "example.com",
}
answer, err := client.Domains.Add(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.add(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->add([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Domain;
import app.mailset.model.DomainsAddParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsAddParams.builder()
.name("example.com")
.build();
Domain answer = mailset.domains().add(params);
System.out.println(answer);
use mailset::types::DomainsAddParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.add(DomainsAddParams {
name: "example.com".into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.add \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains add example.com
{
"ok": true,
"data": {
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"provider": "text",
"records": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
"found": "text"
domains.parkPlan
Show what parking a domain would change.
POST/v1/domains.parkPlan
Parameters
The domain’s name, such as
example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
The host’s own page for this zone’s records, when it has one.
Mailset can write to this DNS host itself.
The records that can be named now. The DKIM and bounce records come once the domain is added.
Records old providers left, on
domains plan.Show child attributesHide child attributes
Mailset read the zone. False: its DNS host has to be checked by hand.
Each provider in
found, and whether it still sends as the domain.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.parkPlan({
name: "acme.org",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.park_plan({"name": "acme.org"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsParkPlanParams{
Name: "acme.org",
}
answer, err := client.Domains.ParkPlan(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.park_plan(name: 'acme.org')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->parkPlan([
'name' => 'acme.org',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainPlan;
import app.mailset.model.DomainsParkPlanParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsParkPlanParams.builder()
.name("acme.org")
.build();
DomainPlan answer = mailset.domains().parkPlan(params);
System.out.println(answer);
use mailset::types::DomainsParkPlanParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.park_plan(DomainsParkPlanParams {
name: "acme.org".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.parkPlan \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"acme.org"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains parkPlan acme.org
{
"ok": true,
"data": {
"name": "Acme API",
"zone": "text",
"dnsHost": "text",
"dnsPage": "text",
"writable": true,
"changes": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"from": "moc.elpmaxe@olleh",
"to": "moc.elpmaxe@ana"
}
],
"warnings": [
domains.park
Park a domain: no mail to or from it, and nobody can spoof it.
POST/v1/domains.park
Parameters
The domain’s name, such as
example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is the Domain object.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.park({
name: "acme.org",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.park({"name": "acme.org"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsParkParams{
Name: "acme.org",
}
answer, err := client.Domains.Park(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.park(name: 'acme.org')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->park(['name' => 'acme.org']);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Domain;
import app.mailset.model.DomainsParkParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsParkParams.builder()
.name("acme.org")
.build();
Domain answer = mailset.domains().park(params);
System.out.println(answer);
use mailset::types::DomainsParkParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.park(DomainsParkParams {
name: "acme.org".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.park \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"acme.org"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains park acme.org
{
"ok": true,
"data": {
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"provider": "text",
"records": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
"found": "text"
domains.check
Check a domain’s DNS records now.
POST/v1/domains.check
Parameters
The domain’s name, such as
example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is the Domain object.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.check({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.check({"name": "example.com"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsCheckParams{
Name: "example.com",
}
answer, err := client.Domains.Check(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.check(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->check([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Domain;
import app.mailset.model.DomainsCheckParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsCheckParams.builder()
.name("example.com")
.build();
Domain answer = mailset.domains().check(params);
System.out.println(answer);
use mailset::types::DomainsCheckParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.check(DomainsCheckParams {
name: "example.com".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.check \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains check example.com
{
"ok": true,
"data": {
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"provider": "text",
"records": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
"found": "text"
domains.dmarc
Show a domain’s DMARC: what’s wrong with the record, its pass rate and the sources that fail.
POST/v1/domains.dmarc
Parameters
The domain’s name, such as
example.com.The DMARC policy to publish:
none,quarantineorreject. Left out: only show where it stands.One of
nonequarantinerejectRaise it before reports show the mail passing.
Default
false.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is an object with:
The DMARC record as last checked: what’s published, and what to publish instead.
Show child attributesHide child attributes
What the record is for:
mx,spf,dkim,dmarc,bounceand the like.One of
mxdkimdkim2dkim3bouncebounce_spfspfdmarcmta_stsmta_sts_hosttls_rptbimiThe record’s type: MX, TXT or CNAME.
One of
MXTXTCNAMEThe record’s name, in full.
What the record has to hold.
An MX’s priority. Null on any other record.
ok: DNS answers with it.missing: nothing is there.wrong: something else is.One of
okmissingwrongWhat DNS answered instead, when it isn’t what the record should hold.
Show child attributesHide child attributes
What’s wrong with the record for mail Mailset sends, one sentence each. Empty: nothing.
The record to publish instead, the owner’s policy kept. Null when nothing needs changing.
Whether Mailset’s zone lets receivers send this domain’s reports to Mailset.
Show child attributesHide child attributes
Messages that passed DMARC.
The DKIM-verified domains that sent reports:
google.com.The sources that failed, most messages first.
Show child attributesHide child attributes
One of
nonequarantinereject_dmarc.<domain>.The DMARC records published before, joined with
|. Null: none.The one record now, or the one to publish in place of every DMARC record there.
False when the record already said this.
Mailset wrote it to the zone itself.
The zone’s own nameservers answer it, and only it.
Raised with --anyway, before reports showed it safe.
Mailset can write this zone.
Why Mailset couldn’t write it just now.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.dmarc({
policy: "quarantine",
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.dmarc(
{"policy": "quarantine", "name": "example.com"}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsDMARCParams{
Policy: mailset.DMARCPolicyQuarantine,
Name: "example.com",
}
answer, err := client.Domains.DMARC(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.dmarc(
policy: 'quarantine',
name: 'example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->dmarc([
'policy' => 'quarantine',
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DmarcPolicy;
import app.mailset.model.DomainDmarcAnswer;
import app.mailset.model.DomainsDmarcParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsDmarcParams.builder()
.policy(DmarcPolicy.QUARANTINE)
.name("example.com")
.build();
DomainDmarcAnswer answer =
mailset.domains().dmarc(params);
System.out.println(answer);
use mailset::types::{DmarcPolicy, DomainsDmarcParams};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.dmarc(DomainsDmarcParams {
name: "example.com".into(),
policy: Some(DmarcPolicy::Quarantine),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.dmarc \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"policy":"quarantine","name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains dmarc example.com --policy quarantine
{
"ok": true,
"data": {
"name": "Acme API",
"record": {
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
"found": "text"
},
"dmarc": {
"problems": [
"text"
],
"fix": "text",
domains.apply
Write a domain’s records to its DNS host.
POST/v1/domains.apply
Parameters
The domain’s name, such as
example.com.Only the DKIM and bounce records: the domain sends, and its mail still arrives where it does today.
Default
false.Mailset is the only thing that sends as this domain: SPF names only Mailset, and every other DKIM key is deleted. For a domain that left Google or another provider for good.
Default
false.The old providers whose records go, by id, as
domains planlists them: bounce, DKIM, SPF, verification and, once mail comes here, MX. Never what Mailset wrote. A bare flag is refused with the ids found.With --drop-leftovers: their tracking records too, which old links still use.
Default
false.With --drop-leftovers: without DMARC reports showing they stopped sending.
Default
false.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is an object with:
DKIM keys deleted by --only-mailset: other senders that could sign as the domain.
Default
[].Records old providers left, and what
--drop-leftoversdid with each.Show child attributesHide child attributes
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.apply({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.apply({"name": "example.com"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsApplyParams{
Name: "example.com",
}
answer, err := client.Domains.Apply(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.apply(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->apply([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainApplied;
import app.mailset.model.DomainsApplyParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsApplyParams.builder()
.name("example.com")
.build();
DomainApplied answer = mailset.domains().apply(params);
System.out.println(answer);
use mailset::types::DomainsApplyParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.apply(DomainsApplyParams {
name: "example.com".into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.apply \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains apply example.com
{
"ok": true,
"data": {
"applied": [
"text"
],
"removed": [
"text"
],
"leftovers": {
"removed": [
{
"providerId": "out_3f9a1c0e7b2d",
"provider": "text",
"kind": "bounce",
"type": "text",
"host": "text",
"value": "text"
domains.sts
Set a domain’s MTA-STS mode: testing or enforce.
POST/v1/domains.sts
Parameters
The domain’s name.
testing: senders report TLS failures and deliver anyway.enforce: they refuse to deliver without TLS.One of
testingenforce
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is an object with:
Whether Mailset wrote the new policy id to DNS itself.
When it didn’t: the record to publish so senders notice the change.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.sts({
mode: "enforce",
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.sts(
{"mode": "enforce", "name": "example.com"}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsSTSParams{
Mode: mailset.STSModeEnforce,
Name: "example.com",
}
answer, err := client.Domains.STS(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.sts(
mode: 'enforce',
name: 'example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->sts([
'mode' => 'enforce',
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainStsChanged;
import app.mailset.model.DomainsStsParams;
import app.mailset.model.StsMode;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsStsParams.builder()
.mode(StsMode.ENFORCE)
.name("example.com")
.build();
DomainStsChanged answer = mailset.domains().sts(params);
System.out.println(answer);
use mailset::types::{DomainsStsParams, StsMode};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.sts(DomainsStsParams {
name: "example.com".into(),
mode: StsMode::Enforce,
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.sts \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"mode":"enforce","name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains sts example.com --mode enforce
{
"ok": true,
"data": {
"domain": {
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"provider": "text",
"records": [
{
"purpose": "mx",
"type": "MX",
"host": "text",
"value": "text",
"priority": 1,
"state": "ok",
domains.remove
Remove a domain.
POST/v1/domains.remove
Parameters
The domain’s name, such as
example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is an object with:
On a parked domain: what removing it left as it was.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.remove({
name: "acme.org",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.remove({"name": "acme.org"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsRemoveParams{
Name: "acme.org",
}
answer, err := client.Domains.Remove(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.remove(name: 'acme.org')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->remove([
'name' => 'acme.org',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainsRemoveParams;
import app.mailset.model.DomainsRemoveResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsRemoveParams.builder()
.name("acme.org")
.build();
DomainsRemoveResult answer =
mailset.domains().remove(params);
System.out.println(answer);
use mailset::types::DomainsRemoveParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.remove(DomainsRemoveParams {
name: "acme.org".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.remove \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"acme.org"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains remove acme.org
{
"ok": true,
"data": {
"removed": true,
"note": "text"
}
}
domains.postmaster
Gmail’s view of a domain, from Google Postmaster Tools.
POST/v1/domains.postmaster
Parameters
The domain’s name, such as
example.com.The TXT value Postmaster Tools shows for the domain. Given, Mailset writes that record and checks it.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is an object with:
It sends through Mailset: its DKIM and bounce records pass. Gmail’s numbers are shown only then.
Show child attributesHide child attributes
The domain itself: Postmaster Tools verifies the apex.
Always
TXTOne of
nonelivemissingMailset writes it to the DNS host itself.
Who hosts the zone, when Mailset can tell: "Cloudflare".
The host’s own page for this zone’s records.
Null: no Google account connected, or the domain doesn’t send yet.
Show child attributesHide child attributes
One of
not_addedunverifiedverifiedno_accessNewest first, only the days Gmail has numbers for.
Why Gmail’s numbers couldn’t be read just now.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.postmaster({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.postmaster(
{"name": "example.com"}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsPostmasterParams{
Name: "example.com",
}
answer, err := client.Domains.Postmaster(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.postmaster(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->postmaster([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainsPostmasterParams;
import app.mailset.model.PostmasterDomain;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsPostmasterParams.builder()
.name("example.com")
.build();
PostmasterDomain answer =
mailset.domains().postmaster(params);
System.out.println(answer);
use mailset::types::DomainsPostmasterParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.postmaster(DomainsPostmasterParams {
name: "example.com".into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.postmaster \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains postmaster example.com
{
"ok": true,
"data": {
"name": "Acme API",
"sending": true,
"record": {
"host": "text",
"type": "TXT",
"value": "text",
"state": "none",
"writable": true,
"dnsHost": "text",
"dnsPage": "text"
},
"gmail": {
"verification": "not_added",
"days": [
{
domains.logo
A domain’s brand logo (BIMI).
POST/v1/domains.logo
Parameters
The domain’s name, such as
example.com.The SVG, base64.
The SVG file’s name.
At most 255 characters.
The brand’s name, the logo’s
<title>. The org’s name when left out.At most 64 characters.
The https URL of the logo’s VMC or CMC certificate, or
noneto take it off.At most 2,048 characters.
Take the logo off the domain.
Default
false.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
The body may be up to 1 MB.
Returns
data is an object with:
Show child attributesHide child attributes
Where the policy that counts lives: the registered domain.
The records to publish: the owner’s own, with only what keeps a logo away changed.
What DMARC reports said over their window: the share that passed.
Why DNS couldn’t be read just now.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.logo({
file: "<base64 of the file>",
title: "Acme",
name: "example.com",
fileName: "logo.svg",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.logo(
{
"file": "<base64 of the file>",
"title": "Acme",
"name": "example.com",
"file_name": "logo.svg",
}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsLogoParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.logo(
file: '<base64 of the file>',
title: 'Acme',
name: 'example.com',
file_name: 'logo.svg'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->logo([
'file' => '<base64 of the file>',
'title' => 'Acme',
'name' => 'example.com',
'fileName' => 'logo.svg',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.BrandLogo;
import app.mailset.model.DomainsLogoParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsLogoParams.builder()
.file("<base64 of the file>")
.title("Acme")
.name("example.com")
.fileName("logo.svg")
.build();
BrandLogo answer = mailset.domains().logo(params);
System.out.println(answer);
use mailset::types::DomainsLogoParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.logo(DomainsLogoParams {
name: "example.com".into(),
file: Some("<base64 of the file>".into()),
file_name: Some("logo.svg".into()),
title: Some("Acme".into()),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.logo \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"file":"<base64 of the file>","title":"Acme","name":"example.com","fileName":"logo.svg"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains logo example.com --file logo.svg --title Acme
{
"ok": true,
"data": {
"name": "Acme API",
"logo": {
"url": "https://hooks.example.com/mailset",
"title": "text",
"bytes": 20480,
"setAt": 1796048940000,
"notes": [
"text"
]
},
"certificate": {
"url": "https://hooks.example.com/mailset",
"stale": true
},
"record": {
domains.verify
Add the TXT record a service asks for to prove a domain (Google, Yahoo, Apple, Microsoft, Facebook).
POST/v1/domains.verify
Parameters
The domain’s name, such as
example.com.The TXT value the service asks for, as it shows it.
The name under the domain the record goes on, when the service names one. Left out: the domain itself.
Beside input
The org this is about. Needed when the caller is in more than one.
An approval’s id, once someone approved it with their passkey. Without one, the answer is
step_up_requiredand names what to approve.
Returns
data is an object with:
The org’s domain the record is for.
Where it goes: the domain itself or a name under it.
The host as a DNS host’s form asks for it:
@for the domain itself.Always
TXTThe value as DNS holds it, in 255-character strings.
live: the zone’s own nameservers answer it.missing: not yet.One of
livemissingIt was there before, so nothing changed.
Mailset wrote it to the zone just now.
Mailset writes this zone itself.
Why Mailset couldn’t write or check it just now.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.verify({
txt:
"google-site-verification=k3XwPq7Zr2Lm9Vt4Yb8Nc1Hd6" +
"Jf0Sg5Ua3Ee7Ww2Ii4",
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.verify(
{
"txt": (
"google-site-verification=k3XwPq7Zr2Lm9Vt4Yb8"
"Nc1Hd6Jf0Sg5Ua3Ee7Ww2Ii4"
),
"name": "example.com",
}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsVerifyParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.verify(
txt:
'google-site-verification=k3XwPq7Zr2Lm9Vt4Yb8Nc1Hd' \
'6Jf0Sg5Ua3Ee7Ww2Ii4',
name: 'example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->verify([
'txt' =>
'google-site-verification=k3XwPq7Zr2Lm9Vt4Yb8N'
. 'c1Hd6Jf0Sg5Ua3Ee7Ww2Ii4',
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainsVerifyParams;
import app.mailset.model.Verification;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsVerifyParams.builder()
.txt("google-site-verification=k3XwPq7Zr2Lm9Vt4Yb"
+ "8Nc1Hd6Jf0Sg5Ua3Ee7Ww2Ii4")
.name("example.com")
.build();
Verification answer = mailset.domains().verify(params);
System.out.println(answer);
use mailset::types::DomainsVerifyParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.verify(DomainsVerifyParams {
name: "example.com".into(),
txt: concat!(
"google-site-verification=",
"k3XwPq7Zr2Lm9Vt4Yb8Nc1Hd6Jf0Sg5Ua3Ee7Ww2Ii4",
)
.into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.verify \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"txt":"google-site-verification=k3XwPq7Zr2Lm9Vt4Yb8Nc1Hd6Jf0Sg5Ua3Ee7Ww2Ii4","name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains verify example.com --txt "google-site-verification=k3XwPq7Zr2Lm9Vt4Yb8Nc1Hd6Jf0Sg5Ua3Ee7Ww2Ii4"
{
"ok": true,
"data": {
"name": "Acme API",
"host": "text",
"relative": "text",
"type": "TXT",
"value": "text",
"strings": [
"text"
],
"state": "live",
"already": true,
"written": true,
"writable": true,
"dnsHost": "text",
"dnsPage": "text",
"problem": "text"
}
}
domains.status
A domain’s setup checklist: where each step stands and the next command for it, steps on other sites included.
POST/v1/domains.status
Parameters
The domain’s name, such as
example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
One of
mailsendingparkedOne of
pendingreceivingreadyparkedOne of
pendingreadyblockedWhen its records were last checked. The rows that read DNS read it now.
Show child attributesHide child attributes
One of
dnsmta_stsdmarclogocertificatepostmastercampaignsmailboxesyahoosender_photosold_providerOne of
oktodomanualinfoWhere it stands, in a sentence or two.
What to run next: a
mailsetcommand, ormailset guide <topic>for a step on another site. Null when nothing is left to do.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.status({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.status({"name": "example.com"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsStatusParams{
Name: "example.com",
}
answer, err := client.Domains.Status(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.status(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->status([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainChecklist;
import app.mailset.model.DomainsStatusParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsStatusParams.builder()
.name("example.com")
.build();
DomainChecklist answer = mailset.domains().status(params);
System.out.println(answer);
use mailset::types::DomainsStatusParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.status(DomainsStatusParams {
name: "example.com".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.status \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains status example.com
{
"ok": true,
"data": {
"name": "Acme API",
"kind": "mail",
"status": "pending",
"sending": "pending",
"checkedAt": 1796048940000,
"rows": [
{
"id": "dns",
"title": "text",
"state": "ok",
"detail": "text",
"next": "eyJhIjoxNzk2MDkyNDQyfQ"
}
]
}
}
domains.connect
One-click setup: a link to the DNS host’s own page, where you approve Mailset’s records once, for a host Mailset can’t write that supports Domain Connect.
POST/v1/domains.connect
Parameters
The domain’s name, such as
example.com.Only what sending needs: the DKIM and bounce records.
Default
false.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
The DNS host, as it names itself. Null when Mailset can’t tell.
Mailset writes this zone itself, so
domains applyneeds no link.Show child attributesHide child attributes
Which of Mailset’s templates the page applies:
mail,sending,tracking,parkorlogo.One of
mailsendingtrackingparklogoThe DNS host’s page where the domain’s owner approves the records.
What the page adds, as
domains checklists them.
Records no link covers, to add by hand.
Steps the links can’t take, in sentences.
Why there’s no link, in a sentence. Null when there is one, or nothing is left to add.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.domains.connect({
name: "example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.domains.connect({"name": "example.com"})
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_TOKEN from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.DomainsConnectParams{
Name: "example.com",
}
answer, err := client.Domains.Connect(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.domains.connect(name: 'example.com')
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->domains->connect([
'name' => 'example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DomainConnect;
import app.mailset.model.DomainsConnectParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = DomainsConnectParams.builder()
.name("example.com")
.build();
DomainConnect answer = mailset.domains().connect(params);
System.out.println(answer);
use mailset::types::DomainsConnectParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.domains()
.connect(DomainsConnectParams {
name: "example.com".into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/domains.connect \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"example.com"},"org":"org_3f9a1c0e7b2d"}'
curl can’t sign a request. $TOKEN is your credential’s token, and $MS_TIME and $MS_PROOF sign this exact body: Calling the API without an SDK shows how.
mailset domains connect example.com
{
"ok": true,
"data": {
"name": "Acme API",
"dnsHost": "text",
"writable": true,
"links": [
{
"service": "mail",
"url": "https://hooks.example.com/mailset",
"records": [
{
"type": "text",
"host": "text",
"value": "text",
"priority": 1
}
]