API Reference

List Logs

GET /logs — list the API request logs for your account.

GET/logs

List the API request logs for your account. Each entry records a request made with one of your API keys — the endpoint, method, response_status, and originating user_agent. Use a log's id to fetch the full request and response bodies with GET /logs/:id.

This endpoint is always paginated. See Pagination for navigating with limit, after, and before.

Query parameters

limitnumberoptional

Number of logs to retrieve per page. Default 20, maximum 100, minimum 1.

afterstringoptional

The log id after which more logs are retrieved. The passed id is not included. Cannot be combined with before.

beforestringoptional

The log id before which more logs are retrieved. The passed id is not included. Cannot be combined with after.

methodstringoptional

Filter to an exact HTTP method, e.g. POST or GET.

statusnumberoptional

Filter to an exact HTTP response status code, e.g. 200 or 429.

Response fields

Each item in data is a log reference:

objectstringoptional

Always log.

idstringoptional

The log id — a numeric string (e.g. "48213"), not a UUID. Use it verbatim as an after/before cursor.

created_atstringoptional

When the request was made.

endpointstringoptional

The request path, including the /api base (e.g. /api/emails).

methodstringoptional

The HTTP method (e.g. POST).

response_statusnumberoptional

The HTTP status code returned.

user_agentstringoptional

The User-Agent of the caller.

Request

import { Mailblastr } from 'mailblastr';

const mb = new Mailblastr('mb_xxxxxxxxx');

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

Response

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "log",
      "id": "48213",
      "created_at": "2026-06-23T13:43:54.622Z",
      "endpoint": "/api/emails",
      "method": "POST",
      "response_status": 200,
      "user_agent": "curl/8.7.1"
    },
    {
      "object": "log",
      "id": "48212",
      "created_at": "2026-06-23T12:15:00.123Z",
      "endpoint": "/api/emails/4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
      "method": "GET",
      "response_status": 200,
      "user_agent": "python-requests/2.31.0"
    }
  ]
}

Errors

Returns validation_error if limit is outside 1–100 or if both before and after are supplied. A malformed or unknown cursor is not an error — it returns an empty page (data: [], has_more: false). See the error reference.