---
title: "Migrating from Resend"
description: "You can keep sending through your Resend account: connect it under Sending providers and OneSend routes through it. The domain you verified in Resend keeps its DNS records."
url: https://onesend.email/docs/migrate/resend/
---
# Migrating from Resend

You can keep sending through your Resend account: connect it under **Sending providers** and OneSend routes through it. The domain you verified in Resend keeps its DNS records.

## Option 1: the compatibility endpoint

`POST /compat/resend/emails` and `POST /compat/resend/emails/batch` accept the Resend payload and return Resend-shaped responses (`{ "id": "…" }`, `{ "data": [ … ] }`) and errors (`{ "statusCode", "name", "message" }`). Authenticate with `Authorization: Bearer <OneSend API key>`, as the Resend SDKs do.

With the Resend Node.js SDK, set the base URL through the environment variable the SDK reads (`RESEND_BASE_URL` in current versions; check your SDK version):

```bash
RESEND_BASE_URL=https://mail.example.com/compat/resend
RESEND_API_KEY=os_live_…   # a OneSend key, not a Resend key
```

With plain HTTP, replace `https://api.resend.com` with `https://<your server>/compat/resend`:

```bash
curl -X POST https://mail.example.com/compat/resend/emails \
  -H "Authorization: Bearer $ONESEND_API_KEY" -H "Content-Type: application/json" \
  -d '{"from":"Acme <hello@acme.dev>","to":["ada@example.com"],"subject":"Hello","html":"<p>Hi</p>","tags":[{"name":"category","value":"welcome"}]}'
```

### Field mapping

| Resend | OneSend | Notes |
|---|---|---|
| `from`, `to`, `cc`, `bcc`, `subject`, `html`, `text`, `headers` | same | |
| `reply_to` (`replyTo` in the Node SDK) | `replyTo` | |
| `scheduled_at` | `scheduledAt` | ISO 8601, or `in N min` / `hours` / `days`. Other natural-language forms are refused. |
| `tags: [{ name, value }]` | `tags: ["name:value"]` | Truncated to 64 characters. Filter logs and statistics by the combined tag. |
| `attachments[].content` (base64 or a serialized Buffer), `filename`, `path`, `content_type` | `attachments[]` with `content`, `filename`, `url`, `contentType` | `path` URLs are fetched with SSRF protection, at most 10 MB per file. |
| `template: { id, variables }` | `template`, `variables` | `id` is a OneSend template id or slug. |
| `Idempotency-Key` header | `Idempotency-Key` | In a batch, item *i* uses `<key>:<i>`. |
| `x-batch-validation: permissive` | supported | Valid emails are sent; the rest are listed in `errors`. |

Not supported (listed in `X-OneSend-Ignored-Fields`): `react` (render it to HTML in your app first), `topic_id`, attachment `content_id` (inline images). `text` is not generated from `html`: send both, or the content check reports a missing plain-text part.

Error names: `missing_api_key` (401), `validation_error` (403 for an invalid key, 422 for invalid fields), `restricted_api_key` (403, a Read only key), `missing_required_field` (422), `not_found` (404, template), `invalid_idempotent_request` (409).

Other Resend endpoints (domains, audiences, broadcasts, retrieving emails) have no compat equivalent. Use the native API: `/v1/domains`, `/v1/contacts` and `/v1/lists`, `/v1/campaigns`, `/v1/emails/{id}`.

## Option 2: the native API

| Resend | OneSend |
|---|---|
| `resend.emails.send({...})` | `onesend.emails.send({...})` (TypeScript SDK) or `POST /v1/emails`; `reply_to` → `replyTo`, `scheduled_at` → `scheduledAt`, tags are strings |
| `resend.batch.send([...])` | `onesend.emails.batch([...])` or `POST /v1/emails/batch` with `{ "emails": [...] }` |
| `resend.emails.get(id)` | `onesend.emails.get(id)`: also shows each provider attempt |
| Audiences and contacts | Contacts and lists (`/v1/contacts`, `/v1/lists`), with segments |
| Broadcasts | Campaigns (`/v1/campaigns`) |
| Webhooks (`email.delivered`, `email.bounced`, …) | OneSend webhooks with the same `email.*` style names; see [Webhooks](https://onesend.email/docs/webhooks/) |

## DNS

Nothing changes for the Resend records (the DKIM `resend._domainkey` record and the `send` subdomain MX and SPF). When you add the domain in OneSend with the Resend connection, OneSend reads the existing registration and shows it as verified. Add the `_onesend-verify` TXT record. Resend's SPF lives on the `send` subdomain, so your root SPF record needs no Resend include.

## Suppressions

Export bounced and complained addresses from Resend (the email logs, filtered by status) and import them as described in the [cutover checklist](https://onesend.email/docs/migrate/#general-cutover-checklist).

Then follow the [general cutover checklist](https://onesend.email/docs/migrate/#general-cutover-checklist).
