Settings

Settings

Your own preferences, on every device.

An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.

On this page
  1. settings.get
  2. settings.set

settings.get

Show your settings.

POST/v1/settings.get

API token

Parameters

It takes no input: send an empty object.

Returns

data is an object with:

  • densityenumoptional

    How tight lists are: comfortable or compact.

    One ofcomfortablecompact

    Default comfortable.

  • inboxTypeenumoptional

    How the inbox is cut up: sections, tabs, unread first (unread) or starred first (starred).

    One ofsectionstabsunreadstarred

    Default sections.

  • inboxTabsarray of enumsoptional

    Which categories are tabs of their own. The rest fold into Updates. primary always stays.

    One ofprimaryupdatesnewsletterspromotionsreceiptsnotifications

    Default ["primary","updates","newsletters","promotions"]. At most 6 items.

  • allInboxesHiddenarray of stringsoptional

    Mailboxes kept out of All inboxes. A new mailbox is in until you say otherwise.

    Default []. At most 500 items.

  • readingPaneenumoptional

    Where an open conversation shows beside the list: none, right or below.

    One ofnonerightbelow

    Default none.

  • timeFormatenumoptional

    How times read: 24-hour (18:00) or 12-hour (6:00 PM).

    One of24h12h

    Default 24h.

  • undoSecondsnumberoptional

    Seconds mail waits before it leaves, so it can be taken back: 5, 10, 20 or 30.

    Default 10.

  • conversationsbooleanoptional

    On folds older messages in a conversation. Off opens them all.

    Default true.

  • sendArchivebooleanoptional

    Show a button that sends a reply and archives the conversation.

    Default true.

  • imagesenumoptional

    Remote images in mail: ask before showing them, or always show them.

    One ofaskalways

    Default ask.

  • originalColorsarray of stringsoptional

    Senders whose mail shows in the colours it was sent in, never recoloured for the dark theme: the message’s Original colours switch, on the web and the iPhone. The newest go last.

    Default []. At most 500 items.

  • leaveAskbooleanoptional

    Ask before Unsubscribe opens a sender’s own page in a new tab.

    Default true.

  • shortcutsbooleanoptional

    Keyboard shortcuts on or off.

    Default true.

  • notifyenumoptional

    Which new mail notifies you: all, important, only mail from people, or none.

    One ofallimportantpeoplenone

    Default important.

  • notifyPerMailboxmap of enumsoptional

    Mailboxes that notify differently, by address: same as notify, all or none.

    Default {}.

  • previewenumoptional

    What a notification shows: the sender and subject (full), only the sender, or none.

    One offullsendernone

    Default sender.

  • pushbooleanoptional

    Push notifications on or off.

    Default true.

  • quietbooleanoptional

    Quiet hours: notifications from 22:00 to 07:00 are held, then arrive as one.

    Default true.

  • digestenumoptional

    A summary of new mail filed in your inbox: off, daily or weekly.

    One ofoffdailyweekly

    Default off.

  • aibooleanoptional

    AI on your mail. Off, none of your mail goes to a model.

    Default true.

  • triagebooleanoptional

    Sort mail into tabs and flag what needs a reply. Off, there’s one inbox.

    Default true.

  • summariesbooleanoptional

    A short summary on long conversations.

    Default true.

  • draftsbooleanoptional

    Draft replies written for you. Nothing is sent without you.

    Default true.

  • followUpsnumberoptional

    Days without an answer before mail you sent comes back: 2, 3, 5 or 7. 0 turns it off.

    Default 3.

  • phishingbooleanoptional

    Warn about mail that looks forged.

    Default true.

  • aliasReplyenumoptional

    The address a reply goes from: the one the mail reached (received), or your default address.

    One ofreceiveddefault

    Default received.

  • vacationbooleanoptional

    Whether your vacation replies may go out.

    Default false.

  • forwardingenumoptional

    Forwarding rules: allowed with a passkey check, or never.

    One ofpasskeynever

    Default passkey.

  • sharedAibooleanoptional

    Whether AI runs on shared mailboxes.

    Default true.

  • sessionDaysnumberoptional

    How long a new sign-in lasts, in days: 30, 7 or 0.5 (12 hours).

    Default 30.

In the CLIErrors

import { Mailset } from 'mailset';

// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();

const answer = await mailset.settings.get();
console.log(answer);
from mailset import Mailset

# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()

answer = mailset.settings.get()
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.Settings.Get(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(answer)
}
require 'mailset'

# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new

answer = mailset.settings.get
p answer
<?php

require 'vendor/autoload.php';

// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();

$answer = $mailset->settings->get();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Settings;

// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();

Settings answer = mailset.settings().get();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;

let answer = mailset.settings().get().await?;
println!("{answer:?}");
curl https://mailset.app/v1/settings.get \
  -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 settings get
