Sending domains
Sending-only subdomains, their suppressions, and your org’s limits.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
On this page
The Sending domain object
A subdomain that only sends: its DNS records and whether it can send.
Attributes
The sending domain.
Where its links and opens go. Null: its mail is never tracked.
pending: not ready yet.ready: it can send.failing: it was ready and a check stopped passing.paused: its brake stopped its mail.One of
pendingreadyfailingpausedWhat the last check found.
Show child attributesHide child attributes
Its DKIM records are in place.
Its bounce record is in place.
The tracking domain points at Mailset. False with no tracking domain.
The tracking domain’s certificate is issued. False with no tracking domain.
The DNS records it needs, and whether each is in place.
Show child attributesHide child attributes
What the record is for:
dkimanddkim2sign its mail,bouncetakes its bounces,trackingpoints the tracking domain at Mailset,mxtakes mail for its aliases or route.One of
dkimdkim2bouncetrackingmxThe record’s type.
One of
CNAMETXTMXThe record’s name, in full.
What the record has to hold.
The MX’s priority. No other record has one.
Whether DNS answered with it at the last check.
Why its brake stopped its mail. Null while it may send.
The hook every message to the domain goes to (
sending domains route). Null without one.When it was added, in ms since the epoch.
One-click setup (Domain Connect): links to the DNS host’s own page that add the records still missing, where the host has Mailset’s templates. Only on
addandcheck. Open one in a browser to approve it there.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.
Answered by
sending.domains.addsending.domains.checksending.domains.listsending.domains.routesending.domains.resume
{
"domain": "example.com",
"trackingDomain": "example.com",
"state": "pending",
"checks": {
"dkim": true,
"bounce": true,
"tracking": true,
"trackingTls": true
},
"records": [
{
"purpose": "dkim",
"type": "CNAME",
"host": "text",
"value": "text",
"priority": 1,
"ok": true
The Suppression object
An address a sending domain no longer writes to, and why.
Attributes
The address the domain won’t write to.
bounced(a hard bounce of classmailbox,domainorsuppressed) orcomplained(a spam report).When it was suppressed, in ms since the epoch.
Answered by
{
"address": "moc.elpmaxe@olleh",
"reason": "The day’s sending limit is reached.",
"at": 1796048940000
}
sending.domains.add
Add a sending domain, with a tracking domain or without.
POST/v1/sending.domains.add
Parameters
The sending domain, such as
news.example.com.Where its links and opens go: a CNAME to Mailset’s link host, on the same registered domain. Left out, its mail is never tracked, and the domain may be the registered domain itself (
example.com), for replies sent as its support address.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is the Sending domain object.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.domains.add({
trackingDomain: "link.example.com",
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.domains.add(
{
"tracking_domain": "link.example.com",
"domain": "news.example.com",
}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingDomainsAddParams{
TrackingDomain: mailset.String("link.example.com"),
Domain: "news.example.com",
}
answer, err := client.Sending.Domains.Add(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.domains.add(
tracking_domain: 'link.example.com',
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->domains->add([
'trackingDomain' => 'link.example.com',
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingDomain;
import app.mailset.model.SendingDomainsAddParams;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingDomainsAddParams.builder()
.trackingDomain("link.example.com")
.domain("news.example.com")
.build();
SendingDomain answer =
mailset.sending().domains().add(params);
System.out.println(answer);
use mailset::types::SendingDomainsAddParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.domains()
.add(SendingDomainsAddParams {
domain: "news.example.com".into(),
tracking_domain: Some(Some(
"link.example.com".into(),
)),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.domains.add \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"trackingDomain":"link.example.com","domain":"news.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 sending domains add news.example.com --tracking-domain link.example.com
{
"ok": true,
"data": {
"domain": "example.com",
"trackingDomain": "example.com",
"state": "pending",
"checks": {
"dkim": true,
"bounce": true,
"tracking": true,
"trackingTls": true
},
"records": [
{
"purpose": "dkim",
"type": "CNAME",
"host": "text",
"value": "text",
sending.domains.check
Check a sending domain’s records and certificate now.
POST/v1/sending.domains.check
Parameters
The sending domain, such as
news.example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is the Sending domain object.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.domains.check({
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.domains.check(
{"domain": "news.example.com"}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingDomainsCheckParams{
Domain: "news.example.com",
}
answer, err := client.Sending.Domains.Check(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.domains.check(
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->domains->check([
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingDomain;
import app.mailset.model.SendingDomainsCheckParams;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingDomainsCheckParams.builder()
.domain("news.example.com")
.build();
SendingDomain answer =
mailset.sending().domains().check(params);
System.out.println(answer);
use mailset::types::SendingDomainsCheckParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.domains()
.check(SendingDomainsCheckParams {
domain: "news.example.com".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.domains.check \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"domain":"news.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 sending domains check news.example.com
{
"ok": true,
"data": {
"domain": "example.com",
"trackingDomain": "example.com",
"state": "pending",
"checks": {
"dkim": true,
"bounce": true,
"tracking": true,
"trackingTls": true
},
"records": [
{
"purpose": "dkim",
"type": "CNAME",
"host": "text",
"value": "text",
sending.domains.list
List the sending domains, their checks and records.
POST/v1/sending.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 Sending domain objects.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.domains.list();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.domains.list()
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
answer, err := client.Sending.Domains.List(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.domains.list
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->domains->list();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingDomain;
import java.util.List;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
List<SendingDomain> answer =
mailset.sending().domains().list();
System.out.println(answer);
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.sending().domains().list().await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.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 sending domains list
{
"ok": true,
"data": [
{
"domain": "example.com",
"trackingDomain": "example.com",
"state": "pending",
"checks": {
"dkim": true,
"bounce": true,
"tracking": true,
"trackingTls": true
},
"records": [
{
"purpose": "dkim",
"type": "CNAME",
"host": "text",
sending.domains.remove
Remove a sending domain; mail still waiting is dropped.
POST/v1/sending.domains.remove
Parameters
The sending domain, such as
news.example.com.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
True when the domain was there to remove.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.domains.remove({
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.domains.remove(
{"domain": "news.example.com"}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingDomainsRemoveParams{
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.domains.remove(
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->domains->remove([
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingDomainsRemoveParams;
import app.mailset.model.SendingDomainsRemoveResult;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingDomainsRemoveParams.builder()
.domain("news.example.com")
.build();
SendingDomainsRemoveResult answer =
mailset.sending().domains().remove(params);
System.out.println(answer);
use mailset::types::SendingDomainsRemoveParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.domains()
.remove(SendingDomainsRemoveParams {
domain: "news.example.com".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.domains.remove \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"domain":"news.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 sending domains remove news.example.com
{
"ok": true,
"data": {
"removed": true
}
}
sending.domains.route
Send every message to a sending domain to a webhook.
POST/v1/sending.domains.route
Parameters
The sending domain, such as
news.example.com.Where every message to the domain is POSTed: an https URL on a public host name.
At most 500 characters.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
The domain as it is now.
The route’s signing secret, shown this once.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.domains.route({
url: "https://app.example.com/hooks/replies",
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.domains.route(
{
"url": "https://app.example.com/hooks/replies",
"domain": "news.example.com",
}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingDomainsRouteParams{
URL: "https://app.example.com/hooks/replies",
Domain: "news.example.com",
}
answer, err := client.Sending.Domains.Route(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.domains.route(
url: 'https://app.example.com/hooks/replies',
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->domains->route([
'url' => 'https://app.example.com/hooks/replies',
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingDomainRouted;
import app.mailset.model.SendingDomainsRouteParams;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingDomainsRouteParams.builder()
.url("https://app.example.com/hooks/replies")
.domain("news.example.com")
.build();
SendingDomainRouted answer =
mailset.sending().domains().route(params);
System.out.println(answer);
use mailset::types::SendingDomainsRouteParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.domains()
.route(SendingDomainsRouteParams {
domain: "news.example.com".into(),
url: "https://app.example.com/hooks/replies"
.into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.domains.route \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"url":"https://app.example.com/hooks/replies","domain":"news.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 sending domains route news.example.com --url https://app.example.com/hooks/replies
{
"ok": true,
"data": {
"domain": {
"domain": "example.com",
"trackingDomain": "example.com",
"state": "pending",
"checks": {
"dkim": true,
"bounce": true,
"tracking": true,
"trackingTls": true
},
"records": [
{
"purpose": "dkim",
"type": "CNAME",
"host": "text",
sending.submit
Send one whole message from a sending domain, the way a reply goes.
POST/v1/sending.submit
Parameters
The sending domain the message goes from.
The whole RFC 5322 message, base64, up to 20 MB. From is an address at the domain.
At most 27,962,035 characters.
Your own id for the message: 1 to 64 letters, digits, - or _. It comes back on its events.
The envelope: who it goes to. Left out, everyone the message names in To, Cc and Bcc, each once whatever its case.
1 to 50 items.
Beside input
The org this is about. Needed when the caller is in more than one.
The body may be up to 28 MB.
Returns
data is an object with:
One result per envelope address, in order.
Show child attributesHide child attributes
The envelope address.
Mailset’s id for this address’s copy. Its events carry it as
message.queued: it will go.Always
queuedWhy it wasn’t taken.
suppressed: the address bounced or reported spam from this domain before.invalid: the message is wrong, or the address can’t or won’t get it.paused: the domain is paused or isn’t ready.One of
suppressedinvalidpausedThe refusal, in words.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.submit({
ref: "ticket-4821",
domain: "news.example.com",
from: "Acme Support <moc.elpmaxe.swen@troppus>",
to: "moc.elpmaxe@airam",
subject: "Re: your order",
text: "It ships tomorrow.",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.submit(
{
"ref": "ticket-4821",
"domain": "news.example.com",
"from": "Acme Support <moc.elpmaxe.swen@troppus>",
"to": "moc.elpmaxe@airam",
"subject": "Re: your order",
"text": "It ships tomorrow.",
}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingSubmitParams{
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.submit(
ref: 'ticket-4821',
domain: 'news.example.com',
from: 'Acme Support <moc.elpmaxe.swen@troppus>',
to: 'moc.elpmaxe@airam',
subject: 'Re: your order',
text: 'It ships tomorrow.'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->submit(
'news.example.com',
'ticket-4821',
[
'from' =>
'Acme Support <moc.elpmaxe.swen@troppus>',
'to' => 'moc.elpmaxe@airam',
'subject' => 'Re: your order',
'text' => 'It ships tomorrow.',
],
);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.Message;
import app.mailset.SendingSubmit;
import app.mailset.model.SendingSubmitted;
// Reads MAILSET_KEY from the environment,
// a campaigns key.
Mailset mailset = Mailset.fromEnv();
var message = Message.builder()
.from("Acme Support <moc.elpmaxe.swen@troppus>")
.to("moc.elpmaxe@airam")
.subject("Re: your order")
.text("It ships tomorrow.")
.build();
var reply = SendingSubmit.builder()
.domain("news.example.com")
.ref("ticket-4821")
.message(message)
.build();
SendingSubmitted answer = mailset.sending().submit(reply);
System.out.println(answer);
use mailset::Message;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let reply = Message::builder()
.from("Acme Support <moc.elpmaxe.swen@troppus>")
.to("moc.elpmaxe@airam")
.subject("Re: your order")
.text("It ships tomorrow.");
let answer = mailset
.sending()
.submit("news.example.com", "ticket-4821", reply)
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.submit \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"ref":"ticket-4821","domain":"news.example.com","name":"reply.eml","raw":"<the message as base64>"},"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. <the message as base64> is a whole email, headers and body: Send your own MIME.
mailset sending submit news.example.com --ref ticket-4821 --file reply.eml
{
"ok": true,
"data": {
"results": [
{
"address": "moc.elpmaxe@olleh",
"id": "out_3f9a1c0e7b2d",
"state": "queued"
}
]
}
}
sending.domains.resume
Let a sending domain its brake paused send again, once you know why it was.
POST/v1/sending.domains.resume
Parameters
The sending domain, such as
news.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 Sending domain object.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.domains.resume({
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.sending.domains.resume(
{"domain": "news.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.SendingDomainsResumeParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.sending.domains.resume(
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->domains->resume([
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingDomain;
import app.mailset.model.SendingDomainsResumeParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingDomainsResumeParams.builder()
.domain("news.example.com")
.build();
SendingDomain answer =
mailset.sending().domains().resume(params);
System.out.println(answer);
use mailset::types::SendingDomainsResumeParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.domains()
.resume(SendingDomainsResumeParams {
domain: "news.example.com".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.domains.resume \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"domain":"news.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 sending domains resume news.example.com
{
"ok": true,
"data": {
"domain": "example.com",
"trackingDomain": "example.com",
"state": "pending",
"checks": {
"dkim": true,
"bounce": true,
"tracking": true,
"trackingTls": true
},
"records": [
{
"purpose": "dkim",
"type": "CNAME",
"host": "text",
"value": "text",
sending.suppressions.list
The addresses a sending domain won’t write to.
POST/v1/sending.suppressions.list
Parameters
The sending domain, such as
news.example.com.The
nextof the page before, for the page after it.At most 400 characters.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
One page of the suppressed addresses.
Pass it as
cursorfor the next page. Null on the last one.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.suppressions.list({
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.suppressions.list(
{"domain": "news.example.com"}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingSuppressionsListParams{
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.suppressions.list(
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->suppressions->list([
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingSuppressionsListParams;
import app.mailset.model.SuppressionPage;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingSuppressionsListParams.builder()
.domain("news.example.com")
.build();
SuppressionPage answer =
mailset.sending().suppressions().list(params);
System.out.println(answer);
use mailset::types::SendingSuppressionsListParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.suppressions()
.list(SendingSuppressionsListParams {
domain: "news.example.com".into(),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.suppressions.list \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"domain":"news.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 sending suppressions list news.example.com
{
"ok": true,
"data": {
"suppressions": [
{
"address": "moc.elpmaxe@olleh",
"reason": "The day’s sending limit is reached.",
"at": 1796048940000
}
],
"next": "eyJhIjoxNzk2MDkyNDQyfQ"
}
}
sending.suppressions.remove
Let a sending domain write to an address again.
POST/v1/sending.suppressions.remove
Parameters
The sending domain, such as
news.example.com.The address the domain may write to again.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
True when the address was suppressed.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.suppressions.remove({
address: "moc.elpmaxe@airam",
domain: "news.example.com",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.sending.suppressions.remove(
{
"address": "moc.elpmaxe@airam",
"domain": "news.example.com",
}
)
print(answer)
package main
import (
"context"
"fmt"
"log"
mailset "mailset.app/go"
)
func main() {
// Reads MAILSET_KEY from the environment.
client, err := mailset.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &mailset.SendingSuppressionsRemoveParams{
require 'mailset'
# Reads MAILSET_KEY from the environment: a campaigns key.
mailset = Mailset::Client.new
answer = mailset.sending.suppressions.remove(
address: 'moc.elpmaxe@airam',
domain: 'news.example.com'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->suppressions->remove([
'address' => 'moc.elpmaxe@airam',
'domain' => 'news.example.com',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingSuppressionsRemoveParams;
import app.mailset.model.SendingSuppressionsRemoveResult;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = SendingSuppressionsRemoveParams.builder()
.address("moc.elpmaxe@airam")
.domain("news.example.com")
.build();
SendingSuppressionsRemoveResult answer =
mailset.sending().suppressions().remove(params);
System.out.println(answer);
use mailset::types::SendingSuppressionsRemoveParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.sending()
.suppressions()
.remove(SendingSuppressionsRemoveParams {
domain: "news.example.com".into(),
address: "moc.elpmaxe@airam".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.suppressions.remove \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"address":"moc.elpmaxe@airam","domain":"news.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 sending suppressions remove news.example.com --address moc.elpmaxe@airam
{
"ok": true,
"data": {
"removed": true
}
}
sending.status
Show your org’s sending limits, and whether it is paused.
POST/v1/sending.status
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 an object with:
How far the org may send:
no_card(only to its own domains),trialorpaid.limitshas the numbers.One of
no_cardtrialpaidThe limits its tier sets.
Show child attributesHide child attributes
Recipients outside the org, per 24 hours. Null: no limit.
Recipients outside the org, ever. Null: no limit.
Recipients per minute. Null: no limit.
Recipients in one message, at most.
Recipients outside the org in the last 24 hours.
Recipients outside the org, ever.
What its campaigns may send outside the org in 24 hours: the day’s cap less the room kept for people’s mail. Null: no cap.
Campaign recipients outside the org in the last 24 hours, counted in
externalTodaytoo.Set when this org’s mail is stopped. Only Mailset support ends it.
Set while Mailset is holding mail from new and smaller accounts for now, to protect delivery for everyone.
Mailboxes whose own brake stopped the mail people write from them. An owner or admin resumes each with
mailboxes resume.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.sending.status();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.sending.status()
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.Sending.Status(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.sending.status
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->sending->status();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.SendingStatus;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
SendingStatus answer = mailset.sending().status();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.sending().status().await?;
println!("{answer:?}");
curl https://mailset.app/v1/sending.status \
-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 sending status
{
"ok": true,
"data": {
"tier": "no_card",
"limits": {
"externalPerDay": 12,
"externalTotal": 12,
"perMinute": 12,
"perMessage": 1
},
"externalToday": 1,
"externalTotal": 12,
"campaignsPerDay": 12,
"campaignsToday": 1,
"paused": {
"reason": "The day’s sending limit is reached.",
"at": 1796048940000
},