Account
Deactivate or delete your own account.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
account.deactivate
Deactivate your account: you can’t sign in, your mail stays.
POST/v1/account.deactivate
Parameters
It takes no input: send an empty object.
Beside input
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:
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.account.deactivate();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.account.deactivate()
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.Account.Deactivate(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.account.deactivate
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->account->deactivate();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.AccountDeactivateResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
AccountDeactivateResult answer =
mailset.account().deactivate();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.account().deactivate().await?;
println!("{answer:?}");
curl https://mailset.app/v1/account.deactivate \
-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 account deactivate
{
"ok": true,
"data": {
"deactivated": true
}
}
account.deletionPlan
Show what deleting your account would remove, and what stays.
POST/v1/account.deletionPlan
Parameters
It takes no input: send an empty object.
Returns
data is an object with:
Null: nothing is scheduled.
Each one has to be sorted out first.
Mailboxes only you can open, in orgs that carry on: they go to an owner first.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.account.deletionPlan();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.account.deletion_plan()
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.Account.DeletionPlan(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.account.deletion_plan
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->account->deletionPlan();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DeletionPlan;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
DeletionPlan answer = mailset.account().deletionPlan();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.account().deletion_plan().await?;
println!("{answer:?}");
curl https://mailset.app/v1/account.deletionPlan \
-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 account deletionPlan
{
"ok": true,
"data": {
"scheduledFor": 1,
"graceDays": 1,
"blockers": [
"text"
],
"removes": {
"mailboxes": [
{
"address": "moc.elpmaxe@olleh",
"messages": 1,
"bytes": 20480
}
],
"orgs": [
"text"
account.delete
Delete your account, after a grace period you can cancel in.
POST/v1/account.delete
Parameters
It takes no input: send an empty object.
Beside input
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:
Null: nothing is scheduled.
Each one has to be sorted out first.
Mailboxes only you can open, in orgs that carry on: they go to an owner first.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.account.delete();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.account.delete()
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.Account.Delete(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.account.delete
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->account->delete();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DeletionPlan;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
DeletionPlan answer = mailset.account().delete();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.account().delete().await?;
println!("{answer:?}");
curl https://mailset.app/v1/account.delete \
-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 account delete
{
"ok": true,
"data": {
"scheduledFor": 1,
"graceDays": 1,
"blockers": [
"text"
],
"removes": {
"mailboxes": [
{
"address": "moc.elpmaxe@olleh",
"messages": 1,
"bytes": 20480
}
],
"orgs": [
"text"
account.cancelDeletion
Stop your account from being deleted.
POST/v1/account.cancelDeletion
Parameters
It takes no input: send an empty object.
Returns
data is an object with:
Null: nothing is scheduled.
Each one has to be sorted out first.
Mailboxes only you can open, in orgs that carry on: they go to an owner first.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.account.cancelDeletion();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.account.cancel_deletion()
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.Account.CancelDeletion(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.account.cancel_deletion
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->account->cancelDeletion();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.DeletionPlan;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
DeletionPlan answer = mailset.account().cancelDeletion();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.account().cancel_deletion().await?;
println!("{answer:?}");
curl https://mailset.app/v1/account.cancelDeletion \
-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 account cancelDeletion
{
"ok": true,
"data": {
"scheduledFor": 1,
"graceDays": 1,
"blockers": [
"text"
],
"removes": {
"mailboxes": [
{
"address": "moc.elpmaxe@olleh",
"messages": 1,
"bytes": 20480
}
],
"orgs": [
"text"