Response
{
  "ok": true,
  "data": {
    "density": "comfortable",
    "inboxType": "sections",
    "inboxTabs": [
      "primary"
    ],
    "allInboxesHidden": [
      "moc.elpmaxe@olleh"
    ],
    "readingPane": "none",
    "timeFormat": "24h",
    "undoSeconds": 10,
    "conversations": true,
    "sendArchive": true,
    "images": "ask",
    "originalColors": [

settings.set

Change settings.

POST/v1/settings.set

API token

Parameters

  • densityenumoptional

    How tight lists are: comfortable or compact.

    One ofcomfortablecompact

  • inboxTypeenumoptional

    How the inbox is cut up: sections, tabs, unread first (unread) or starred first (starred).

    One ofsectionstabsunreadstarred

  • inboxTabsarray of enumsoptional

    Which categories are tabs of their own. The rest fold into Updates. primary always stays.

    One ofprimaryupdatesnewsletterspromotionsreceiptsnotifications

    At most 6 items.

  • allInboxesHiddenarray of stringsoptional

    Mailboxes kept out of All inboxes. A new mailbox is in until you say otherwise.

    At most 500 items.

  • readingPaneenumoptional

    Where an open conversation shows beside the list: none, right or below.

    One ofnonerightbelow

  • timeFormatenumoptional

    How times read: 24-hour (18:00) or 12-hour (6:00 PM).

    One of24h12h

  • undoSecondsnumberoptional

    Seconds mail waits before it leaves, so it can be taken back: 5, 10, 20 or 30.

  • conversationsbooleanoptional

    On folds older messages in a conversation. Off opens them all.

  • sendArchivebooleanoptional

    Show a button that sends a reply and archives the conversation.

  • imagesenumoptional

    Remote images in mail: ask before showing them, or always show them.

    One ofaskalways

  • originalColorsarray of stringsoptional

    Senders whose mail shows in the colours it was sent in, never recoloured for the dark theme: the message’s Original colours switch, on the web and the iPhone. The newest go last.

    At most 500 items.

  • leaveAskbooleanoptional

    Ask before Unsubscribe opens a sender’s own page in a new tab.

  • shortcutsbooleanoptional

    Keyboard shortcuts on or off.

  • notifyenumoptional

    Which new mail notifies you: all, important, only mail from people, or none.

    One ofallimportantpeoplenone

  • notifyPerMailboxmap of enumsoptional

    Mailboxes that notify differently, by address: same as notify, all or none.

  • previewenumoptional

    What a notification shows: the sender and subject (full), only the sender, or none.

    One offullsendernone

  • pushbooleanoptional

    Push notifications on or off.

  • quietbooleanoptional

    Quiet hours: notifications from 22:00 to 07:00 are held, then arrive as one.

  • digestenumoptional

    A summary of new mail filed in your inbox: off, daily or weekly.

    One ofoffdailyweekly

  • aibooleanoptional

    AI on your mail. Off, none of your mail goes to a model.

  • triagebooleanoptional

    Sort mail into tabs and flag what needs a reply. Off, there’s one inbox.

  • summariesbooleanoptional

    A short summary on long conversations.

  • draftsbooleanoptional

    Draft replies written for you. Nothing is sent without you.

  • followUpsnumberoptional

    Days without an answer before mail you sent comes back: 2, 3, 5 or 7. 0 turns it off.

  • phishingbooleanoptional

    Warn about mail that looks forged.

  • aliasReplyenumoptional

    The address a reply goes from: the one the mail reached (received), or your default address.

    One ofreceiveddefault

  • vacationbooleanoptional

    Whether your vacation replies may go out.

  • forwardingenumoptional

    Forwarding rules: allowed with a passkey check, or never.

    One ofpasskeynever

  • sharedAibooleanoptional

    Whether AI runs on shared mailboxes.

  • sessionDaysnumberoptional

    How long a new sign-in lasts, in days: 30, 7 or 0.5 (12 hours).

Returns

data is an object with:

  • densityenumoptional

    How tight lists are: comfortable or compact.

    One ofcomfortablecompact

    Default comfortable.

  • inboxTypeenumoptional

    How the inbox is cut up: sections, tabs, unread first (unread) or starred first (starred).

    One ofsectionstabsunreadstarred

    Default sections.

  • inboxTabsarray of enumsoptional

    Which categories are tabs of their own. The rest fold into Updates. primary always stays.

    One ofprimaryupdatesnewsletterspromotionsreceiptsnotifications

    Default ["primary","updates","newsletters","promotions"]. At most 6 items.

  • allInboxesHiddenarray of stringsoptional

    Mailboxes kept out of All inboxes. A new mailbox is in until you say otherwise.

    Default []. At most 500 items.

  • readingPaneenumoptional

    Where an open conversation shows beside the list: none, right or below.

    One ofnonerightbelow

    Default none.

  • timeFormatenumoptional

    How times read: 24-hour (18:00) or 12-hour (6:00 PM).

    One of24h12h

    Default 24h.

  • undoSecondsnumberoptional

    Seconds mail waits before it leaves, so it can be taken back: 5, 10, 20 or 30.

    Default 10.

  • conversationsbooleanoptional

    On folds older messages in a conversation. Off opens them all.

    Default true.

  • sendArchivebooleanoptional

    Show a button that sends a reply and archives the conversation.

    Default true.

  • imagesenumoptional

    Remote images in mail: ask before showing them, or always show them.

    One ofaskalways

    Default ask.

  • originalColorsarray of stringsoptional

    Senders whose mail shows in the colours it was sent in, never recoloured for the dark theme: the message’s Original colours switch, on the web and the iPhone. The newest go last.

    Default []. At most 500 items.

  • leaveAskbooleanoptional

    Ask before Unsubscribe opens a sender’s own page in a new tab.

    Default true.

  • shortcutsbooleanoptional

    Keyboard shortcuts on or off.

    Default true.

  • notifyenumoptional

    Which new mail notifies you: all, important, only mail from people, or none.

    One ofallimportantpeoplenone

    Default important.

  • notifyPerMailboxmap of enumsoptional

    Mailboxes that notify differently, by address: same as notify, all or none.

    Default {}.

  • previewenumoptional

    What a notification shows: the sender and subject (full), only the sender, or none.

    One offullsendernone

    Default sender.

  • pushbooleanoptional

    Push notifications on or off.

    Default true.

  • quietbooleanoptional

    Quiet hours: notifications from 22:00 to 07:00 are held, then arrive as one.

    Default true.

  • digestenumoptional

    A summary of new mail filed in your inbox: off, daily or weekly.

    One ofoffdailyweekly

    Default off.

  • aibooleanoptional

    AI on your mail. Off, none of your mail goes to a model.

    Default true.

  • triagebooleanoptional

    Sort mail into tabs and flag what needs a reply. Off, there’s one inbox.

    Default true.

  • summariesbooleanoptional

    A short summary on long conversations.

    Default true.

  • draftsbooleanoptional

    Draft replies written for you. Nothing is sent without you.

    Default true.

  • followUpsnumberoptional

    Days without an answer before mail you sent comes back: 2, 3, 5 or 7. 0 turns it off.

    Default 3.

  • phishingbooleanoptional

    Warn about mail that looks forged.

    Default true.

  • aliasReplyenumoptional

    The address a reply goes from: the one the mail reached (received), or your default address.

    One ofreceiveddefault

    Default received.

  • vacationbooleanoptional

    Whether your vacation replies may go out.

    Default false.

  • forwardingenumoptional

    Forwarding rules: allowed with a passkey check, or never.

    One ofpasskeynever

    Default passkey.

  • sharedAibooleanoptional

    Whether AI runs on shared mailboxes.

    Default true.

  • sessionDaysnumberoptional

    How long a new sign-in lasts, in days: 30, 7 or 0.5 (12 hours).

    Default 30.

In the CLIErrors

import { Mailset } from 'mailset';

// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();

const answer = await mailset.settings.set({
	density: "compact",
	undoSeconds: 20,
});
console.log(answer);
from mailset import Mailset

# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()

answer = mailset.settings.set(
    {"density": "compact", "undo_seconds": 20}
)
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.SettingsSetParams{
		Density:     mailset.SettingsDensityCompact,
		UndoSeconds: mailset.Int(20),
	}
	answer, err := client.Settings.Set(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.settings.set(
  density: 'compact',
  undo_seconds: 20
)
p answer
<?php

require 'vendor/autoload.php';

// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();

$answer = $mailset->settings->set([
    'density' => 'compact',
    'undoSeconds' => 20,
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Settings;
import app.mailset.model.SettingsDensity;
import app.mailset.model.SettingsSetParams;

// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();

var params = SettingsSetParams.builder()
        .density(SettingsDensity.COMPACT)
        .undoSeconds(20L)
        .build();
Settings answer = mailset.settings().set(params);
System.out.println(answer);
use mailset::types::{
    SettingsDensity, SettingsSetParams,
};

// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;

let answer = mailset
    .settings()
    .set(SettingsSetParams {
        density: Some(SettingsDensity::Compact),
        undo_seconds: Some(20),
        ..Default::default()
    })
    .await?;
println!("{answer:?}");
curl https://mailset.app/v1/settings.set \
  -H "Authorization: Bearer $TOKEN" \
  -H "ms-time: $MS_TIME" \
  -H "ms-proof: $MS_PROOF" \
  -H "Content-Type: application/json" \
  -d '{"input":{"density":"compact","undoSeconds":20}}'

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 settings set --density compact --undo-seconds 20
Response
{
  "ok": true,
  "data": {
    "density": "comfortable",
    "inboxType": "sections",
    "inboxTabs": [
      "primary"
    ],
    "allInboxesHidden": [
      "moc.elpmaxe@olleh"
    ],
    "readingPane": "none",
    "timeFormat": "24h",
    "undoSeconds": 10,
    "conversations": true,
    "sendArchive": true,
    "images": "ask",
    "originalColors": [