Logs API

Access your API request logs from anywhere.

When something goes wrong with an API request, the most important thing is visibility.

You've always had access to view your API logs in the Resend dashboard. That works well for manual debugging, but it falls short when you need to equip an agent, build monitoring tools, or create custom tooling around your email sending.

Today, we're introducing two new endpoints that give you programmatic access to your API request logs.

Retrieving logs

To use the Logs API, you can use the following endpoint.

import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.logs.list();

The returned list of logs includes details like:

  • endpoint
  • method
  • status code
  • user agent

Drilling down

When you need the full picture, retrieve a single log entry to inspect the original request and response bodies.

import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.logs.get(
'37e4414c-5e25-4dbc-a071-43552a4bd53b',
);

For more details, check out the Logs API reference.

Getting started

Retrieving and inspecting logs programmatically opens up new possibilities:

  • Equip your agent with better debugging tools
  • Build custom dashboards, reports, and monitoring tools
  • Integrate with your existing infrastructure

The Logs API is available in all official Resend SDKs. It's also integrated into the Resend CLI and MCP Server.

We hope these new endpoints help you get more visibility into your email events, enabling you to build with more confidence than ever before.