Postmaster
How Gmail sees each of your domains.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
postmaster.status
The Google account connected to Postmaster Tools, and Gmail’s view of each domain.
POST/v1/postmaster.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:
Whether a Google account can be connected.
Show child attributesHide child attributes
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.postmaster.status();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.postmaster.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.Postmaster.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.postmaster.status
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->postmaster->status();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.PostmasterStatus;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
PostmasterStatus answer = mailset.postmaster().status();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.postmaster().status().await?;
println!("{answer:?}");
curl https://mailset.app/v1/postmaster.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 postmaster status
{
"ok": true,
"data": {
"available": true,
"connection": {
"state": "connected",
"account": "text",
"reason": "The day’s sending limit is reached.",
"connectedAt": 1796048940000
},
"domains": [
{
"name": "Acme API",
"sending": true,
"record": {
"host": "text",
"type": "TXT",
"value": "text",
postmaster.connect
Connect a Google account so Mailset can read Gmail’s numbers: opens Google.
POST/v1/postmaster.connect
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:
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.postmaster.connect();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.postmaster.connect()
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.Postmaster.Connect(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.postmaster.connect
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->postmaster->connect();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.PostmasterConnectResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
PostmasterConnectResult answer =
mailset.postmaster().connect();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.postmaster().connect().await?;
println!("{answer:?}");
curl https://mailset.app/v1/postmaster.connect \
-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 postmaster connect
{
"ok": true,
"data": {
"url": "https://hooks.example.com/mailset"
}
}
postmaster.disconnect
End Mailset’s access to Postmaster Tools at Google.
POST/v1/postmaster.disconnect
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:
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.postmaster.disconnect();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.postmaster.disconnect()
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.Postmaster.Disconnect(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.postmaster.disconnect
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->postmaster->disconnect();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.PostmasterDisconnectResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
PostmasterDisconnectResult answer =
mailset.postmaster().disconnect();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.postmaster().disconnect().await?;
println!("{answer:?}");
curl https://mailset.app/v1/postmaster.disconnect \
-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 postmaster disconnect
{
"ok": true,
"data": {
"disconnected": true
}
}