API template library

Simulate the Resend email API

A WireMock simulation of Resend's REST API — covering transactional email sending and scheduling, domains, contacts, segments and topics, broadcasts, templates, webhooks, and agent inboxes.

Vendor
Resend
Functionality
Emails, domains, contacts, broadcasts
Spec version
1.5.1
Endpoints
142
Stubs
258
Protocol
REST
Validation
AI-validated Before publication, an AI agent exercised these endpoints against the real Resend API through WireMock's recording proxy, and the recorded traffic was used to verify each stub's request and response shapes.

Live sandbox · no signup, no API key

Resend API

A running WireMock Cloud instance of this template, callable right now from a terminal, a script, or an AI agent.

Base URL
https://0dyezg.wiremockapi.cloud

POST Trigger up to 100 batch emails at once. [emails/send-batch]

curl -s -X POST 'https://0dyezg.wiremockapi.cloud/emails/batch' \
  -H 'Content-Type: application/json' \
  -d '{}'

GET Retrieve a list of received emails [emails/list-receiving]

curl -s -X GET 'https://0dyezg.wiremockapi.cloud/emails/receiving'

GET Retrieve account-level email metrics [emails/metrics]

curl -s -X GET 'https://0dyezg.wiremockapi.cloud/emails/metrics'
Method Path Summary
GET /api-keys Retrieve a list of API keys
POST /api-keys Create a new API key
DELETE /api-keys/{api_key_id} Remove an existing API key
PATCH /api-keys/{api_key_id} Update an existing API key
GET /audiences Retrieve a list of audiences
POST /audiences Create a list of contacts
DELETE /audiences/{id} Remove an existing audience
GET /audiences/{id} Retrieve a single audience
GET /automations Retrieve a list of automations
POST /automations Create an automation
DELETE /automations/{automation_id} Delete an automation
GET /automations/{automation_id} Retrieve a single automation
PATCH /automations/{automation_id} Update an automation
POST /automations/{automation_id}/duplicate Duplicate an automation
GET /automations/{automation_id}/runs Retrieve a list of automation runs
GET /automations/{automation_id}/runs/{run_id} Retrieve a single automation run
POST /automations/{automation_id}/stop Stop an automation
GET /broadcasts Retrieve a list of broadcasts
POST /broadcasts Create a broadcast
DELETE /broadcasts/{id} Remove an existing broadcast that is in the draft status
GET /broadcasts/{id} Retrieve a single broadcast
PATCH /broadcasts/{id} Update an existing broadcast
POST /broadcasts/{id}/cancel Cancel a broadcast
GET /broadcasts/{id}/clicked-links Retrieve a broadcast's clicked links
POST /broadcasts/{id}/duplicate Duplicate a broadcast
GET /broadcasts/{id}/recipients Retrieve broadcast recipients
POST /broadcasts/{id}/send Send or schedule a broadcast
GET /contact-properties Retrieve a list of contact properties
POST /contact-properties Create a new contact property
DELETE /contact-properties/{id} Remove an existing contact property
GET /contact-properties/{id} Retrieve a single contact property
PATCH /contact-properties/{id} Update an existing contact property
GET /contacts Retrieve a list of contacts
POST /contacts Create a new contact
GET /contacts/{contact_id}/segments Retrieve a list of segments for a contact
DELETE /contacts/{contact_id}/segments/{segment_id} Remove a contact from a segment
POST /contacts/{contact_id}/segments/{segment_id} Add a contact to a segment
GET /contacts/{contact_id}/topics Retrieve topics for a contact
PATCH /contacts/{contact_id}/topics Update topics for a contact
DELETE /contacts/{id} Remove an existing contact by ID or email
GET /contacts/{id} Retrieve a single contact by ID or email
PATCH /contacts/{id} Update a single contact by ID or email
GET /contacts/imports Retrieve a list of contact imports
POST /contacts/imports Create a contact import
GET /contacts/imports/{id} Retrieve a single contact import
GET /domains Retrieve a list of domains
POST /domains Create a new domain
DELETE /domains/{domain_id} Remove an existing domain
GET /domains/{domain_id} Retrieve a single domain
PATCH /domains/{domain_id} Update an existing domain
GET /domains/{domain_id}/claim Retrieve a domain claim
POST /domains/{domain_id}/claim/verify Verify a domain claim
POST /domains/{domain_id}/verify Verify an existing domain
POST /domains/claim Claim a domain
GET /emails Retrieve a list of emails
POST /emails Send an email
GET /emails/{email_id} Retrieve a single email
PATCH /emails/{email_id} Update a single email
GET /emails/{email_id}/attachments Retrieve a list of attachments for a sent email
GET /emails/{email_id}/attachments/{attachment_id} Retrieve a single attachment for a sent email

+82 more endpoints in the full spec.

Unauthenticated WireMock Cloud demo sandbox for Resend — not an official Resend sandbox, and it returns simulated example data only.

What's inside the Resend template

The template follows Resend's published API, spec version 1.5.1. Sending an email answers with nothing but an id, exactly as Resend does; the email itself is stored, so fetching that id returns the full record: recipients normalised to an array, a message_id on the resend.dev domain, and last_event set to delivered, or scheduled when scheduled_at was given. Delivery-status checks written against the real API pass against this one.

  • Emails — send, schedule, reschedule, cancel and share links, with attachments stored and downloadable by id
  • Domains — creation with SPF and DKIM records to display, verification, and domain claims
  • Contacts, segments and topics — contacts addressable by id or email address, segment membership and per-topic subscriptions
  • Broadcasts and templates — draft, send, schedule, cancel and duplicate broadcasts; publish and duplicate templates
  • Webhooks, API keys and suppressions — whsec_ signing secrets with rotation, re_ tokens, and suppression lists by email or id
  • Inboxes and threads — agent inboxes with labels, drafts, replies, reply-all and forwards that update each thread's summary

Example implementation using resend-python

The Resend Python SDK reads its base URL from a module attribute, so one assignment redirects every call to the sandbox:

The RESEND_API_URL environment variable does the same job without touching code, which is the easier route for a test runner or a container. Point it at your own mock once you've created one.

Nothing leaves the sandbox, so an end-to-end test can send, read back and assert on an email's status without a verified domain, without spending sending quota, and without a real inbox on the other end.

import resend

# point the module at the sandbox (or set RESEND_API_URL) —
# the key is accepted but never validated
resend.api_url = "https://0dyezg.wiremockapi.cloud"
resend.api_key = "re_any_value"

sent = resend.Emails.send({
    "from": "Acme <orders@acme.example>",
    "to": "customer@example.com",
    "subject": "Your order shipped",
    "html": "<p>It is on its way.</p>",
})
print(resend.Emails.get(sent["id"])["last_event"])

Resend email mock API FAQ

No message ever reaches a mailbox. The delivered status is simulated state, which is what makes it useful in a test: the outcome is known in advance and the same on every run.

Any bearer value works, because keys aren't validated. Never paste a real re_ key into requests to the shared sandbox; it's public, and the request log is visible to whoever manages it.

No. limit, after and before are ignored, and every list returns all matching items with has_more set to false. A client's paging loop runs exactly once against this mock.

POST /emails/batch hands back one generated id per email but doesn't store the emails, so reading those ids answers 404. Use single sends when a test needs to read the email back.

Vendor names identify APIs represented by WireMock template sources. This page does not imply vendor endorsement, certification, partnership, or official integration status.