Activity

Activity

What your account has done lately.

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

On this page
  1. activity.list

activity.list

Show what your account has done: sign-ins, devices, passkeys.

POST/v1/activity.list

API token

Parameters

  • limitintegeroptional

    How many rows to return, 1 to 200.

    Default 50. From 1 to 200.

  • beforestringoptional

    The id of the last row you have, for the rows before it.

Returns

data is a list of objects, each with:

  • idstring
  • kindstring
  • targetstring
  • actornullable string
  • atnumber
  • ipnullable string

    Where it was done from, for the events that record that.

  • locationnullable string

In the CLIErrors

import { Mailset } from 'mailset';

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

const answer = await mailset.activity.list({
	limit: 20,
});
console.log(answer);
from mailset import Mailset

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

answer = mailset.activity.list({"limit": 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.ActivityListParams{
		Limit: mailset.Int(20),
	}
	answer, err := client.Activity.List(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.activity.list(limit: 20)
p answer
<?php

require 'vendor/autoload.php';

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

$answer = $mailset->activity->list(['limit' => 20]);
echo json_encode($answer, JSON_PRETTY_PRINT), PHP_EOL;
import app.mailset.Mailset;
import app.mailset.model.ActivityListParams;
import app.mailset.model.Audit;
import java.util.List;

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

var params = ActivityListParams.builder()
        .limit(20L)
        .build();
List<Audit> answer = mailset.activity().list(params);
System.out.println(answer);
use mailset::types::ActivityListParams;

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

let answer = mailset
    .activity()
    .list(ActivityListParams {
        limit: Some(20),
        ..Default::default()
    })
    .await?;
println!("{answer:?}");
curl https://mailset.app/v1/activity.list \
  -H "Authorization: Bearer $TOKEN" \
  -H "ms-time: $MS_TIME" \
  -H "ms-proof: $MS_PROOF" \
  -H "Content-Type: application/json" \
  -d '{"input":{"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 activity list --limit 20
Response
{
  "ok": true,
  "data": [
    {
      "id": "out_3f9a1c0e7b2d",
      "kind": "text",
      "target": "text",
      "actor": "text",
      "at": 1796048940000,
      "ip": "text",
      "location": "text"
    }
  ]
}