Reference
Resend compatibility
Letterpier answers the Resend HTTP API for the endpoints it covers, tested with resend@6.30.0.
Last reviewed
On this page (7)
Letterpier is tested with the unmodified resend@6.30.0 Node SDK, created with baseUrl: 'https://app.letterpier.com'. Use it with server-side keys only.
Terminal
npm install resend@6.30.0lib/mail.ts
import { Resend } from 'resend';export const mail = new Resend(process.env.LETTERPIER_API_KEY, { baseUrl: 'https://app.letterpier.com',});Responses include the fields Resend’s SDK expects, plus a few Letterpier extensions. SDK compatibility doesn’t mean the whole Resend product, or every field of every Resend response.
| Operation | Coverage |
|---|---|
POST /emails, emails. | Live and sandbox; from, to, cc, bcc, reply_to, text, html, headers, tags, attachments, scheduled_at. |
POST /emails/, batch. | Up to 100 messages, accepted atomically, with request idempotency. |
GET /emails, GET /emails/ | List with limit and after; retrieve with bodies. Isolated by project and environment. |
PATCH /emails/, POST /emails/ | Reschedule or cancel queued and scheduled messages only; scheduling up to 30 days ahead. |
GET /emails/ | Body retrieval with a full-access live key, plus the raw original message. |
/emails/ | SDK list and get: authenticated metadata and signed download links. |
GET /emails/ | The latest 100; cursor pagination is not implemented yet. |
/domains, /domains/, /domains/ | Create, list, get and verify, with Letterpier’s DNS records, an optional receiving flag on create and the eu-local region descriptor. |
/api-keys | Create, list and revoke, inheriting the caller’s environment; permissions enforced. |
/webhooks | Create, list and delete; the signing secret is shown once. |
What Letterpier answers, tested with resend@6.30.0
POST /emails,emails.send - Coverage
- Live and sandbox; from, to, cc, bcc, reply_to, text, html, headers, tags, attachments, scheduled_at.
POST /emails/,batch batch.send - Coverage
- Up to 100 messages, accepted atomically, with request idempotency.
GET /emails,GET /emails/:id - Coverage
- List with limit and after; retrieve with bodies. Isolated by project and environment.
PATCH /emails/,:id POST /emails/:id/ cancel - Coverage
- Reschedule or cancel queued and scheduled messages only; scheduling up to 30 days ahead.
GET /emails/receiving/ :id - Coverage
- Body retrieval with a full-access live key, plus the raw original message.
/emails/receiving/ :id/ attachments[/ :attachmentId] - Coverage
- SDK list and get: authenticated metadata and signed download links.
GET /emails/receiving - Coverage
- The latest 100; cursor pagination is not implemented yet.
/domains,/domains/,:id /domains/:id/ verify - Coverage
- Create, list, get and verify, with Letterpier’s DNS records, an optional receiving flag on create and the eu-local region descriptor.
/api-keys- Coverage
- Create, list and revoke, inheriting the caller’s environment; permissions enforced.
/webhooks- Coverage
- Create, list and delete; the signing secret is shown once.
Limits apply as documented: 50 recipients and 20 attachments per message, about 10 MB of attachments per request, and 250,000 characters each for text and html. Sending-only keys can’t read messages or manage domains, keys or webhooks.
These parts of the Resend API are outside this version:
- Domain scope on API keys
- Updating and deleting domains
- Getting and updating a single webhook
- Forwarding received mail
- Get APIs for the attachments of sent mail
- Templates
- Contacts
- Broadcasts
- Audiences and segments
- Topics
- Automations
- Open and click tracking
- Other marketing APIs
Within the covered endpoints, these behaviours differ from Resend. Each links to the details.
- Batches are always validated strictly; the permissive mode has no effect.Details
- Attachments must be base64 content; remote paths and inline images are rejected.Details
- React Email renders in your SDK; there is no server-side template storage.Details
- Listing received mail returns the latest 100, without a cursor.Details
- Received messages don’t include headers, message_id or received_for.Details
- Webhook payloads carry a documented subset of fields; complaints are simulated only.Details
last_eventincludes queue states, and saysdelayedandcancelled.Details- Domains accept only a name and Letterpier’s
receivingflag when created, notcapabilities; region is always eu-local.Details
Letterpier adds a few fields. Clients that ignore unknown fields, like the SDK, are unaffected.
| Field | Where | Meaning |
|---|---|---|
environment | Messages | live or sandbox: the environment of the key that sent it. |
sandbox | Messages, webhooks | true when nothing was delivered. |
last_error | Messages | Why a message was held or suppressed, or why its outcome is unknown. |
raw | Received messages | A signed link to the original .eml. |
Extension fields
environment- Where
- Messages
- Meaning
liveorsandbox: the environment of the key that sent it.
sandbox- Where
- Messages, webhooks
- Meaning
truewhen nothing was delivered.
last_error- Where
- Messages
- Meaning
- Why a message was held or suppressed, or why its outcome is unknown.
raw- Where
- Received messages
- Meaning
- A signed link to the original .eml.
Calls outside the coverage above get an explicit error, never a silent success. With a full-access key the answer is 501:
HTTP/1.1 501 Not ImplementedContent-Type: application/json{ "statusCode": 501, "name": "validation_error", "message": "This operation is not implemented. See docs/compatibility.md for supported features."}The same applies to the 13 resource roots the SDK knows but Letterpier doesn’t implement:
/audiences/automations/broadcasts/contact-properties/contacts/events/logs/oauth/segments/suppressions/templates/topics/usage
- Without a key: 401
missing_api_key. - With a sending-only key: 403
restricted_api_key. - With a full-access key: 501
validation_error. - Opened in a browser, an API address shows a short page explaining that it is for code. Unknown paths that aren’t API addresses show the site’s 404 page.
resend@6.30.0 for the endpoints listed on this page.