Account

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.

On this page
  1. account.deactivate
  2. account.deletionPlan
  3. account.delete
  4. account.cancelDeletion

account.deactivate

Deactivate your account: you can’t sign in, your mail stays.

POST/v1/account.deactivate

API tokenPasskey

Parameters

It takes no input: send an empty object.

Beside input

  • approvalstringoptional

    An approval’s id, once someone approved it with their passkey. Without one, the answer is step_up_required and names what to approve.

Returns

data is an object with:

  • deactivatedboolean

In the CLIErrors

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
Response
{
  "ok": true,
  "data": {
    "deactivated": true
  }
}

account.deletionPlan

Show what deleting your account would remove, and what stays.

POST/v1/account.deletionPlan

API token

Parameters

It takes no input: send an empty object.

Returns

data is an object with:

  • scheduledFornullable number

    Null: nothing is scheduled.

  • graceDaysnumber
  • blockersarray of strings

    Each one has to be sorted out first.

  • removesobject
    Show child attributesHide child attributes
    • mailboxesarray of objects
      Show child attributesHide child attributes
      • addressstring
      • messagesnumber
      • bytesnumber
    • orgsarray of strings
  • handsOverarray of objects

    Mailboxes only you can open, in orgs that carry on: they go to an owner first.

    Show child attributesHide child attributes
    • addressstring
    • tostring
  • staysobject
    Show child attributesHide child attributes
    • sharedMailboxesarray of strings

      Shared with someone else, so they carry on without you.

    • orgsarray of strings

In the CLIErrors

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
Response
{
  "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

API tokenPasskey

Parameters

It takes no input: send an empty object.

Beside input

  • approvalstringoptional

    An approval’s id, once someone approved it with their passkey. Without one, the answer is step_up_required and names what to approve.

Returns

data is an object with:

  • scheduledFornullable number

    Null: nothing is scheduled.

  • graceDaysnumber
  • blockersarray of strings

    Each one has to be sorted out first.

  • removesobject
    Show child attributesHide child attributes
    • mailboxesarray of objects
      Show child attributesHide child attributes
      • addressstring
      • messagesnumber
      • bytesnumber
    • orgsarray of strings
  • handsOverarray of objects

    Mailboxes only you can open, in orgs that carry on: they go to an owner first.

    Show child attributesHide child attributes
    • addressstring
    • tostring
  • staysobject
    Show child attributesHide child attributes
    • sharedMailboxesarray of strings

      Shared with someone else, so they carry on without you.

    • orgsarray of strings

In the CLIErrors

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
Response
{
  "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

API token

Parameters

It takes no input: send an empty object.

Returns

data is an object with:

  • scheduledFornullable number

    Null: nothing is scheduled.

  • graceDaysnumber
  • blockersarray of strings

    Each one has to be sorted out first.

  • removesobject
    Show child attributesHide child attributes
    • mailboxesarray of objects
      Show child attributesHide child attributes
      • addressstring
      • messagesnumber
      • bytesnumber
    • orgsarray of strings
  • handsOverarray of objects

    Mailboxes only you can open, in orgs that carry on: they go to an owner first.

    Show child attributesHide child attributes
    • addressstring
    • tostring
  • staysobject
    Show child attributesHide child attributes
    • sharedMailboxesarray of strings

      Shared with someone else, so they carry on without you.

    • orgsarray of strings

In the CLIErrors

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
Response
{
  "ok": true,
  "data": {
    "scheduledFor": 1,
    "graceDays": 1,
    "blockers": [
      "text"
    ],
    "removes": {
      "mailboxes": [
        {
          "address": "moc.elpmaxe@olleh",
          "messages": 1,
          "bytes": 20480
        }
      ],
      "orgs": [
        "text"