Mailboxes
Create mailboxes, and decide who holds each one.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
On this page
The Mailbox object
A mailbox you can open: its address, its kind and its people.
Attributes
The mailbox’s id.
Its address.
personfor one person’s mailbox,sharedfor a team’s.One of
personsharedThe addresses of the people who can open it.
People who held it and are deactivated. They can’t open it, and aren’t in
members.Default
[].What to call the people in
membersanddeactivated, by address, for those who have a name.Unread conversations in it.
Conversations in its Junk.
Conversations you have snoozed here.
A short-lived URL of its picture, or null when it has none.
The name its mail goes out under. Null sends with the address alone.
Default
null.The id of the org it belongs to.
Answered by
{
"id": "out_3f9a1c0e7b2d",
"address": "moc.elpmaxe@olleh",
"kind": "person",
"members": [
"text"
],
"deactivated": [
"text"
],
"names": {},
"unread": 1,
"junk": 1,
"snoozed": 1,
"picture": "text",
"name": "Acme API",
"org": "text"
}
mailboxes.list
List the mailboxes you can open.
POST/v1/mailboxes.list
Parameters
It takes no input: send an empty object.
Returns
data is a list of Mailbox objects.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.list();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.mailboxes.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.Mailboxes.List(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment.
mailset = Mailset::Client.new
answer = mailset.mailboxes.list
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->list();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Mailbox;
import java.util.List;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
List<Mailbox> answer = mailset.mailboxes().list();
System.out.println(answer);
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.mailboxes().list().await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.list \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{}}'
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 mailboxes list
{
"ok": true,
"data": [
{
"id": "out_3f9a1c0e7b2d",
"address": "moc.elpmaxe@olleh",
"kind": "person",
"members": [
"text"
],
"deactivated": [
"text"
],
"names": {},
"unread": 1,
"junk": 1,
"snoozed": 1,
"picture": "text",
"name": "Acme API",
"org": "text"
}
]
}
mailboxes.add
Add a mailbox on one of your domains.
POST/v1/mailboxes.add
Parameters
The new mailbox’s address, on one of the org’s domains.
personfor one person’s mail,sharedfor a team’s.One of
personsharedDefault
person.Who can open it. Empty means you.
Default
[].
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 mailbox’s id.
Its address.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.add({
kind: "shared",
members: [
"moc.elpmaxe@ana",
"moc.elpmaxe@neb",
],
address: "moc.elpmaxe@troppus",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.add(
{
"kind": "shared",
"members": ["moc.elpmaxe@ana", "moc.elpmaxe@neb"],
"address": "moc.elpmaxe@troppus",
}
)
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.MailboxesAddParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.mailboxes.add(
kind: 'shared',
members: ['moc.elpmaxe@ana', 'moc.elpmaxe@neb'],
address: 'moc.elpmaxe@troppus'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->add([
'kind' => 'shared',
'members' => ['moc.elpmaxe@ana', 'moc.elpmaxe@neb'],
'address' => 'moc.elpmaxe@troppus',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxKind;
import app.mailset.model.MailboxesAddParams;
import app.mailset.model.MailboxesAddResult;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesAddParams.builder()
.kind(MailboxKind.SHARED)
.members(List.of(
"moc.elpmaxe@ana",
"moc.elpmaxe@neb"))
.address("moc.elpmaxe@troppus")
.build();
MailboxesAddResult answer =
mailset.mailboxes().add(params);
System.out.println(answer);
use mailset::types::{MailboxKind, MailboxesAddParams};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.add(MailboxesAddParams {
address: "moc.elpmaxe@troppus".into(),
kind: Some(MailboxKind::Shared),
members: Some(vec![
"moc.elpmaxe@ana".into(),
"moc.elpmaxe@neb".into(),
]),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.add \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"kind":"shared","members":["moc.elpmaxe@ana","moc.elpmaxe@neb"],"address":"moc.elpmaxe@troppus"},"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 mailboxes add moc.elpmaxe@troppus --kind shared --members moc.elpmaxe@ana,moc.elpmaxe@neb
{
"ok": true,
"data": {
"id": "out_3f9a1c0e7b2d",
"address": "moc.elpmaxe@olleh"
}
}
mailboxes.grant
Give someone in the org access to a mailbox.
POST/v1/mailboxes.grant
Parameters
The mailbox’s address.
The member’s address.
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 mailbox’s address.
Everyone who can open it now, by address.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.grant({
member: "moc.elpmaxe@neb",
address: "moc.elpmaxe@troppus",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.grant(
{
"member": "moc.elpmaxe@neb",
"address": "moc.elpmaxe@troppus",
}
)
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.MailboxesGrantParams{
Member: "moc.elpmaxe@neb",
Address: "moc.elpmaxe@troppus",
}
answer, err := client.Mailboxes.Grant(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.mailboxes.grant(
member: 'moc.elpmaxe@neb',
address: 'moc.elpmaxe@troppus'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->grant([
'member' => 'moc.elpmaxe@neb',
'address' => 'moc.elpmaxe@troppus',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesGrantParams;
import app.mailset.model.MailboxesGrantResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesGrantParams.builder()
.member("moc.elpmaxe@neb")
.address("moc.elpmaxe@troppus")
.build();
MailboxesGrantResult answer =
mailset.mailboxes().grant(params);
System.out.println(answer);
use mailset::types::MailboxesGrantParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.grant(MailboxesGrantParams {
address: "moc.elpmaxe@troppus".into(),
member: "moc.elpmaxe@neb".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.grant \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"member":"moc.elpmaxe@neb","address":"moc.elpmaxe@troppus"},"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 mailboxes grant moc.elpmaxe@troppus --member moc.elpmaxe@neb
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"members": [
"text"
]
}
}
mailboxes.revoke
Take someone out of a mailbox.
POST/v1/mailboxes.revoke
Parameters
The mailbox’s address.
The member’s address.
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 mailbox’s address.
Everyone who can open it now, by address.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.revoke({
member: "moc.elpmaxe@neb",
address: "moc.elpmaxe@troppus",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.revoke(
{
"member": "moc.elpmaxe@neb",
"address": "moc.elpmaxe@troppus",
}
)
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.MailboxesRevokeParams{
Member: "moc.elpmaxe@neb",
Address: "moc.elpmaxe@troppus",
}
answer, err := client.Mailboxes.Revoke(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.mailboxes.revoke(
member: 'moc.elpmaxe@neb',
address: 'moc.elpmaxe@troppus'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->revoke([
'member' => 'moc.elpmaxe@neb',
'address' => 'moc.elpmaxe@troppus',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesRevokeParams;
import app.mailset.model.MailboxesRevokeResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesRevokeParams.builder()
.member("moc.elpmaxe@neb")
.address("moc.elpmaxe@troppus")
.build();
MailboxesRevokeResult answer =
mailset.mailboxes().revoke(params);
System.out.println(answer);
use mailset::types::MailboxesRevokeParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.revoke(MailboxesRevokeParams {
address: "moc.elpmaxe@troppus".into(),
member: "moc.elpmaxe@neb".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.revoke \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"member":"moc.elpmaxe@neb","address":"moc.elpmaxe@troppus"},"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 mailboxes revoke moc.elpmaxe@troppus --member moc.elpmaxe@neb
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"members": [
"text"
]
}
}
mailboxes.all
List every mailbox in the org, and who holds each.
POST/v1/mailboxes.all
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 objects, each with:
One of
personsharedFalse: mail to it is refused.
Set when its brake stopped the mail people write from it. An owner or admin ends it with
mailboxes.resume.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.all();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.all()
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.Mailboxes.All(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.mailboxes.all
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->all();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.OrgMailbox;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
List<OrgMailbox> answer = mailset.mailboxes().all();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.mailboxes().all().await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.all \
-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 mailboxes all
{
"ok": true,
"data": [
{
"id": "out_3f9a1c0e7b2d",
"address": "moc.elpmaxe@olleh",
"kind": "person",
"people": [
{
"email": "moc.elpmaxe@olleh",
"access": "owner",
"deactivated": true
}
],
"aliases": [
"text"
],
"receiving": true,
"paused": {
"reason": "The day’s sending limit is reached.",
"at": 1796048940000
}
}
]
}
mailboxes.deletePlan
Show exactly what deleting a mailbox would destroy.
POST/v1/mailboxes.deletePlan
Parameters
The mailbox’s address.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
One of
personsharedStored files that go with it.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.deletePlan({
address: "moc.elpmaxe@dlo",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.delete_plan(
{"address": "moc.elpmaxe@dlo"}
)
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.MailboxesDeletePlanParams{
Address: "moc.elpmaxe@dlo",
}
answer, err := client.Mailboxes.DeletePlan(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.mailboxes.delete_plan(
address: 'moc.elpmaxe@dlo'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->deletePlan([
'address' => 'moc.elpmaxe@dlo',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxDeletionPlan;
import app.mailset.model.MailboxesDeletePlanParams;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesDeletePlanParams.builder()
.address("moc.elpmaxe@dlo")
.build();
MailboxDeletionPlan answer =
mailset.mailboxes().deletePlan(params);
System.out.println(answer);
use mailset::types::MailboxesDeletePlanParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.delete_plan(MailboxesDeletePlanParams {
address: "moc.elpmaxe@dlo".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.deletePlan \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"address":"moc.elpmaxe@dlo"},"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 mailboxes deletePlan moc.elpmaxe@dlo
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"kind": "person",
"people": [
"text"
],
"conversations": 1,
"messages": 1,
"attachments": 1,
"drafts": 1,
"scheduled": 1,
"aliases": [
"text"
],
"groups": [
"text"
],
"objects": 1,
"bytes": 20480
}
}
mailboxes.delete
Delete a mailbox and all its mail for good.
POST/v1/mailboxes.delete
Parameters
The mailbox’s address.
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:
Always true: the mailbox is gone.
How many stored files went with it.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.delete({
address: "moc.elpmaxe@dlo",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.delete(
{"address": "moc.elpmaxe@dlo"}
)
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.MailboxesDeleteParams{
Address: "moc.elpmaxe@dlo",
}
answer, err := client.Mailboxes.Delete(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.mailboxes.delete(
address: 'moc.elpmaxe@dlo'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->delete([
'address' => 'moc.elpmaxe@dlo',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesDeleteParams;
import app.mailset.model.MailboxesDeleteResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesDeleteParams.builder()
.address("moc.elpmaxe@dlo")
.build();
MailboxesDeleteResult answer =
mailset.mailboxes().delete(params);
System.out.println(answer);
use mailset::types::MailboxesDeleteParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.delete(MailboxesDeleteParams {
address: "moc.elpmaxe@dlo".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.delete \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"address":"moc.elpmaxe@dlo"},"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 mailboxes delete moc.elpmaxe@dlo
{
"ok": true,
"data": {
"deleted": true,
"objects": 1
}
}
mailboxes.receiving
Accept or refuse new mail to a mailbox.
POST/v1/mailboxes.receiving
Parameters
The mailbox’s address.
True to accept new mail, false to refuse 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:
The mailbox’s address.
Whether it accepts new mail now.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.receiving({
receiving: false,
address: "moc.elpmaxe@dlo",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.receiving(
{"receiving": False, "address": "moc.elpmaxe@dlo"}
)
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.MailboxesReceivingParams{
Receiving: false,
Address: "moc.elpmaxe@dlo",
}
answer, err := client.Mailboxes.Receiving(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.mailboxes.receiving(
receiving: false,
address: 'moc.elpmaxe@dlo'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->receiving([
'receiving' => false,
'address' => 'moc.elpmaxe@dlo',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesReceivingParams;
import app.mailset.model.MailboxesReceivingResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesReceivingParams.builder()
.receiving(false)
.address("moc.elpmaxe@dlo")
.build();
MailboxesReceivingResult answer =
mailset.mailboxes().receiving(params);
System.out.println(answer);
use mailset::types::MailboxesReceivingParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.receiving(MailboxesReceivingParams {
address: "moc.elpmaxe@dlo".into(),
receiving: false,
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.receiving \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"receiving":false,"address":"moc.elpmaxe@dlo"},"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 mailboxes receiving moc.elpmaxe@dlo --receiving false
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"receiving": true
}
}
mailboxes.resume
Let a mailbox its brake paused send again, once you know why it was.
POST/v1/mailboxes.resume
Parameters
The mailbox’s address.
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 mailbox’s address.
True when it was paused and may send again.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.resume({
address: "moc.elpmaxe@ana",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.resume(
{"address": "moc.elpmaxe@ana"}
)
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.MailboxesResumeParams{
Address: "moc.elpmaxe@ana",
}
answer, err := client.Mailboxes.Resume(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.mailboxes.resume(
address: 'moc.elpmaxe@ana'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->resume([
'address' => 'moc.elpmaxe@ana',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesResumeParams;
import app.mailset.model.MailboxesResumeResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesResumeParams.builder()
.address("moc.elpmaxe@ana")
.build();
MailboxesResumeResult answer =
mailset.mailboxes().resume(params);
System.out.println(answer);
use mailset::types::MailboxesResumeParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.resume(MailboxesResumeParams {
address: "moc.elpmaxe@ana".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.resume \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"address":"moc.elpmaxe@ana"},"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 mailboxes resume moc.elpmaxe@ana
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"resumed": true
}
}
mailboxes.reassign
Give a mailbox to one person. Everyone else loses it.
POST/v1/mailboxes.reassign
Parameters
The mailbox’s address.
The member who gets it, by address.
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 mailbox’s address.
Everyone who can open it now: the one person.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.reassign({
to: "moc.elpmaxe@ana",
address: "moc.elpmaxe@neb",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.reassign(
{
"to": "moc.elpmaxe@ana",
"address": "moc.elpmaxe@neb",
}
)
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.MailboxesReassignParams{
To: "moc.elpmaxe@ana",
Address: "moc.elpmaxe@neb",
}
answer, err := client.Mailboxes.Reassign(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.mailboxes.reassign(
to: 'moc.elpmaxe@ana',
address: 'moc.elpmaxe@neb'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->reassign([
'to' => 'moc.elpmaxe@ana',
'address' => 'moc.elpmaxe@neb',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesReassignParams;
import app.mailset.model.MailboxesReassignResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesReassignParams.builder()
.to("moc.elpmaxe@ana")
.address("moc.elpmaxe@neb")
.build();
MailboxesReassignResult answer =
mailset.mailboxes().reassign(params);
System.out.println(answer);
use mailset::types::MailboxesReassignParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.reassign(MailboxesReassignParams {
address: "moc.elpmaxe@neb".into(),
to: "moc.elpmaxe@ana".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.reassign \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"to":"moc.elpmaxe@ana","address":"moc.elpmaxe@neb"},"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 mailboxes reassign moc.elpmaxe@neb --to moc.elpmaxe@ana
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"members": [
"text"
]
}
}
mailboxes.name
Set the name a mailbox’s mail goes out under.
POST/v1/mailboxes.name
Parameters
The mailbox’s address.
The name its mail goes out under. Empty clears it.
At most 200 characters.
Beside input
The org this is about. Needed when the caller is in more than one.
Returns
data is an object with:
The mailbox’s address.
The name it has now. Null: it sends with the address alone.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.mailboxes.name({
name: "Acme Support",
address: "moc.elpmaxe@troppus",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.mailboxes.name(
{
"name": "Acme Support",
"address": "moc.elpmaxe@troppus",
}
)
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.MailboxesNameParams{
Name: "Acme Support",
Address: "moc.elpmaxe@troppus",
}
answer, err := client.Mailboxes.Name(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.mailboxes.name(
name: 'Acme Support',
address: 'moc.elpmaxe@troppus'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->mailboxes->name([
'name' => 'Acme Support',
'address' => 'moc.elpmaxe@troppus',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.MailboxesNameParams;
import app.mailset.model.MailboxesNameResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = MailboxesNameParams.builder()
.name("Acme Support")
.address("moc.elpmaxe@troppus")
.build();
MailboxesNameResult answer =
mailset.mailboxes().name(params);
System.out.println(answer);
use mailset::types::MailboxesNameParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.mailboxes()
.name(MailboxesNameParams {
address: "moc.elpmaxe@troppus".into(),
name: "Acme Support".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/mailboxes.name \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"name":"Acme Support","address":"moc.elpmaxe@troppus"},"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 mailboxes name moc.elpmaxe@troppus --name "Acme Support"
{
"ok": true,
"data": {
"address": "moc.elpmaxe@olleh",
"name": "Acme API"
}
}