API Reference

List API keys

GET /api-keys — list your API keys (metadata only).

GET/api-keys

Lists your API keys. Each entry includes a non-secret token prefix (token) for display — the full secret is stored only as a hash and is shown once, at creation, never again. The limit parameter is optional; if omitted, all keys are returned in a single response.

Query parameters
limitnumberoptional

Number of API keys to retrieve. Minimum 1, maximum 100.

afterstringoptional

The ID after which to retrieve more keys (pagination). The ID itself is excluded. Cannot be combined with before.

beforestringoptional

The ID before which to retrieve more keys (pagination). The ID itself is excluded. Cannot be combined with after.

import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.apiKeys.list();
console.log({ data, error });

Response

Each entry carries the key name, a non-secret token prefix, its permission (full_access or sending_access), the domain_id it is scoped to (null for account-wide keys), created_at, and a last_used_at timestamp (null if the key has never been used). has_more indicates whether further pages exist.

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "dacf4072-4119-4d88-932f-6202748ac7c8",
      "name": "Production server",
      "token": "mb_live_a1b2c3",
      "permission": "full_access",
      "domain_id": null,
      "created_at": "2026-06-23T10:00:00.000Z",
      "last_used_at": "2026-06-25T17:09:51.813Z"
    }
  ]
}