API Reference

Retrieve Log

GET /logs/:id — fetch a single API request log with its request and response bodies.

GET/logs/:id

Retrieve a single API request log by id, including the captured request_body and response_body. The shape of those two fields varies depending on the original request that was logged.

Path parameters

idstringrequired

The log id — a numeric string (e.g. 48213), as returned by GET /logs.

Response fields

objectstringoptional

Always log.

idstringoptional

The log id — a numeric string (e.g. "48213"), not a UUID.

created_atstringoptional

When the request was made.

endpointstringoptional

The request path.

methodstringoptional

The HTTP method.

response_statusnumberoptional

The HTTP status code returned.

user_agentstringoptional

The User-Agent of the caller.

request_bodyobjectoptional

The captured request body. Shape varies by the logged request.

response_bodyobjectoptional

The captured response body. Shape varies by the logged request.

Request

import { Mailblastr } from 'mailblastr';

const mb = new Mailblastr('mb_xxxxxxxxx');

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

Response

{
  "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",
  "request_body": {
    "from": "Acme <hello@yourdomain.com>",
    "to": ["delivered@example.com"],
    "subject": "Hello World"
  },
  "response_body": {
    "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
  }
}

Errors

Returns not_found (404) if no log with that id exists for your account. See the error reference.