Passkeys
The passkeys that sign you in.
An SDK signs every request with your key: Authentication. To sign one yourself, see Calling the API without an SDK.
On this page
passkeys.list
List your passkeys.
POST/v1/passkeys.list
Parameters
It takes no input: send an empty object.
Returns
data is a list of objects, each with:
Synced across the person’s devices by their password manager or iCloud.
import { Mailset } from 'mailset';
// Reads MAILSET_TOKEN from the environment.
const mailset = new Mailset();
const answer = await mailset.passkeys.list();
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.passkeys.list()
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.Passkeys.List(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(answer)
}
require 'mailset'
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset::Client.new
answer = mailset.passkeys.list
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->passkeys->list();
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.Passkey;
import java.util.List;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
List<Passkey> answer = mailset.passkeys().list();
System.out.println(answer);
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset.passkeys().list().await?;
println!("{answer:?}");
curl https://mailset.app/v1/passkeys.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 passkeys list
{
"ok": true,
"data": [
{
"id": "out_3f9a1c0e7b2d",
"name": "Acme API",
"synced": true,
"createdAt": 1796048940000,
"lastUsedAt": 1796048940000
}
]
}
passkeys.remove
Remove a passkey.
POST/v1/passkeys.remove
Parameters
The passkey’s id, from
passkeys list.
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.passkeys.remove({
id: "Kq3vX9mB2nR7tLw0pYc5uA",
});
console.log(answer);
from mailset import Mailset
# Reads MAILSET_TOKEN from the environment.
mailset = Mailset()
answer = mailset.passkeys.remove(
{"id": "Kq3vX9mB2nR7tLw0pYc5uA"}
)
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.PasskeysRemoveParams{
ID: "Kq3vX9mB2nR7tLw0pYc5uA",
}
answer, err := client.Passkeys.Remove(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.passkeys.remove(
id: 'Kq3vX9mB2nR7tLw0pYc5uA'
)
p answer
<?php
require 'vendor/autoload.php';
// Reads MAILSET_TOKEN from the environment.
$mailset = new Mailset\Client();
$answer = $mailset->passkeys->remove([
'id' => 'Kq3vX9mB2nR7tLw0pYc5uA',
]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.PasskeysRemoveParams;
import app.mailset.model.PasskeysRemoveResult;
// Reads MAILSET_TOKEN from the environment.
Mailset mailset = Mailset.fromEnv();
var params = PasskeysRemoveParams.builder()
.id("Kq3vX9mB2nR7tLw0pYc5uA")
.build();
PasskeysRemoveResult answer =
mailset.passkeys().remove(params);
System.out.println(answer);
use mailset::types::PasskeysRemoveParams;
// Reads MAILSET_TOKEN from the environment.
let mailset = mailset::Client::from_env()?;
let answer = mailset
.passkeys()
.remove(PasskeysRemoveParams {
id: "Kq3vX9mB2nR7tLw0pYc5uA".into(),
})
.await?;
println!("{answer:?}");
curl https://mailset.app/v1/passkeys.remove \
-H "Authorization: Bearer $TOKEN" \
-H "ms-time: $MS_TIME" \
-H "ms-proof: $MS_PROOF" \
-H "Content-Type: application/json" \
-d '{"input":{"id":"Kq3vX9mB2nR7tLw0pYc5uA"}}'
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 passkeys remove --id Kq3vX9mB2nR7tLw0pYc5uA
{
"ok": true,
"data": {
"removed": true
}
}