List API keys
GET /api-keys — list your API keys (metadata only).
/api-keysLists 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 you omit it, up to 1,000 keys are returned in one response, with has_more set to true when more exist beyond that ceiling. Page through the remainder with after.
limitnumberoptionalNumber of API keys to retrieve. Minimum 1, maximum 100.
afterstringoptionalThe ID after which to retrieve more keys (pagination). The ID itself is excluded. Cannot be combined with before.
beforestringoptionalThe 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_ids it is restricted to (null for account-wide keys; domain_id is the legacy single-domain field, set only when exactly one domain), 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": "1042",
"name": "Production server",
"token": "mb_AbC12",
"permission": "full_access",
"domain_id": null,
"domain_ids": null,
"created_at": "2026-06-23T10:00:00.000Z",
"last_used_at": "2026-06-25T17:09:51.813Z"
}
]
}