---
title: Resend
description: Configure the fetch-based Resend adapter.
sidebar:
  icon: "/og/provider-logos/resend-mark.svg"
---

The Resend adapter calls the Resend Email API directly. It does not add a runtime dependency.



**[Resend](https://resend.com)** · `@opencoredev/email-sdk/resend` · [setup guide](/docs/adapters/resend) · Sponsor · [live check](/docs/adapters/verification)



## Before live sends

Create a Resend API key and verify the sender domain or sender address you plan to use in `from`. A dry run can validate the Email SDK message shape, but only a live send from your target environment proves the Resend account, sender, and recipient policy are ready.

```ts
import { createEmailClient } from "@opencoredev/email-sdk";
import { resend } from "@opencoredev/email-sdk/resend";

const email = createEmailClient({
  adapters: [resend({ apiKey: process.env.RESEND_API_KEY! })],
});
```

## Send

```ts
await email.send(
  {
    from: "Acme <hello@acme.com>",
    to: "user@example.com",
    subject: "Welcome",
    html: "<p>Your workspace is ready.</p>",
    tags: [{ name: "type", value: "welcome" }],
  },
  {
    idempotencyKey: "welcome:user_123",
  },
);
```

## Options

| Option    | Type                     | Required | Notes                                 |
| --------- | ------------------------ | -------- | ------------------------------------- |
| `apiKey`  | `string`                 | Yes      | Resend API key.                       |
| `baseUrl` | `string`                 | No       | Defaults to `https://api.resend.com`. |
| `fetch`   | `typeof fetch`           | No       | Useful for tests or custom runtimes.  |
| `headers` | `Record<string, string>` | No       | Extra request headers.                |

## Response

The adapter returns the Resend `id` as `id` and `messageId`.

## CLI smoke test

```bash
RESEND_API_KEY="re_..." npx --yes --package @opencoredev/email-sdk email-sdk send \
  --adapter resend \
  --from "Acme <hello@acme.com>" \
  --to user@example.com \
  --subject "Resend test" \
  --text "It works"
```
