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.
email_sentCalls 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_URLRESEND_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
/audiences/audiences/audiences/:id/audiences/:id/audiences/:id/contacts/audiences/:id/contacts/audiences/:id/contacts/:contact/audiences/:id/contacts/:contactbroadcasts
/broadcasts/broadcasts/broadcasts/:id/broadcasts/:id/broadcasts/:id/broadcasts/:id/cancel/broadcasts/:id/sendcontacts
/contacts/contacts/contacts/:id/contacts/:id/contacts/:id/contacts/:id/segments/contacts/:id/segments/:segment_id/contacts/:id/segments/:segment_iddomains
/domains/domains/domains/:id/domains/:id/domains/:id/verifyemails
/emails/emails/emails/:id/emails/:id/emails/:id/cancel/emails/batchsegments
/segments/segments/segments/:id/segments/:id/segments/:id/segments/:id/contactsSeed 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 /emailsMore chat and email tools
All 43 toolsResend API mock FAQ
What if an email agent reuses a Resend idempotency key with different content?
For POST /, 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 /. POST / 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 /. 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.
Ancha is not affiliated with Resend.