Conversations
List, search, read and file conversations.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
On this page
The Conversation object
A conversation as a list shows it: who, what, where it is and its marks.
Attributes
The conversation’s id.
The address of the mailbox it is in.
Who it is from, as a list shows them.
The address its newest incoming message is from. Absent when nothing in it came in.
Its subject.
The start of its newest message.
How many messages it holds.
When its newest message is dated, in milliseconds since 1970.
Whether it is unread.
Whether any of its messages is starred.
The Important marker: a person or a rule put it there.
Where it is: the inbox, the archive, Trash or Junk.
One of
inboxarchivedtrashjunkYou’ve written in it, so it is in Sent.
Whether any of its messages has a file.
The labels on it, by name.
When it comes back to your inbox, in milliseconds since 1970, if you’ve snoozed it.
Shared mailboxes only: who owns it, or null when anyone can take it.
Its inbox tab. Absent when sorting is off and there is one inbox.
One of
primaryupdatesnewsletterspromotionsIt is waiting on an answer from you.
Why it looks forged. Absent when there is nothing to warn about.
Show child attributesHide child attributes
The domain the mail really came from.
The domain or name it passes itself off as. Null when it imitates nobody known.
The check it failed, such as DMARC. Null when none did.
What it does that looks like fraud: a
lookalikedomain, apaymentask, a request forcredentials, or a riskyattachment.One of
lookalikepaymentcredentialsattachment
It is back because something you sent got no answer.
The sender’s picture, or null for initials.
The sender shown is someone in your org who is deactivated. Present only when true.
Answered by
{
"id": "out_3f9a1c0e7b2d",
"mailbox": "text",
"from": "moc.elpmaxe@olleh",
"fromAddress": "moc.elpmaxe@olleh",
"subject": "Your Acme receipt",
"snippet": "text",
"count": 12,
"latestAt": 1796048940000,
"unread": true,
"starred": true,
"important": true,
"place": "inbox",
"sent": true,
"hasAttachment": true,
"labels": [
"text"
],
The Message object
One message of a conversation, as threads.get answers it: its headers, body and files.
Attributes
The message’s id.
The sender’s name, or null when the message gave none.
The sender’s address.
The addresses in To and Cc.
Where the sender asked for replies to go, when that isn’t just their From. Absent for most mail.
At most 10 items.
When it is dated, in milliseconds since 1970.
Its text.
Its HTML part as it arrived. Null for plain mail, mail sent from here, and anything very large.
How it arrived. Null on mail sent from here.
It was sent from this mailbox.
Whether it is starred.
Its files.
Show child attributesHide child attributes
The file’s id, for
attachments.get.Its file name.
Its media type.
Its size in bytes.
It is shown inside the message, like a picture in the text.
What the virus scan said.
One of
cleaninfectedunscannedWhy it wasn’t kept, when it wasn’t.
The sender’s picture, or null for initials.
Sent by someone in your org who is deactivated. Present only when true.
A way to leave this sender’s list. Absent when the message offers none.
Answered by
{
"id": "out_3f9a1c0e7b2d",
"fromName": "text",
"fromAddress": "moc.elpmaxe@olleh",
"to": [
"moc.elpmaxe@ana"
],
"replyTo": [
{
"name": "Acme API",
"address": "moc.elpmaxe@olleh"
}
],
"sentAt": 1796048940000,
"text": "text",
"html": "text",
"auth": {
"tls": true,
threads.list
List conversations.
POST/v1/threads.list
Parameters
Only this mailbox. Left out: every mailbox you can open.
Where to look:
inbox,archived,trashorjunk.One of
inboxarchivedtrashjunkDefault
inbox.Only conversations with a starred message.
Conversations marked important, anywhere but Trash and Junk.
The Sent folder: conversations you’ve written in, wherever they are.
Conversations with this label, anywhere but Trash and Junk.
At most 60 characters.
Only what you’ve snoozed.
One tab of the inbox.
One of
primaryupdatesnewsletterspromotionsHow many conversations a page holds, 1 to 100.
Default
50. From 1 to 100.The
nextof the page before, for the page after it.
Returns
data is an object with:
One page of conversations, newest first.
Pass back as
beforefor the next page. Null at the end.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.list({
mailbox: "moc.elpmaxe@ana",
limit: 20,
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.threads.list(
{"mailbox": "moc.elpmaxe@ana", "limit": 20}
)
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()
params := &mailset.ThreadsListParams{
Mailbox: mailset.String("moc.elpmaxe@ana"),
Limit: mailset.Int(20),
}
answer, err := client.Threads.List(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.list(
mailbox: 'moc.elpmaxe@ana',
limit: 20
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->list([
'mailbox' => 'moc.elpmaxe@ana',
'limit' => 20,
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadPage;
import app.mailset.model.ThreadsListParams;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsListParams.builder()
.mailbox("moc.elpmaxe@ana")
.limit(20L)
.build();
ThreadPage answer = mailset.threads().list(params);
System.out.println(answer);
use mailset::types::ThreadsListParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.list(ThreadsListParams {
mailbox: Some("moc.elpmaxe@ana".into()),
limit: Some(20),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.list \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"mailbox":"moc.elpmaxe@ana","limit":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 threads list --mailbox moc.elpmaxe@ana --limit 20
{
"ok": true,
"data": {
"threads": [
{
"id": "out_3f9a1c0e7b2d",
"mailbox": "text",
"from": "moc.elpmaxe@olleh",
"fromAddress": "moc.elpmaxe@olleh",
"subject": "Your Acme receipt",
"snippet": "text",
"count": 12,
"latestAt": 1796048940000,
"unread": true,
"starred": true,
"important": true,
"place": "inbox",
"sent": true,
threads.get
Read a conversation.
POST/v1/threads.get
Parameters
The conversation’s id, from
threads listorthreads search.
Returns
data is an object with:
The conversation as a list shows it.
Its messages, oldest first.
While unread: the id of the message it was marked unread from.
Notes only the mailbox’s members see. Never mail.
Show child attributesHide child attributes
The note’s id.
Who wrote it, or null when they are gone.
What it says.
When it was written, in milliseconds since 1970.
Its owner changes, oldest first.
Show child attributesHide child attributes
The event’s id.
Who did it, or null when they are gone.
Who owns the conversation now. Null when it was unassigned.
When it happened, in milliseconds since 1970.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.get({
id: "t_5d2c8a1f9e3b47c6a0d1e2f3",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.threads.get(
{"id": "t_5d2c8a1f9e3b47c6a0d1e2f3"}
)
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()
params := &mailset.ThreadsGetParams{
ID: "t_5d2c8a1f9e3b47c6a0d1e2f3",
}
answer, err := client.Threads.Get(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.get(
id: 't_5d2c8a1f9e3b47c6a0d1e2f3'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->get([
'id' => 't_5d2c8a1f9e3b47c6a0d1e2f3',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadDetail;
import app.mailset.model.ThreadsGetParams;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsGetParams.builder()
.id("t_5d2c8a1f9e3b47c6a0d1e2f3")
.build();
ThreadDetail answer = mailset.threads().get(params);
System.out.println(answer);
use mailset::types::ThreadsGetParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.get(ThreadsGetParams {
id: "t_5d2c8a1f9e3b47c6a0d1e2f3".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.get \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"id":"t_5d2c8a1f9e3b47c6a0d1e2f3"}}'
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 threads get t_5d2c8a1f9e3b47c6a0d1e2f3
{
"ok": true,
"data": {
"summary": {
"id": "out_3f9a1c0e7b2d",
"mailbox": "text",
"from": "moc.elpmaxe@olleh",
"fromAddress": "moc.elpmaxe@olleh",
"subject": "Your Acme receipt",
"snippet": "text",
"count": 12,
"latestAt": 1796048940000,
"unread": true,
"starred": true,
"important": true,
"place": "inbox",
"sent": true,
"hasAttachment": true,
threads.update
Mark, star, mark important, archive or move conversations.
POST/v1/threads.update
Parameters
The conversations’ ids, 1 to 200.
1 to 200 items.
Mark them unread, or read.
Star them, or take the star off.
Sets the Important marker by hand, or clears it.
Move them:
inbox,archived,trashorjunk.One of
inboxarchivedtrashjunk
Returns
data is an object with:
How many changed.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.update({
ids: [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2",
],
place: "archived",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.update(
{
"ids": [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2",
],
"place": "archived",
}
)
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.ThreadsUpdateParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.update(
ids: [
't_5d2c8a1f9e3b47c6a0d1e2f3',
't_b7e41c9a2f6d4083c5a9e1b2'
],
place: 'archived'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->update([
'ids' => [
't_5d2c8a1f9e3b47c6a0d1e2f3',
't_b7e41c9a2f6d4083c5a9e1b2',
],
'place' => 'archived',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Place;
import app.mailset.model.ThreadsUpdateParams;
import app.mailset.model.ThreadsUpdateResult;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsUpdateParams.builder()
.ids(List.of(
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2"))
.place(Place.ARCHIVED)
.build();
ThreadsUpdateResult answer =
mailset.threads().update(params);
System.out.println(answer);
use mailset::types::{Place, ThreadsUpdateParams};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.update(ThreadsUpdateParams {
ids: vec![
"t_5d2c8a1f9e3b47c6a0d1e2f3".into(),
"t_b7e41c9a2f6d4083c5a9e1b2".into(),
],
place: Some(Place::Archived),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.update \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"ids":["t_5d2c8a1f9e3b47c6a0d1e2f3","t_b7e41c9a2f6d4083c5a9e1b2"],"place":"archived"}}'
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 threads update --ids t_5d2c8a1f9e3b47c6a0d1e2f3,t_b7e41c9a2f6d4083c5a9e1b2 --place archived
{
"ok": true,
"data": {
"updated": 1
}
}
threads.markAllRead
Mark a whole list as read, not only what is loaded.
POST/v1/threads.markAllRead
Parameters
Only this mailbox. Left out: every mailbox you can open.
Where to look:
inbox,archived,trashorjunk.One of
inboxarchivedtrashjunkDefault
inbox.Only conversations with a starred message.
Conversations marked important, anywhere but Trash and Junk.
Conversations you’ve written in, wherever they are.
Conversations with this label, anywhere but Trash and Junk.
At most 60 characters.
Only what you’ve snoozed.
A search’s results, with the same words as
threads search.At most 500 characters.
Mailboxes to leave alone: All inboxes hides these.
Default
[]. At most 200 items.One tab of a shared mailbox.
One of
unassignedmineOne tab of a personal inbox.
One of
primaryupdatesnewsletterspromotions
Returns
data is an object with:
How many were marked read.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.markAllRead({
mailbox: "moc.elpmaxe@ana",
tab: "promotions",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.mark_all_read(
{"mailbox": "moc.elpmaxe@ana", "tab": "promotions"}
)
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.ThreadsMarkAllReadParams{
Mailbox: mailset.String("moc.elpmaxe@ana"),
Tab: mailset.InboxTabNamePromotions,
}
answer, err := client.Threads.MarkAllRead(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.threads.mark_all_read(
mailbox: 'moc.elpmaxe@ana',
tab: 'promotions'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->markAllRead([
'mailbox' => 'moc.elpmaxe@ana',
'tab' => 'promotions',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.InboxTabName;
import app.mailset.model.ThreadsMarkAllReadParams;
import app.mailset.model.ThreadsMarkAllReadResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsMarkAllReadParams.builder()
.mailbox("moc.elpmaxe@ana")
.tab(InboxTabName.PROMOTIONS)
.build();
ThreadsMarkAllReadResult answer =
mailset.threads().markAllRead(params);
System.out.println(answer);
use mailset::types::{
InboxTabName, ThreadsMarkAllReadParams,
};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.mark_all_read(ThreadsMarkAllReadParams {
mailbox: Some("moc.elpmaxe@ana".into()),
tab: Some(InboxTabName::Promotions),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.markAllRead \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"mailbox":"moc.elpmaxe@ana","tab":"promotions"}}'
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 threads markAllRead --mailbox moc.elpmaxe@ana --tab promotions
{
"ok": true,
"data": {
"updated": 1
}
}
threads.count
Count the conversations in a whole list; a search counts up to 1,000.
POST/v1/threads.count
Parameters
Only this mailbox. Left out: every mailbox you can open.
Where to look:
inbox,archived,trashorjunk.One of
inboxarchivedtrashjunkDefault
inbox.Only conversations with a starred message.
Conversations marked important, anywhere but Trash and Junk.
Conversations you’ve written in, wherever they are.
Conversations with this label, anywhere but Trash and Junk.
At most 60 characters.
Only what you’ve snoozed.
A search’s results, with the same words as
threads search.At most 500 characters.
Mailboxes to leave alone: All inboxes hides these.
Default
[]. At most 200 items.One tab of a shared mailbox.
One of
unassignedmineOne tab of a personal inbox.
One of
primaryupdatesnewsletterspromotions
Returns
data is an object with:
How many conversations the list holds.
A search stopped counting at
count: it found more.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.count({
mailbox: "moc.elpmaxe@ana",
tab: "primary",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.count(
{"mailbox": "moc.elpmaxe@ana", "tab": "primary"}
)
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.ThreadsCountParams{
Mailbox: mailset.String("moc.elpmaxe@ana"),
Tab: mailset.InboxTabNamePrimary,
}
answer, err := client.Threads.Count(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.threads.count(
mailbox: 'moc.elpmaxe@ana',
tab: 'primary'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->count([
'mailbox' => 'moc.elpmaxe@ana',
'tab' => 'primary',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.InboxTabName;
import app.mailset.model.ThreadsCountParams;
import app.mailset.model.ThreadsCountResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsCountParams.builder()
.mailbox("moc.elpmaxe@ana")
.tab(InboxTabName.PRIMARY)
.build();
ThreadsCountResult answer =
mailset.threads().count(params);
System.out.println(answer);
use mailset::types::{InboxTabName, ThreadsCountParams};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.count(ThreadsCountParams {
mailbox: Some("moc.elpmaxe@ana".into()),
tab: Some(InboxTabName::Primary),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.count \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"mailbox":"moc.elpmaxe@ana","tab":"primary"}}'
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 threads count --mailbox moc.elpmaxe@ana --tab primary
{
"ok": true,
"data": {
"count": 12,
"capped": true
}
}
threads.updateAll
Archive, move, mark, star or label a whole list, not only what is loaded.
POST/v1/threads.updateAll
Parameters
Only this mailbox. Left out: every mailbox you can open.
Where to look:
inbox,archived,trashorjunk.One of
inboxarchivedtrashjunkDefault
inbox.Only conversations with a starred message.
Conversations marked important, anywhere but Trash and Junk.
Conversations you’ve written in, wherever they are.
Conversations with this label, anywhere but Trash and Junk.
At most 60 characters.
Only what you’ve snoozed.
A search’s results, with the same words as
threads search.At most 500 characters.
Mailboxes to leave alone: All inboxes hides these.
Default
[]. At most 200 items.One tab of a shared mailbox.
One of
unassignedmineOne tab of a personal inbox.
One of
primaryupdatesnewsletterspromotionsWhat happens to each one: the fields of
threads updateandthreads label.Show child attributesHide child attributes
Mark them unread, or read.
Star them, or take the star off.
Mark them important, or clear it.
Where they go: Archive, the inbox, Junk or Trash.
One of
inboxarchivedtrashjunkLabels to put on them, by name.
Default
[]. At most 50 items.Labels to take off them, by name.
Default
[]. At most 50 items.
Where the last call stopped: its
next.
Returns
data is an object with:
How many changed in this call.
The list is longer than one call goes: call again with this as
after. Null once done.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.updateAll({
label: "Finance",
change: {
place: "archived",
},
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.update_all(
{"label": "Finance", "change": {"place": "archived"}}
)
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.ThreadsUpdateAllParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.update_all(
label: 'Finance',
change: { place: 'archived' }
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->updateAll([
'label' => 'Finance',
'change' => ['place' => 'archived'],
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Place;
import app.mailset.model.ThreadsUpdateAllParams;
import app.mailset.model.ThreadsUpdateAllParamsChange;
import app.mailset.model.ThreadsUpdateAllResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsUpdateAllParams.builder()
.label("Finance")
.change(ThreadsUpdateAllParamsChange.builder()
.place(Place.ARCHIVED)
.build())
.build();
ThreadsUpdateAllResult answer =
mailset.threads().updateAll(params);
System.out.println(answer);
use mailset::types::{
Place, ThreadsUpdateAllParams,
ThreadsUpdateAllParamsChange,
};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.update_all(ThreadsUpdateAllParams {
label: Some("Finance".into()),
change: ThreadsUpdateAllParamsChange {
place: Some(Place::Archived),
..Default::default()
},
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.updateAll \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"label":"Finance","change":{"place":"archived"}}}'
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 threads updateAll --label Finance --change '{"place":"archived"}'
{
"ok": true,
"data": {
"updated": 1,
"next": "eyJhIjoxNzk2MDkyNDQyfQ"
}
}
threads.search
Search mail, with from:, to:, subject:, has:attachment, larger:, smaller:, before:, after:, is:important, brackets, OR, and -word.
POST/v1/threads.search
Parameters
What to find: words, and operators such as
from:,to:,subject:,has:attachment,larger:,before:,after:,is:important,ORand-word. Up to 500 characters.At most 500 characters.
How many conversations a page holds, 1 to 100.
Default
50. From 1 to 100.The
nextof the page before, for the page after it.The last word is still being typed: a bare word of two letters or more matches the start of a word.
Returns
data is an object with:
One page of conversations, newest first.
Pass back as
beforefor the next page. Null at the end.
import { Mailset } from 'mailset';
// Reads MAILSET_KEY from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.search({
limit: 20,
query: "from:stripe.com has:attachment",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_KEY from the environment.
mailset = Mailset()
answer = mailset.threads.search(
{
"limit": 20,
"query": "from:stripe.com has:attachment",
}
)
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()
params := &mailset.ThreadsSearchParams{
Limit: mailset.Int(20),
Query: "from:stripe.com has:attachment",
}
answer, err := client.Threads.Search(ctx, params)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_KEY from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.search(
limit: 20,
query: 'from:stripe.com has:attachment'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_KEY from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->search([
'limit' => 20,
'query' => 'from:stripe.com has:attachment',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadPage;
import app.mailset.model.ThreadsSearchParams;
// Reads MAILSET_KEY from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsSearchParams.builder()
.limit(20L)
.query("from:stripe.com has:attachment")
.build();
ThreadPage answer = mailset.threads().search(params);
System.out.println(answer);
use mailset::types::ThreadsSearchParams;
// Reads MAILSET_KEY from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.search(ThreadsSearchParams {
query: "from:stripe.com has:attachment".into(),
limit: Some(20),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.search \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"limit":20,"query":"from:stripe.com has:attachment"}}'
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 threads search "from:stripe.com has:attachment" --limit 20
{
"ok": true,
"data": {
"threads": [
{
"id": "out_3f9a1c0e7b2d",
"mailbox": "text",
"from": "moc.elpmaxe@olleh",
"fromAddress": "moc.elpmaxe@olleh",
"subject": "Your Acme receipt",
"snippet": "text",
"count": 12,
"latestAt": 1796048940000,
"unread": true,
"starred": true,
"important": true,
"place": "inbox",
"sent": true,
threads.label
Put labels on conversations, or take them off.
POST/v1/threads.label
Parameters
The conversations’ ids, 1 to 200.
1 to 200 items.
Labels to put on them, by name.
Default
[]. At most 50 items.Labels to take off them, by name.
Default
[]. At most 50 items.
Returns
data is an object with:
How many changed.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.label({
ids: [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2",
],
add: [
"Finance",
],
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.label(
{
"ids": [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2",
],
"add": ["Finance"],
}
)
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.ThreadsLabelParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.label(
ids: [
't_5d2c8a1f9e3b47c6a0d1e2f3',
't_b7e41c9a2f6d4083c5a9e1b2'
],
add: ['Finance']
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->label([
'ids' => [
't_5d2c8a1f9e3b47c6a0d1e2f3',
't_b7e41c9a2f6d4083c5a9e1b2',
],
'add' => ['Finance'],
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadsLabelParams;
import app.mailset.model.ThreadsLabelResult;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsLabelParams.builder()
.ids(List.of(
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2"))
.add(List.of("Finance"))
.build();
ThreadsLabelResult answer =
mailset.threads().label(params);
System.out.println(answer);
use mailset::types::ThreadsLabelParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.label(ThreadsLabelParams {
ids: vec![
"t_5d2c8a1f9e3b47c6a0d1e2f3".into(),
"t_b7e41c9a2f6d4083c5a9e1b2".into(),
],
add: Some(vec!["Finance".into()]),
..Default::default()
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.label \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"ids":["t_5d2c8a1f9e3b47c6a0d1e2f3","t_b7e41c9a2f6d4083c5a9e1b2"],"add":["Finance"]}}'
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 threads label --ids t_5d2c8a1f9e3b47c6a0d1e2f3,t_b7e41c9a2f6d4083c5a9e1b2 --add Finance
{
"ok": true,
"data": {
"updated": 1
}
}
threads.assign
Give a conversation in a shared mailbox an owner.
POST/v1/threads.assign
Parameters
The conversation’s id.
Someone in the mailbox, or
nobody.
Returns
data is an object with:
Who owns it now. Null: nobody.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.assign({
assignee: "moc.elpmaxe@neb",
id: "t_5d2c8a1f9e3b47c6a0d1e2f3",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.assign(
{
"assignee": "moc.elpmaxe@neb",
"id": "t_5d2c8a1f9e3b47c6a0d1e2f3",
}
)
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.ThreadsAssignParams{
Assignee: "moc.elpmaxe@neb",
ID: "t_5d2c8a1f9e3b47c6a0d1e2f3",
}
answer, err := client.Threads.Assign(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.threads.assign(
assignee: 'moc.elpmaxe@neb',
id: 't_5d2c8a1f9e3b47c6a0d1e2f3'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->assign([
'assignee' => 'moc.elpmaxe@neb',
'id' => 't_5d2c8a1f9e3b47c6a0d1e2f3',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadsAssignParams;
import app.mailset.model.ThreadsAssignResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsAssignParams.builder()
.assignee("moc.elpmaxe@neb")
.id("t_5d2c8a1f9e3b47c6a0d1e2f3")
.build();
ThreadsAssignResult answer =
mailset.threads().assign(params);
System.out.println(answer);
use mailset::types::ThreadsAssignParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.assign(ThreadsAssignParams {
id: "t_5d2c8a1f9e3b47c6a0d1e2f3".into(),
assignee: "moc.elpmaxe@neb".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.assign \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"assignee":"moc.elpmaxe@neb","id":"t_5d2c8a1f9e3b47c6a0d1e2f3"}}'
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 threads assign t_5d2c8a1f9e3b47c6a0d1e2f3 --assignee moc.elpmaxe@neb
{
"ok": true,
"data": {
"assignee": {
"email": "moc.elpmaxe@olleh",
"name": "Acme API",
"deactivated": true
}
}
}
threads.snooze
Hide conversations until a time.
POST/v1/threads.snooze
Parameters
The conversations’ ids, 1 to 200.
1 to 200 items.
When they come back: ms since the epoch, or an ISO date and time with its offset (
2026-12-07T09:00:00Z).
Returns
data is an object with:
How many were snoozed.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.snooze({
ids: [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
],
until: "2026-12-07T09:00:00Z",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.snooze(
{
"ids": ["t_5d2c8a1f9e3b47c6a0d1e2f3"],
"until": "2026-12-07T09:00:00Z",
}
)
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.ThreadsSnoozeParams{
IDs: []string{"t_5d2c8a1f9e3b47c6a0d1e2f3"},
Until: "2026-12-07T09:00:00Z",
}
answer, err := client.Threads.Snooze(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.threads.snooze(
ids: ['t_5d2c8a1f9e3b47c6a0d1e2f3'],
until: '2026-12-07T09:00:00Z'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->snooze([
'ids' => ['t_5d2c8a1f9e3b47c6a0d1e2f3'],
'until' => '2026-12-07T09:00:00Z',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadsSnoozeParams;
import app.mailset.model.ThreadsSnoozeResult;
import java.time.Instant;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsSnoozeParams.builder()
.ids(List.of("t_5d2c8a1f9e3b47c6a0d1e2f3"))
.until(Instant.parse("2026-12-07T09:00:00Z"))
.build();
ThreadsSnoozeResult answer =
mailset.threads().snooze(params);
System.out.println(answer);
use mailset::types::ThreadsSnoozeParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.snooze(ThreadsSnoozeParams {
ids: vec!["t_5d2c8a1f9e3b47c6a0d1e2f3".into()],
until: "2026-12-07T09:00:00Z".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.snooze \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"ids":["t_5d2c8a1f9e3b47c6a0d1e2f3"],"until":"2026-12-07T09:00:00Z"}}'
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 threads snooze --ids t_5d2c8a1f9e3b47c6a0d1e2f3 --until 2026-12-07T09:00:00Z
{
"ok": true,
"data": {
"updated": 1
}
}
threads.unsnooze
Bring snoozed conversations back now.
POST/v1/threads.unsnooze
Parameters
The conversations’ ids, 1 to 200.
1 to 200 items.
Returns
data is an object with:
How many came back.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.unsnooze({
ids: [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
],
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.unsnooze(
{"ids": ["t_5d2c8a1f9e3b47c6a0d1e2f3"]}
)
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.ThreadsUnsnoozeParams{
IDs: []string{"t_5d2c8a1f9e3b47c6a0d1e2f3"},
}
answer, err := client.Threads.Unsnooze(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.threads.unsnooze(
ids: ['t_5d2c8a1f9e3b47c6a0d1e2f3']
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->unsnooze([
'ids' => ['t_5d2c8a1f9e3b47c6a0d1e2f3'],
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ThreadsUnsnoozeParams;
import app.mailset.model.ThreadsUnsnoozeResult;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsUnsnoozeParams.builder()
.ids(List.of("t_5d2c8a1f9e3b47c6a0d1e2f3"))
.build();
ThreadsUnsnoozeResult answer =
mailset.threads().unsnooze(params);
System.out.println(answer);
use mailset::types::ThreadsUnsnoozeParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.unsnooze(ThreadsUnsnoozeParams {
ids: vec!["t_5d2c8a1f9e3b47c6a0d1e2f3".into()],
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.unsnooze \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"ids":["t_5d2c8a1f9e3b47c6a0d1e2f3"]}}'
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 threads unsnooze --ids t_5d2c8a1f9e3b47c6a0d1e2f3
{
"ok": true,
"data": {
"updated": 1
}
}
threads.classify
Move conversations to a tab, and keep them there.
POST/v1/threads.classify
Parameters
The conversations’ ids, 1 to 200.
1 to 200 items.
The tab they go to.
One of
primaryupdatesnewsletterspromotions
Returns
data is an object with:
How many moved.
Who each one is from, so the app can offer to remember it.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.threads.classify({
ids: [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2",
],
tab: "newsletters",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.threads.classify(
{
"ids": [
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2",
],
"tab": "newsletters",
}
)
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.ThreadsClassifyParams{
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.threads.classify(
ids: [
't_5d2c8a1f9e3b47c6a0d1e2f3',
't_b7e41c9a2f6d4083c5a9e1b2'
],
tab: 'newsletters'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->threads->classify([
'ids' => [
't_5d2c8a1f9e3b47c6a0d1e2f3',
't_b7e41c9a2f6d4083c5a9e1b2',
],
'tab' => 'newsletters',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.InboxTabName;
import app.mailset.model.ThreadsClassifyParams;
import app.mailset.model.ThreadsClassifyResult;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = ThreadsClassifyParams.builder()
.ids(List.of(
"t_5d2c8a1f9e3b47c6a0d1e2f3",
"t_b7e41c9a2f6d4083c5a9e1b2"))
.tab(InboxTabName.NEWSLETTERS)
.build();
ThreadsClassifyResult answer =
mailset.threads().classify(params);
System.out.println(answer);
use mailset::types::{
InboxTabName, ThreadsClassifyParams,
};
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.threads()
.classify(ThreadsClassifyParams {
ids: vec![
"t_5d2c8a1f9e3b47c6a0d1e2f3".into(),
"t_b7e41c9a2f6d4083c5a9e1b2".into(),
],
tab: InboxTabName::Newsletters,
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/threads.classify \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"ids":["t_5d2c8a1f9e3b47c6a0d1e2f3","t_b7e41c9a2f6d4083c5a9e1b2"],"tab":"newsletters"}}'
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 threads classify --ids t_5d2c8a1f9e3b47c6a0d1e2f3,t_b7e41c9a2f6d4083c5a9e1b2 --tab newsletters
{
"ok": true,
"data": {
"updated": 1,
"senders": [
"moc.elpmaxe@olleh"
]
}
}