A Resend API mock for testing email sends.

Seed email history, contacts and domains for your agent. Check its send request, then retrieve the email’s recipients, subject and body.

Connect your agent
The test
  • email_sent

    Calls POST /emails

Starting records

  • emails

    subject
    Your October invoice is overdue
    from
    Acme Support <support@acme.example>
  • emails / tags

    name
    category

Connect your agent to the Resend mock

When ancha runs your agent, it sets:

  • RESEND_BASE_URL
  • RESEND_API_KEY

Point the client you already use at them.

import { Resend } from 'resend';
// The SDK also reads RESEND_BASE_URL by itself.
const resend = new Resend(process.env.RESEND_API_KEY, { baseUrl: process.env.RESEND_BASE_URL });
const { data, error } = await resend.emails.list();

Locally, ancha runs your agent as an ordinary process, so keep real Resend credentials out of its environment.

See all 40 endpoints

audiences

GET/audiences
POST/audiences
GET/audiences/:id
DELETE/audiences/:id
GET/audiences/:id/contacts
POST/audiences/:id/contacts
GET/audiences/:id/contacts/:contact
PATCH/audiences/:id/contacts/:contact

broadcasts

GET/broadcasts
POST/broadcasts
GET/broadcasts/:id
PATCH/broadcasts/:id
DELETE/broadcasts/:id
POST/broadcasts/:id/cancel
POST/broadcasts/:id/send

contacts

GET/contacts
POST/contacts
GET/contacts/:id
PATCH/contacts/:id
DELETE/contacts/:id
GET/contacts/:id/segments
POST/contacts/:id/segments/:segment_id
DELETE/contacts/:id/segments/:segment_id

domains

GET/domains
POST/domains
GET/domains/:id
DELETE/domains/:id
POST/domains/:id/verify

emails

GET/emails
POST/emails
GET/emails/:id
PATCH/emails/:id
POST/emails/:id/cancel
POST/emails/batch

segments

GET/segments
POST/segments
GET/segments/:id
PATCH/segments/:id
DELETE/segments/:id
GET/segments/:id/contacts

Seed your own data

The data the Resend mock starts with on every run, cut to a few records. ancha twins seed resend prints every field.

Full seed YAML
twins:
  - resend
seed:
  resend:
    api_key:
      name: Support agent
    domains:
      - name: acme.example
        created: -2000h
    segments:
      - ref: product_updates
        name: Product updates
        created: -1500h
    contacts:
      - email: grace.lin@bluefield-logistics.example
        first_name: Grace
        last_name: Lin
        segments:
          - product_updates
        created: -500h
    emails:
      - from: Acme Support <support@acme.example>
        to:
          - ap@helix-manufacturing.example
        subject: Your October invoice is overdue
        text: Your card was declined. Please update your payment method.
        tags:
          - name: category
            value: billing
        created: -117h
        last_event: bounced
    broadcasts:
      - name: October product update
        segment: product_updates
        from: Acme <team@acme.example>
        subject: "What’s new at Acme: faster CSV exports"
        html: <p>CSV exports now finish in seconds, and admins can see who exported what.</p>
        created: -250h
        sent_at: -240h

Check what your agent did

Checks YAML
checks:
  - id: email_sent
    trace:
      called: POST /emails

More chat and email tools

All 43 tools

Resend API mock FAQ

What if an email agent reuses a Resend idempotency key with different content?

For POST /emails, Ancha’s Resend mock returns 409 with invalid_idempotent_request when the same Idempotency-Key is reused with a different request body. Retrying the identical request returns the saved email ID.

Can my agent reschedule an email before it is sent?

While the email’s last_event is scheduled, the mock accepts a new scheduled_at through PATCH /emails/:id. POST /emails/:id/cancel cancels a scheduled email, and a later read reports last_event: canceled.

How do I exercise a Resend bounce-handling flow?

Send an email to bounced@resend.dev through the mock, then retrieve it with GET /emails/:id. Two seconds after its send time on the simulated clock, the email’s last_event is bounced.

Install the CLI and run your agent against the Resend mock.

Book a demo

Ancha is not affiliated with Resend.