# Resend

## Docs

- [Create API key](https://resend.com/docs/api-reference/api-keys/create-api-key): Add a new API key to authenticate communications with Resend.
- [Delete API key](https://resend.com/docs/api-reference/api-keys/delete-api-key): Remove an existing API key.
- [List API keys](https://resend.com/docs/api-reference/api-keys/list-api-keys): Retrieve a list of API keys for the authenticated user.
- [Create Audience](https://resend.com/docs/api-reference/audiences/create-audience): Create a list of contacts.
- [Delete Audience](https://resend.com/docs/api-reference/audiences/delete-audience): Remove an existing audience.
- [Retrieve Audience](https://resend.com/docs/api-reference/audiences/get-audience): Retrieve a single audience.
- [List Audiences](https://resend.com/docs/api-reference/audiences/list-audiences): Retrieve a list of audiences.
- [Create Contact](https://resend.com/docs/api-reference/contacts/create-contact): Create a contact inside an audience.
- [Delete Contact](https://resend.com/docs/api-reference/contacts/delete-contact): Remove an existing contact from an audience.
- [Retrieve Contact](https://resend.com/docs/api-reference/contacts/get-contact): Retrieve a single contact from an audience.
- [List Contacts](https://resend.com/docs/api-reference/contacts/list-contacts): Show all contacts from an audience.
- [Update Contact](https://resend.com/docs/api-reference/contacts/update-contact): Update an existing contact.
- [Create Domain](https://resend.com/docs/api-reference/domains/create-domain): Create a domain through the Resend Email API.
- [Delete Domain](https://resend.com/docs/api-reference/domains/delete-domain): Remove an existing domain.
- [Retrieve Domain](https://resend.com/docs/api-reference/domains/get-domain): Retrieve a single domain for the authenticated user.
- [List Domains](https://resend.com/docs/api-reference/domains/list-domains): Retrieve a list of domains for the authenticated user.
- [Update Domain](https://resend.com/docs/api-reference/domains/update-domain): Update an existing domain.
- [Verify Domain](https://resend.com/docs/api-reference/domains/verify-domain): Verify an existing domain.
- [Cancel Email](https://resend.com/docs/api-reference/emails/cancel-email): Cancel a scheduled email.
- [Retrieve Email](https://resend.com/docs/api-reference/emails/retrieve-email): Retrieve a single email.
- [Send Batch Emails](https://resend.com/docs/api-reference/emails/send-batch-emails): Trigger up to 100 batch emails at once.
- [Send Email](https://resend.com/docs/api-reference/emails/send-email): Start sending emails through the Resend Email API.
- [Update Email](https://resend.com/docs/api-reference/emails/update-email): Update a scheduled email.
- [Errors](https://resend.com/docs/api-reference/errors): Troubleshoot problems with this comprehensive breakdown of all error codes.
- [Introduction](https://resend.com/docs/api-reference/introduction): Understand general concepts, response codes, and authentication strategies.
- [Introduction](https://resend.com/docs/dashboard/api-keys/introduction): Visualize all the API Keys on the Resend Dashboard.
- [Contacts](https://resend.com/docs/dashboard/audiences/contacts): How to manage and import contacts to your audiences.
- [Introduction](https://resend.com/docs/dashboard/audiences/introduction): Learn how to add, update, retrieve, and remove contacts that you send Broadcasts to.
- [Managing Unsubscribed Contacts](https://resend.com/docs/dashboard/audiences/managing-unsubscribe-list): Learn how to check and remove recipients who have unsubscribed to your marketing emails.
- [Introduction](https://resend.com/docs/dashboard/broadcasts/introduction): Send marketing emails efficiently without code.
- [Performance Tracking](https://resend.com/docs/dashboard/broadcasts/performance-tracking): Track your Broadcasts email performance in real-time
- [BIMI](https://resend.com/docs/dashboard/domains/bimi): Setting up BIMI to become a verified sender and show your logo from the inbox.
- [Cloudflare](https://resend.com/docs/dashboard/domains/cloudflare): Verify your domain on Cloudflare with Resend.
- [DMARC](https://resend.com/docs/dashboard/domains/dmarc): Setting up DMARC to prevent email spoofing and protect against unauthorized use of a domain in email messages.
- [Introduction](https://resend.com/docs/dashboard/domains/introduction): Visualize all the domains on the Resend Dashboard.
- [Namecheap](https://resend.com/docs/dashboard/domains/namecheap): Verify your domain on Namecheap with Resend.
- [Choosing a Region](https://resend.com/docs/dashboard/domains/regions): Resend offers sending from multiple regions
- [AWS Route 53](https://resend.com/docs/dashboard/domains/route53): Verify your domain on Route 53 with Resend.
- [Vercel](https://resend.com/docs/dashboard/domains/vercel): Verify your domain on Vercel with Resend.
- [Add an unsubscribe link to transactional emails](https://resend.com/docs/dashboard/emails/add-unsubscribe-to-transactional-emails): Learn how to give email recipients the ability to unsubscribe without searching for the unsubscribe link.
- [Attachments](https://resend.com/docs/dashboard/emails/attachments): Send emails with attachments.
- [Custom Headers](https://resend.com/docs/dashboard/emails/custom-headers): Customize how emails are sent with your own headers.
- [Deliverability Insights](https://resend.com/docs/dashboard/emails/deliverability-insights): Improve your deliverability with tailored insights based on your sending.
- [Email Bounces](https://resend.com/docs/dashboard/emails/email-bounces): Understanding and resolving delivery issues.
- [Email Templates](https://resend.com/docs/dashboard/emails/email-templates): Use high quality, unstyled components for your transactional emails using React and Typescript
- [Introduction](https://resend.com/docs/dashboard/emails/introduction): Visualize all the email on the Resend Dashboard.
- [Schedule Email](https://resend.com/docs/dashboard/emails/schedule-email): Send emails at a specific time without additional complexity.
- [Send Test Emails](https://resend.com/docs/dashboard/emails/send-test-emails): Simulate different events by sending test emails.
- [Tags](https://resend.com/docs/dashboard/emails/tags): Add unique identifiers to emails sent.
- [Event types](https://resend.com/docs/dashboard/webhooks/event-types): List of supported event types and their payload.
- [Introduction](https://resend.com/docs/dashboard/webhooks/introduction): Use webhooks to notify your application about email events.
- [Verify Webhooks Requests](https://resend.com/docs/dashboard/webhooks/verify-webhooks-requests): Learn how to use the signing secret to verify your webhooks.
- [Examples](https://resend.com/docs/examples): Explore sample apps for different use cases.
- [Integrations](https://resend.com/docs/integrations): Integrate Resend with the tools you already use.
- [Introduction](https://resend.com/docs/introduction): Resend is the email API for developers.
- [Can I receive emails with Resend?](https://resend.com/docs/knowledge-base/can-i-receive-emails-with-resend): Resend does not offer the functionality to receive email but there are a few workarounds that could help.
- [How can I delete my Resend account?](https://resend.com/docs/knowledge-base/how-can-i-delete-my-resend-account): How to request your Resend account and data to be deleted.
- [How can I join multiple teams?](https://resend.com/docs/knowledge-base/how-can-i-join-multiple-teams): A workaround for joining different teams.
- [How do Dedicated IPs work?](https://resend.com/docs/knowledge-base/how-do-dedicated-ips-work): When are Dedicated IPs helpful, and how can they be requested.
- [How do I avoid conflicts with my MX records?](https://resend.com/docs/knowledge-base/how-do-i-avoid-conflicting-with-my-mx-records): Learn how to avoid conflicts with your existing MX records when setting up a Resend domain.
- [How do I avoid Gmail's spam folder?](https://resend.com/docs/knowledge-base/how-do-i-avoid-gmails-spam-folder): Learn how to improve inbox placement in Gmail.
- [How do I avoid Outlook's spam folder?](https://resend.com/docs/knowledge-base/how-do-i-avoid-outlooks-spam-folder): Learn how to improve inbox placement in Outlook.
- [How do I ensure sensitive data isn't stored on Resend?](https://resend.com/docs/knowledge-base/how-do-i-ensure-sensitive-data-isnt-stored-on-resend): Information on how we can help you protect your customer's information.
- [How do I fix CORS issues?](https://resend.com/docs/knowledge-base/how-do-i-fix-cors-issues): Information on recommended options to avoid CORS errors when sending emails.
- [How do I maximize deliverability for Supabase Auth emails?](https://resend.com/docs/knowledge-base/how-do-i-maximize-deliverability-for-supabase-auth-emails): Everything you should do before you start sending authentication emails with Resend and Supabase.
- [How do I send with an avatar?](https://resend.com/docs/knowledge-base/how-do-i-send-with-an-avatar): Learn how to show your avatar in the inbox of your recipients.
- [Introduction](https://resend.com/docs/knowledge-base/introduction): A collection of answers to frequently asked questions.
- [Is it better to send emails from a subdomain or the root domain?](https://resend.com/docs/knowledge-base/is-it-better-to-send-emails-from-a-subdomain-or-the-root-domain): Discover why sending emails from a subdomain can be better than using a root domain.
- [Should I add an unsubscribe link to all of my emails sent with Resend?](https://resend.com/docs/knowledge-base/should-i-add-an-unsubscribe-link): Learn best practices about using unsubscribe links.
- [What attachment types are not supported?](https://resend.com/docs/knowledge-base/what-attachment-types-are-not-supported): Learn which file attachment extensions are unsupported.
- [What if an email says delivered but the recipient has not received it?](https://resend.com/docs/knowledge-base/what-if-an-email-says-delivered-but-the-recipient-has-not-received-it): Learn the steps to take when an email is delivered, but the recipient does not receive it.
- [What if my domain is not verifying?](https://resend.com/docs/knowledge-base/what-if-my-domain-is-not-verifying): Learn what steps to take when your domain doesn't seem to verifying.
- [What is Resend Pricing](https://resend.com/docs/knowledge-base/what-is-resend-pricing): Learn more about Resend's pricing plans.
- [What's the difference between Opportunistic TLS vs Enforced TLS?](https://resend.com/docs/knowledge-base/whats-the-difference-between-opportunistic-tls-vs-enforced-tls): Understand the different TLS configurations available.
- [Why are my open rates not accurate?](https://resend.com/docs/knowledge-base/why-are-my-open-rates-not-accurate): Learn why your open rate statistics are not accurate and what you can do about it.
- [SDKs](https://resend.com/docs/sdks): Open source client libraries for your favorite platforms.
- [Security](https://resend.com/docs/security): An overview of Resend security features and practices.
- [Auth0 with SMTP](https://resend.com/docs/send-with-auth0-smtp): Learn how to integrate Auth0 with Resend SMTP.
- [AWS Lambda](https://resend.com/docs/send-with-aws-lambda): Learn how to send your first email using AWS Lambda.
- [Axum](https://resend.com/docs/send-with-axum): Send your first email using Axum and the Resend Rust SDK.
- [Bun](https://resend.com/docs/send-with-bun): Learn how to send your first email using Bun and the Resend Node.js SDK.
- [Cloudflare Workers](https://resend.com/docs/send-with-cloudflare-workers): Learn how to send your first email using Cloudflare Workers.
- [Customer.io with SMTP](https://resend.com/docs/send-with-customer-io-smtp): Learn how to integrate Customer.io with Resend SMTP.
- [Deno Deploy](https://resend.com/docs/send-with-deno-deploy): Learn how to send your first email using Deno Deploy.
- [Django with SMTP](https://resend.com/docs/send-with-django-smtp): Learn how to integrate Django with Resend SMTP.
- [Introduction](https://resend.com/docs/send-with-elixir): Learn how to send your first email using the Resend Elixir SDK.
- [Express](https://resend.com/docs/send-with-express): Learn how to send your first email using Express and the Resend Node.js SDK.
- [FastAPI](https://resend.com/docs/send-with-fastapi): Learn how to send your first email using FastAPI and the Resend Python SDK.
- [Flask](https://resend.com/docs/send-with-flask): Learn how to send your first email using Flask and the Resend Python SDK.
- [Introduction](https://resend.com/docs/send-with-go): Learn how to send your first email using the Resend Go SDK.
- [Hono](https://resend.com/docs/send-with-hono): Learn how to send your first email using Hono and the Resend Node.js SDK.
- [Introduction](https://resend.com/docs/send-with-java): Learn how to send your first email using the Resend Java SDK.
- [Laravel](https://resend.com/docs/send-with-laravel): Learn how to send your first email using Laravel.
- [Laravel with SMTP](https://resend.com/docs/send-with-laravel-smtp): Learn how to send your first email using Laravel with SMTP.
- [Liferay with SMTP](https://resend.com/docs/send-with-liferay-smtp): Learn how to integrate Liferay with Resend SMTP.
- [Metabse with SMTP](https://resend.com/docs/send-with-metabase-smtp): Learn how to integrate Metabase with Resend SMTP.
- [NextAuth](https://resend.com/docs/send-with-nextauth-smtp): Learn how to send your first email using NextAuth.
- [Next.js](https://resend.com/docs/send-with-nextjs): Learn how to send your first email using Next.js and the Resend Node.js SDK.
- [Introduction](https://resend.com/docs/send-with-nodejs): Learn how to send your first email using the Resend Node.js SDK.
- [Nodemailer with SMTP](https://resend.com/docs/send-with-nodemailer-smtp): Learn how to send your first email using Nodemailer with SMTP.
- [Nuxt](https://resend.com/docs/send-with-nuxt): Learn how to send your first email using Nuxt and the Resend Node.js SDK.
- [Phoenix](https://resend.com/docs/send-with-phoenix): Learn how to send your first email using Phoenix and the Resend Elixir SDK.
- [Introduction](https://resend.com/docs/send-with-php): Learn how to send your first email using the Resend PHP SDK.
- [Introduction](https://resend.com/docs/send-with-python): Learn how to send your first email using the Resend Python SDK.
- [Ruby and Rails](https://resend.com/docs/send-with-rails): Learn how to send your first email using Rails and the Resend Ruby SDK.
- [Rails with SMTP](https://resend.com/docs/send-with-rails-smtp): Learn how to integrate Rails with Resend SMTP.
- [RedwoodJS](https://resend.com/docs/send-with-redwoodjs): Learn how to send your first email using Redwood.js and the Resend Node.js SDK.
- [Remix](https://resend.com/docs/send-with-remix): Learn how to send your first email using Remix and the Resend Node.js SDK.
- [Retool with SMTP](https://resend.com/docs/send-with-retool-smtp): Learn how to integrate Retool with Resend SMTP.
- [Introduction](https://resend.com/docs/send-with-ruby): Learn how to send your first email using the Resend Ruby SDK.
- [Introduction](https://resend.com/docs/send-with-rust): Learn how to send your first email using the Resend Rust SDK.
- [Sinatra](https://resend.com/docs/send-with-sinatra): Learn how to send your first email using Sinatra and the Resend Ruby SDK.
- [Introduction](https://resend.com/docs/send-with-smtp): Learn how to integrate Resend via SMTP.
- [Supabase Edge Functions](https://resend.com/docs/send-with-supabase-edge-functions): Learn how to send your first email using Supabase Edge Functions.
- [Supabase with SMTP](https://resend.com/docs/send-with-supabase-smtp): Learn how to integrate Supabase Auth with Resend SMTP.
- [Symfony](https://resend.com/docs/send-with-symfony): Learn how to send your first email using the Symfony Resend Mailer Bridge.
- [Vercel Functions](https://resend.com/docs/send-with-vercel-functions): Learn how to send your first email using Vercel Functions.
- [WordPress](https://resend.com/docs/send-with-wordpress-smtp): Learn how to send your first email using Wordpress.


# Create API key

POST /api-keys
Add a new API key to authenticate communications with Resend.

## Body Parameters

<ParamField body="name" type="string" required>
  The API key name.
</ParamField>

<ParamField body="permission" type="full_access | sending_access">
  The API key can have full access to Resend's API or be only restricted to send
  emails. \* `full_access`: Can create, delete, get, and update any resource. \*
  `sending_access`: Can only send emails.
</ParamField>

<ParamField body="domain_id" type="string">
  Restrict an API key to send emails only from a specific domain. This is only
  used when the `permission` is set to `sending_access`.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.apiKeys.create({ name: 'Production' });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->apiKeys->create([
    'name' => 'Production'
  ]);
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.ApiKeys.CreateParams = {
    "name": "Production",
  }

  resend.ApiKeys.create(params)
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    name: "Production"
  }
  Resend::ApiKeys.create(params)
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")
  params := &resend.CreateApiKeyRequest{
      Name: "Production",
  }
  apiKey, _ := client.ApiKeys.Create(params)
  ```

  ```rust Rust
  use resend_rs::{types::CreateApiKeyOptions, Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _api_key = resend
      .api_keys
      .create(CreateApiKeyOptions::new("Production"))
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateApiKeyOptions params = CreateApiKeyOptions
                  .builder()
                  .name("Production").build();

          CreateApiKeyResponse apiKey = resend.apiKeys().create(params);
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/api-keys' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "name": "Production"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "id": "dacf4072-4119-4d88-932f-6202748ac7c8",
    "token": "re_c1tpEyD8_NKFusih9vKVQknRAQfmFcWCv"
  }
  ```
</ResponseExample>


# Delete API key

DELETE /api-keys/:api_key_id
Remove an existing API key.

## Path Parameters

<ParamField path="api_key_id" type="string" required>
  The API key ID.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.apiKeys.remove('b6d24b8e-af0b-4c3c-be0c-359bbd97381e');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->apiKeys->remove('b6d24b8e-af0b-4c3c-be0c-359bbd97381e');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"
  resend.ApiKeys.remove(api_key_id="b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::ApiKeys.remove "b6d24b8e-af0b-4c3c-be0c-359bbd97381e"
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")
  client.ApiKeys.Remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    resend
      .api_keys
      .delete("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          resend.apiKeys().remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e");
      }
  }
  ```

  ```bash cURL
  curl -X DELETE 'https://api.resend.com/api-keys/b6d24b8e-af0b-4c3c-be0c-359bbd97381e' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```text Response
  HTTP 200 OK
  ```
</ResponseExample>


# List API keys

GET /api-keys
Retrieve a list of API keys for the authenticated user.

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.apiKeys.list();
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->apiKeys->list();
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"
  resend.ApiKeys.list()
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::ApiKeys.list
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")
  keys, err := client.ApiKeys.List()
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _api_keys = resend.api_keys.list().await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          resend.apiKeys().list();
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/api-keys' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "data": [
      {
        "id": "91f3200a-df72-4654-b0cd-f202395f5354",
        "name": "Production",
        "created_at": "2023-04-08T00:11:13.110779+00:00"
      }
    ]
  }
  ```
</ResponseExample>


# Create Audience

POST /audiences
Create a list of contacts.

## Body Parameters

<ParamField body="name" type="string" required>
  The name of the audience you want to create.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.audiences.create({ name: 'Registered Users' });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->audiences->create([
    'name' => 'Registered Users'
  ]);
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Audiences.CreateParams = {
    "name": "Registered Users"
  }

  resend.Audiences.create(params)
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Audiences.create({ name: "Registered Users" })
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  params := &resend.CreateAudienceRequest{
    Name: "Registered Users",
  }

  audience, err := client.Audiences.Create(params)
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _audience = resend.audiences.create("Registered Users").await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateAudienceOptions params = CreateAudienceOptions
                  .builder()
                  .name("Registered Users").build();

          CreateAudienceResponseSuccess data = resend.audiences().create(params);
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/audiences' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "name": "Registered Users"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "audience",
    "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "name": "Registered Users"
  }
  ```
</ResponseExample>


# Delete Audience

DELETE /audiences/:audience_id
Remove an existing audience.

## Path Parameters

<ParamField path="audience_id" type="string" required>
  The Audience ID.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.audiences.remove('78261eea-8f8b-4381-83c6-79fa7120f1cf');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->audiences->remove('78261eea-8f8b-4381-83c6-79fa7120f1cf');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Audiences.remove("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Audiences.remove("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  removed, err := client.Audiences.Remove("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _deleted = resend
      .audiences
      .delete("78261eea-8f8b-4381-83c6-79fa7120f1cf")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          RemoveAudienceResponseSuccess data = resend.audiences().remove("78261eea-8f8b-4381-83c6-79fa7120f1cf");
      }
  }
  ```

  ```bash cURL
  curl -X DELETE 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "audience",
    "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "deleted": true
  }
  ```
</ResponseExample>


# Retrieve Audience

GET /audiences/:audience_id
Retrieve a single audience.

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.audiences.get('78261eea-8f8b-4381-83c6-79fa7120f1cf');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->audiences->get('78261eea-8f8b-4381-83c6-79fa7120f1cf');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Audiences.get("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Audiences.get("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  audience, err := client.Audiences.Get("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _audience = resend
      .audiences
      .get("78261eea-8f8b-4381-83c6-79fa7120f1cf")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          GetAudienceResponseSuccess data = resend.audiences().get("78261eea-8f8b-4381-83c6-79fa7120f1cf");
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "audience",
    "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "name": "Registered Users",
    "created_at": "2023-10-06T22:59:55.977Z"
  }
  ```
</ResponseExample>


# List Audiences

GET /audiences
Retrieve a list of audiences.

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.audiences.list();
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->audiences->list();
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Audiences.list()
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Audiences.list
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  audiences, err := client.Audiences.List()
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _audiences = resend
      .audiences
      .list()
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          ListAudiencesResponseSuccess data = resend.audiences().list();
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/audiences' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "list",
    "data": [
      {
        "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
        "name": "Registered Users",
        "created_at": "2023-10-06T22:59:55.977Z"
      }
    ]
  }
  ```
</ResponseExample>


# Create Contact

POST /audiences/:audience_id/contacts
Create a contact inside an audience.

## Body Parameters

<ParamField body="email" type="string" required>
  The email address of the contact.
</ParamField>

<ParamField path="audienceId" type="string" required>
  The Audience ID.
</ParamField>

<ParamField body="firstName" type="string">
  The first name of the contact.
</ParamField>

<ParamField body="lastName" type="string">
  The last name of the contact.
</ParamField>

<ParamField body="unsubscribed" type="boolean">
  The subscription status.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.contacts.create({
    email: 'steve.wozniak@gmail.com',
    firstName: 'Steve',
    lastName: 'Wozniak',
    unsubscribed: false,
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->contacts->create(
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    [
      'email' => 'steve.wozniak@gmail.com',
      'first_name' => 'Steve',
      'last_name' => 'Wozniak',
      'unsubscribed' => false
    ]
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Contacts.CreateParams = {
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "unsubscribed": False,
    "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  }

  resend.Contacts.create(params)
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "unsubscribed": false,
    "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  }

  Resend::Contacts.create(params)
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  params := &resend.CreateContactRequest{
    Email:        "steve.wozniak@gmail.com",
    FirstName:    "Steve",
    LastName:     "Wozniak",
    Unsubscribed: false,
    AudienceId:   "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  }

  contact, err := client.Contacts.Create(params)
  ```

  ```rust Rust
  use resend_rs::{types::ContactData, Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let contact = ContactData::new("steve.wozniak@gmail.com")
      .with_first_name("Steve")
      .with_last_name("Wozniak")
      .with_unsubscribed(false);

    let _contact = resend
      .contacts
      .create("78261eea-8f8b-4381-83c6-79fa7120f1cf", contact)
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateContactOptions params = CreateContactOptions.builder()
                  .email("steve.wozniak@gmail.com")
                  .firstName("Steve")
                  .lastName("Wozniak")
                  .unsubscribed(false)
                  .audienceId("78261eea-8f8b-4381-83c6-79fa7120f1cf")
                  .build();

          CreateContactResponseSuccess data = resend.contacts().create(params);
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "unsubscribed": false
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "contact",
    "id": "479e3145-dd38-476b-932c-529ceb705947"
  }
  ```
</ResponseExample>


# Delete Contact

DELETE /audiences/:audience_id/contacts/:id
Remove an existing contact from an audience.

## Path Parameters

<ParamField path="audienceId" type="string" required>
  The Audience ID.
</ParamField>

<ParamField path="id" type="string">
  The Contact ID.
</ParamField>

<ParamField path="email" type="string">
  The Contact email.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  // Delete by contact id
  resend.contacts.remove({
    id: '520784e2-887d-4c25-b53c-4ad46ad38100',
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  });

  // Delete by contact email
  resend.contacts.remove({
    email: 'acme@example.com',
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  // Delete by contact id
  $resend->contacts->remove(
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    id: '520784e2-887d-4c25-b53c-4ad46ad38100'
  );

  // Delete by contact email
  $resend->contacts->remove(
    '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    'acme@example.com'
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  # Delete by contact id
  resend.Contacts.remove(
    id="520784e2-887d-4c25-b53c-4ad46ad38100",
    audience_id="78261eea-8f8b-4381-83c6-79fa7120f1cf"
  )

  # Delete by contact email
  resend.Contacts.remove(
    email="acme@example.com",
    audience_id="78261eea-8f8b-4381-83c6-79fa7120f1cf"
  )
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  # Delete by contact id
  Resend::Contacts.remove(
    "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "520784e2-887d-4c25-b53c-4ad46ad38100"
  )

  # Delete by contact email
  Resend::Contacts.remove(
    "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "acme@example.com"
  )
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  // Delete by contact id
  removed, err := client.Contacts.Remove(
    "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "520784e2-887d-4c25-b53c-4ad46ad38100"
  )

  // Delete by contact email
  removed, err := client.Contacts.Remove(
    "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "acme@example.com"
  )
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    // Delete by contact id
    let _deleted = resend
      .contacts
      .delete_by_contact_id(
        "78261eea-8f8b-4381-83c6-79fa7120f1cf",
        "520784e2-887d-4c25-b53c-4ad46ad38100",
      )
      .await?;

    // Delete by contact email
    let _deleted = resend
      .contacts
      .delete_by_email("78261eea-8f8b-4381-83c6-79fa7120f1cf", "acme@example.com")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          // Delete by contact id
         resend.contacts().remove(ContactRequestOptions.builder()
                          .id("520784e2-887d-4c25-b53c-4ad46ad38100")
                          .audienceId("78261eea-8f8b-4381-83c6-79fa7120f1cf")
                          .build());

          // Delete by contact email
          resend.contacts().remove(ContactRequestOptions.builder()
                          .email("acme@example.com")
                          .audienceId("78261eea-8f8b-4381-83c6-79fa7120f1cf")
                          .build());
      }
  }
  ```

  ```bash cURL
  # Delete by contact id
  curl -X DELETE 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts/520784e2-887d-4c25-b53c-4ad46ad38100' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'

  # Deleted by contact email
  curl -X DELETE 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts/acme@example.com' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "contact",
    "contact": "520784e2-887d-4c25-b53c-4ad46ad38100",
    "deleted": true
  }
  ```
</ResponseExample>


# Retrieve Contact

GET /audiences/:audience_id/contacts/:id
Retrieve a single contact from an audience.

## Path Parameters

<ParamField path="audienceId" type="string" required>
  The Audience ID.
</ParamField>

<ParamField path="id" type="string" required>
  The Contact ID.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.contacts.get({
    id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->contacts->get(
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    id: 'e169aa45-1ecf-4183-9955-b1499d5701d3'
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Contacts.get(
    id="e169aa45-1ecf-4183-9955-b1499d5701d3",
    audience_id="78261eea-8f8b-4381-83c6-79fa7120f1cf"
  )
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Contacts.get(
    "e169aa45-1ecf-4183-9955-b1499d5701d3",
    "78261eea-8f8b-4381-83c6-79fa7120f1cf"
  )
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  contact, err := client.Contacts.Get(
    "e169aa45-1ecf-4183-9955-b1499d5701d3",
    "78261eea-8f8b-4381-83c6-79fa7120f1cf"
  )
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _contact = resend
      .contacts
      .get(
        "e169aa45-1ecf-4183-9955-b1499d5701d3",
        "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      )
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          GetContactOptions params = GetContactOptions.builder()
                  .id("e169aa45-1ecf-4183-9955-b1499d5701d3")
                  .audienceId("78261eea-8f8b-4381-83c6-79fa7120f1cf").build();

          GetContactResponseSuccess data = resend.contacts().get(params);
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "contact",
    "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "created_at": "2023-10-06T23:47:56.678Z",
    "unsubscribed": false
  }
  ```
</ResponseExample>


# List Contacts

GET /audiences/:audience_id/contacts
Show all contacts from an audience.

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.contacts.list({
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->contacts->get(
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf'
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Contacts.list(
    audience_id="78261eea-8f8b-4381-83c6-79fa7120f1cf"
  )
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Contacts.list("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  contacts, err := client.Contacts.List("78261eea-8f8b-4381-83c6-79fa7120f1cf")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _contacts = resend
      .contacts
      .list("78261eea-8f8b-4381-83c6-79fa7120f1cf")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          ListContactsResponseSuccess data = resend.contacts().list("78261eea-8f8b-4381-83c6-79fa7120f1cf");
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "list",
    "data": [
      {
        "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
        "email": "steve.wozniak@gmail.com",
        "first_name": "Steve",
        "last_name": "Wozniak",
        "created_at": "2023-10-06T23:47:56.678Z",
        "unsubscribed": false
      }
    ]
  }
  ```
</ResponseExample>


# Update Contact

PATCH /audiences/:audience_id/contacts/:id
Update an existing contact.

## Path Parameters

<ParamField path="audienceId" type="string" required>
  The Audience ID.
</ParamField>

<ParamField path="id" type="string" required>
  The Contact ID.
</ParamField>

## Body Parameters

<ParamField body="firstName" type="string">
  The first name of the contact.
</ParamField>

<ParamField body="lastName" type="string">
  The last name of the contact.
</ParamField>

<ParamField body="unsubscribed" type="boolean">
  The subscription status.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.contacts.update({
    id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    unsubscribed: true,
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->contacts->update(
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
    [
      'unsubscribed' => true
    ]
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Contacts.UpdateParams = {
    "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
    "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "unsubscribed": True,
  }

  resend.Contacts.update(params)
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
    "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    "unsubscribed": true,
  }

  Resend::Contacts.update(params)
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  params := &resend.UpdateContactRequest{
    Id:           "e169aa45-1ecf-4183-9955-b1499d5701d3",
    AudienceId:   "78261eea-8f8b-4381-83c6-79fa7120f1cf",
    Unsubscribed: true,
  }

  contact, err := client.Contacts.Update(params)
  ```

  ```rust Rust
  use resend_rs::{types::ContactChanges, Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let changes = ContactChanges::new().with_unsubscribed(true);

    let _contact = resend
      .contacts
      .update(
        "e169aa45-1ecf-4183-9955-b1499d5701d3",
        "78261eea-8f8b-4381-83c6-79fa7120f1cf",
        changes,
      )
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          UpdateContactOptions params = UpdateContactOptions.builder()
                  .audienceId("78261eea-8f8b-4381-83c6-79fa7120f1cf")
                  .id("e169aa45-1ecf-4183-9955-b1499d5701d3")
                  .unsubscribed(true)
                  .build();

          UpdateContactResponseSuccess data = resend.contacts().update(params);
      }
  }
  ```

  ```bash cURL
  curl -X PATCH 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts/520784e2-887d-4c25-b53c-4ad46ad38100' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "unsubscribed": true
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "contact",
    "id": "479e3145-dd38-476b-932c-529ceb705947"
  }
  ```
</ResponseExample>


# Create Domain

POST /domains
Create a domain through the Resend Email API.

## Body Parameters

<ParamField body="name" type="string" required>
  The name of the domain you want to create.
</ParamField>

<ParamField body="region" type="string" default="us-east-1">
  The region where emails will be sent from. Possible values: `us-east-1' |
    'eu-west-1' | 'sa-east-1' | 'ap-northeast-1'`
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.domains.create({ name: 'example.com' });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->domains->create([
    'name' => 'example.com'
  ]);
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Domains.CreateParams = {
    "name": "example.com",
  }

  resend.Domains.create(params)
  ```

  ```ruby Ruby
  Resend.api_key = ENV["RESEND_API_KEY"]

  params = {
    name: "example.com",
  }
  domain = Resend::Domains.create(params)
  puts domain
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  params := &resend.CreateDomainRequest{
      Name: "example.com",
  }

  domain, err := client.Domains.Create(params)
  ```

  ```rust Rust
  use resend_rs::{types::CreateDomainOptions, Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _domain = resend
      .domains
      .add(CreateDomainOptions::new("example.com"))
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateDomainOptions params = CreateDomainOptions
                  .builder()
                  .name("example.com").build();

          CreateDomainResponse domain = resend.domains().create(params);
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/domains' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "name": "example.com"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
    "name": "example.com",
    "created_at": "2023-03-28T17:12:02.059593+00:00",
    "status": "not_started",
    "records": [
      {
        "record": "SPF",
        "name": "send",
        "type": "MX",
        "ttl": "Auto",
        "status": "not_started",
        "value": "feedback-smtp.us-east-1.amazonses.com",
        "priority": 10
      },
      {
        "record": "SPF",
        "name": "send",
        "value": "\"v=spf1 include:amazonses.com ~all\"",
        "type": "TXT",
        "ttl": "Auto",
        "status": "not_started"
      },
      {
        "record": "DKIM",
        "name": "nhapbbryle57yxg3fbjytyodgbt2kyyg._domainkey",
        "value": "nhapbbryle57yxg3fbjytyodgbt2kyyg.dkim.amazonses.com.",
        "type": "CNAME",
        "status": "not_started",
        "ttl": "Auto"
      },
      {
        "record": "DKIM",
        "name": "xbakwbe5fcscrhzshpap6kbxesf6pfgn._domainkey",
        "value": "xbakwbe5fcscrhzshpap6kbxesf6pfgn.dkim.amazonses.com.",
        "type": "CNAME",
        "status": "not_started",
        "ttl": "Auto"
      },
      {
        "record": "DKIM",
        "name": "txrcreso3dqbvcve45tqyosxwaegvhgn._domainkey",
        "value": "txrcreso3dqbvcve45tqyosxwaegvhgn.dkim.amazonses.com.",
        "type": "CNAME",
        "status": "not_started",
        "ttl": "Auto"
      }
    ],
    "region": "us-east-1"
  }
  ```
</ResponseExample>


# Delete Domain

DELETE /domains/:domain_id
Remove an existing domain.

## Path Parameters

<ParamField path="domain_id" type="string" required>
  The Domain ID.
</ParamField>

<RequestExample>
  ```js Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.domains.remove('d91cd9bd-1176-453e-8fc1-35364d380206');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->domains->remove('d91cd9bd-1176-453e-8fc1-35364d380206');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Domains.remove(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```ruby Ruby
  Resend.api_key = ENV["RESEND_API_KEY"]
  Resend::Domains.remove("d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  removed, err := client.Domains.Remove("d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _deleted = resend
      .domains
      .delete("d91cd9bd-1176-453e-8fc1-35364d380206")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          RemoveDomainResponse removed = resend.domains().remove("d91cd9bd-1176-453e-8fc1-35364d380206");
      }
  }
  ```

  ```bash cURL
  curl -X DELETE 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "domain",
    "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
    "deleted": true
  }
  ```
</ResponseExample>


# Retrieve Domain

GET /domains/:domain_id
Retrieve a single domain for the authenticated user.

## Path Parameters

<ParamField path="domain_id" type="string" required>
  The Domain ID.
</ParamField>

Possible domain `status` return types include `"not_started"`, `"pending"`, `"verified"`, `"failure"`, and `"temporary_failure"`. You can read more about the statuses [here](https://resend.com/docs/dashboard/domains/introduction#understand-a-domain-status).

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.domains.get('d91cd9bd-1176-453e-8fc1-35364d380206');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->domains->get('d91cd9bd-1176-453e-8fc1-35364d380206');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  resend.Domains.get(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Domains.get "d91cd9bd-1176-453e-8fc1-35364d380206"
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  retrievedDomain, err := client.Domains.Get("d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _domain = resend
      .domains
      .get("d91cd9bd-1176-453e-8fc1-35364d380206")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          Domain domain = resend.domains().get("d91cd9bd-1176-453e-8fc1-35364d380206");
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "domain",
    "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
    "name": "example.com",
    "status": "not_started",
    "created_at": "2023-04-26T20:21:26.347412+00:00",
    "region": "us-east-1",
    "records": [
      {
        "record": "SPF",
        "name": "send",
        "type": "MX",
        "ttl": "Auto",
        "status": "not_started",
        "value": "feedback-smtp.us-east-1.amazonses.com",
        "priority": 10
      },
      {
        "record": "SPF",
        "name": "send",
        "value": "\"v=spf1 include:amazonses.com ~all\"",
        "type": "TXT",
        "ttl": "Auto",
        "status": "not_started"
      },
      {
        "record": "DKIM",
        "name": "resend._domainkey",
        "value": "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsc4Lh8xilsngyKEgN2S84+21gn+x6SEXtjWvPiAAmnmggr5FWG42WnqczpzQ/mNblqHz4CDwUum6LtY6SdoOlDmrhvp5khA3cd661W9FlK3yp7+jVACQElS7d9O6jv8VsBbVg4COess3gyLE5RyxqF1vYsrEXqyM8TBz1n5AGkQIDAQA2",
        "type": "TXT",
        "status": "not_started",
        "ttl": "Auto"
      }
    ]
  }
  ```
</ResponseExample>


# List Domains

GET /domains
Retrieve a list of domains for the authenticated user.

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.domains.list();
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->domains->list();
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"
  resend.Domains.list()
  ```

  ```ruby Ruby
  Resend.api_key = ENV["RESEND_API_KEY"]
  Resend::Domains.list
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  domains, err := client.Domains.List()
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _domains = resend
      .domains
      .list()
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          ListDomainsResponse response = resend.domains().list();
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/domains' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "data": [
      {
        "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
        "name": "example.com",
        "status": "not_started",
        "created_at": "2023-04-26T20:21:26.347412+00:00",
        "region": "us-east-1"
      }
    ]
  }
  ```
</ResponseExample>


# Update Domain

PATCH /domains/:domain_id
Update an existing domain.

## Path Parameters

<ParamField path="domain_id" type="string" required>
  The Domain ID.
</ParamField>

## Body Parameters

<ParamField body="click_tracking" type="boolean">
  Track clicks within the body of each HTML email.
</ParamField>

<ParamField body="open_tracking" type="boolean">
  Track the open rate of each email.
</ParamField>

<ParamField body="tls" type="string" default="opportunistic">
  <ul>
    <li>
      `opportunistic`: Opportunistic TLS means that it always attempts to make a
      secure connection to the receiving mail server. If it can't establish a
      secure connection, it sends the message unencrypted.
    </li>

    <li>
      `enforced`: Enforced TLS on the other hand, requires that the email
      communication must use TLS no matter what. If the receiving server does
      not support TLS, the email will not be sent.
    </li>
  </ul>
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.domains.update({
    id: 'b8617ad3-b712-41d9-81a0-f7c3d879314e',
    openTracking: false,
    clickTracking: true,
    tls: 'enforced',
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->domains->update(
    'b8617ad3-b712-41d9-81a0-f7c3d879314e',
    [
      'open_tracking' => false,
      'click_tracking' => true,
      'tls' => 'enforced',
    ]
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Domains.UpdateParams = {
    "id": "b8617ad3-b712-41d9-81a0-f7c3d879314e",
    "open_tracking": False,
    "click_tracking": True,
    "tls": "enforced",
  }

  resend.Domains.update(params)
  ```

  ```ruby Ruby
  Resend.api_key = "re_123456789"

  Resend::Domains.update({
    id: "b8617ad3-b712-41d9-81a0-f7c3d879314e",
    open_tracking: false,
    click_tracking: true,
    tls: "enforced",
  })
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  updateDomainParams := &resend.UpdateDomainRequest{
    OpenTracking:  false,
    ClickTracking: true,
    Tls: resend.Enforced,
  }

  updated, err := client.Domains.Update("b8617ad3-b712-41d9-81a0-f7c3d879314e", updateDomainParams)
  ```

  ```rust Rust
  use resend_rs::{types::{DomainChanges, Tls}, Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let changes = DomainChanges::new()
      .with_open_tracking(false)
      .with_click_tracking(true)
      .with_tls(Tls::Enforced);

    let _domain = resend
      .domains
      .update("b8617ad3-b712-41d9-81a0-f7c3d879314e", changes)
      .await?;

    Ok(())
  }
  ```

  ```java Java
  Resend resend = new Resend("re_123456789");

  UpdateDomainOptions params = UpdateDomainOptions.builder()
                  .id("b8617ad3-b712-41d9-81a0-f7c3d879314e")
                  .openTracking(false)
                  .clickTracking(true)
                  .tls(Tls.ENFORCED)
                  .build();

  resend.domains().update(params);
  ```

  ```bash cURL
  curl -X PATCH 'https://api.resend.com/domains/b8617ad3-b712-41d9-81a0-f7c3d879314e' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "open_tracking": false,
    "click_tracking": true,
    "tls": "enforced"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "domain",
    "id": "b8617ad3-b712-41d9-81a0-f7c3d879314e"
  }
  ```
</ResponseExample>


# Verify Domain

POST /domains/:domain_id/verify
Verify an existing domain.

## Path Parameters

<ParamField path="domain_id" type="string" required>
  The Domain ID.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.domains.verify('d91cd9bd-1176-453e-8fc1-35364d380206');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"
  resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```ruby Ruby
  Resend.api_key = ENV["RESEND_API_KEY"]
  Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  verified, err := client.Domains.Verify("d91cd9bd-1176-453e-8fc1-35364d380206")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    resend
      .domains
      .verify("d91cd9bd-1176-453e-8fc1-35364d380206")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          VerifyDomainResponse verified = resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206");
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206/verify' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "domain",
    "id": "d91cd9bd-1176-453e-8fc1-35364d380206"
  }
  ```
</ResponseExample>


# Cancel Email

POST /emails/:id/cancel
Cancel a scheduled email.

## Path Parameters

<ParamField path="id" type="string" required>
  The Email ID.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.emails.cancel('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->emails->cancel('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"
  resend.Emails.cancel(email_id="49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  Resend::Emails.cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
  ```

  ```go Go
  import "github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  canceled, err := client.Emails.Cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
  if err != nil {
    panic(err)
  }
  fmt.Println(canceled.Id)
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _canceled = resend
      .emails
      .cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CancelEmailResponse canceled = resend
            .emails()
            .cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794");
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794/cancel' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "email",
    "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
  }
  ```
</ResponseExample>


# Retrieve Email

GET /emails/:id
Retrieve a single email.

## Path Parameters

<ParamField path="id" type="string" required>
  The Email ID.
</ParamField>

<RequestExample>
  ```js Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.emails.get('37e4414c-5e25-4dbc-a071-43552a4bd53b');
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->emails->get('37e4414c-5e25-4dbc-a071-43552a4bd53b');
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"
  resend.Emails.get(email_id="4ef9a417-02e9-4d39-ad75-9611e0fcc33c")
  ```

  ```ruby Ruby
  Resend.api_key = "re_123456789"
  email = Resend::Emails.get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c")
  puts email
  ```

  ```go Go
  import "github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  email, err := client.Emails.Get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c")
  ```

  ```rust Rust
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let _email = resend
      .emails
      .get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c")
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          Email email = resend.emails().get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c");
      }
  }
  ```

  ```bash cURL
  curl -X GET 'https://api.resend.com/emails/4ef9a417-02e9-4d39-ad75-9611e0fcc33c' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "email",
    "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
    "to": ["delivered@resend.dev"],
    "from": "Acme <onboarding@resend.dev>",
    "created_at": "2023-04-03T22:13:42.674981+00:00",
    "subject": "Hello World",
    "html": "Congrats on sending your <strong>first email</strong>!",
    "text": null,
    "bcc": [null],
    "cc": [null],
    "reply_to": [null],
    "last_event": "delivered"
  }
  ```
</ResponseExample>


# Send Batch Emails

POST /emails/batch
Trigger up to 100 batch emails at once.

Instead of sending one email per HTTP request, we provide a batching endpoint that permits you to send up to 100 emails in a single API call.

## Body Parameters

<ParamField body="from" type="string" required>
  Sender email address.

  To include a friendly name, use the format `"Your Name <sender@domain.com>"`.
</ParamField>

<ParamField body="to" type="string | string[]" required>
  Recipient email address. For multiple addresses, send as an array of strings.
  Max 50.
</ParamField>

<ParamField body="subject" type="string" required>
  Email subject.
</ParamField>

<ParamField body="bcc" type="string | string[]">
  Bcc recipient email address. For multiple addresses, send as an array of
  strings.
</ParamField>

<ParamField body="cc" type="string | string[]">
  Cc recipient email address. For multiple addresses, send as an array of
  strings.
</ParamField>

<ParamField body="reply_to" type="string | string[]">
  Reply-to email address. For multiple addresses, send as an array of strings.
</ParamField>

<ParamField body="html" type="string">
  The HTML version of the message.
</ParamField>

<ParamField body="text" type="string">
  The plain text version of the message.
</ParamField>

<ParamField body="react" type="string">
  The React component used to write the message. *Only available in the Node.js
  SDK.*
</ParamField>

<ParamField body="headers" type="object">
  Custom headers to add to the email.
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  await resend.batch.send([
    {
      from: 'Acme <onboarding@resend.dev>',
      to: ['foo@gmail.com'],
      subject: 'hello world',
      html: '<h1>it works!</h1>',
    },
    {
      from: 'Acme <onboarding@resend.dev>',
      to: ['bar@outlook.com'],
      subject: 'world hello',
      html: '<p>it works!</p>',
    },
  ]);
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->batch->send([
    [
      'from' => 'Acme <onboarding@resend.dev>',
      'to' => ['foo@gmail.com'],
      'subject' => 'hello world',
      'html' => '<h1>it works!</h1>',
    ],
    [
      'from' => 'Acme <onboarding@resend.dev>',
      'to' => ['bar@outlook.com'],
      'subject' => 'world hello',
      'html' => '<p>it works!</p>',
    ]
  ]);
  ```

  ```py Python
  import resend
  from typing import List

  resend.api_key = "re_123456789"

  params: List[resend.Emails.SendParams] = [
    {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["foo@gmail.com"],
      "subject": "hello world",
      "html": "<h1>it works!</h1>",
    },
    {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["bar@outlook.com"],
      "subject": "world hello",
      "html": "<p>it works!</p>",
    }
  ]

  resend.Batch.send(params)
  ```

  ```rb Ruby
  require "resend"

  Resend.api_key = 're_123456789'

  params = [
    {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["foo@gmail.com"],
      "subject": "hello world",
      "html": "<h1>it works!</h1>",
    },
    {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["bar@outlook.com"],
      "subject": "world hello",
      "html": "<p>it works!</p>",
    }
  ]

  Resend::Batch.send(params)
  ```

  ```go Go
  package examples

  import (
  	"fmt"
  	"os"

  	"github.com/resend/resend-go/v2"
  )

  func main() {

    ctx := context.TODO()

    client := resend.NewClient("re_123456789")

    var batchEmails = []*resend.SendEmailRequest{
      {
        From:    "Acme <onboarding@resend.dev>",
        To:      []string{"foo@gmail.com"},
        Subject: "hello world",
        Html:    "<h1>it works!</h1>",
      },
      {
        From:    "Acme <onboarding@resend.dev>",
        To:      []string{"bar@outlook.com"},
        Subject: "world hello",
        Html:    "<p>it works!</p>",
      },
    }

    sent, err := client.Batch.SendWithContext(ctx, batchEmails)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Data)
  }
  ```

  ```rust Rust
  use resend_rs::types::CreateEmailBaseOptions;
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let emails = vec![
      CreateEmailBaseOptions::new(
        "Acme <onboarding@resend.dev>",
        vec!["foo@gmail.com"],
        "hello world",
      )
      .with_html("<h1>it works!</h1>"),
      CreateEmailBaseOptions::new(
        "Acme <onboarding@resend.dev>",
        vec!["bar@outlook.com"],
        "world hello",
      )
      .with_html("<p>it works!</p>"),
    ];

    let _emails = resend.batch.send(emails).await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateEmailOptions firstEmail = CreateEmailOptions.builder()
              .from("Acme <onboarding@resend.dev>")
              .to("foo@gmail.com")
              .subject("hello world")
              .html("<h1>it works!</h1>")
              .build();

          CreateEmailOptions secondEmail = CreateEmailOptions.builder()
              .from("Acme <onboarding@resend.dev>")
              .to("bar@outlook.com")
              .subject("world hello")
              .html("<p>it works!</p>")
              .build();

          CreateBatchEmailsResponse data = resend.batch().send(
              Arrays.asList(firstEmail, secondEmail)
          );
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/emails/batch' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'[
    {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["foo@gmail.com"],
      "subject": "hello world",
      "html": "<h1>it works!</h1>"
    },
    {
      "from": "Acme <onboarding@resend.dev>",
      "to": ["bar@outlook.com"],
      "subject": "world hello",
      "html": "<p>it works!</p>"
    }
  ]'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "data": [
      {
        "id": "ae2014de-c168-4c61-8267-70d2662a1ce1"
      },
      {
        "id": "faccb7a5-8a28-4e9a-ac64-8da1cc3bc1cb"
      }
    ]
  }
  ```
</ResponseExample>

## Limitations

The `attachments`, `tags`, and `scheduled_at` fields are not supported yet.


# Send Email

POST /email
Start sending emails through the Resend Email API.

## Body Parameters

<ParamField body="from" type="string" required>
  Sender email address.

  To include a friendly name, use the format `"Your Name <sender@domain.com>"`.
</ParamField>

<ParamField body="to" type="string | string[]" required>
  Recipient email address. For multiple addresses, send as an array of strings.
  Max 50.
</ParamField>

<ParamField body="subject" type="string" required>
  Email subject.
</ParamField>

<ParamField body="bcc" type="string | string[]">
  Bcc recipient email address. For multiple addresses, send as an array of
  strings.
</ParamField>

<ParamField body="cc" type="string | string[]">
  Cc recipient email address. For multiple addresses, send as an array of
  strings.
</ParamField>

<ParamField body="scheduled_at" type="string">
  Schedule email to be sent later. The date should be in language natural (e.g.: `in 1 min`) or ISO 8601 format (e.g:
  `2024-08-05T11:52:01.858Z`).

  [See examples](/dashboard/emails/schedule-email)
</ParamField>

<ParamField body="reply_to" type="string | string[]">
  Reply-to email address. For multiple addresses, send as an array of strings.
</ParamField>

<ParamField body="html" type="string">
  The HTML version of the message.
</ParamField>

<ParamField body="text" type="string">
  The plain text version of the message.
</ParamField>

<ParamField body="react" type="string">
  The React component used to write the message. *Only available in the Node.js
  SDK.*
</ParamField>

<ParamField body="headers" type="object">
  Custom headers to add to the email.
</ParamField>

<ParamField body="attachments" type="array">
  Filename and content of attachments (max 40mb per email).

  [See examples](/dashboard/emails/attachments)

  <Expandable defaultOpen="true" title="properties">
    <ParamField body="content" type="buffer | string">
      Content of an attached file, passed as a buffer or base64 string.
    </ParamField>

    <ParamField body="filename" type="string">
      Name of attached file.
    </ParamField>

    <ParamField body="path" type="string">
      Path where the attachment file is hosted
    </ParamField>

    <ParamField body="content_type" type="string">
      Content type for the attachment, if not set will be derived from the filename property
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tags" type="array">
  Custom data passed in key/value pairs.

  [See examples](/dashboard/emails/tags).

  <Expandable defaultOpen="true" title="properties">
    <ParamField body="name" type="string" required>
      The name of the email tag.

      It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (\_), or dashes (-).

      It can contain no more than 256 characters.
    </ParamField>

    <ParamField body="value" type="string" required>
      The value of the email tag.

      It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (\_), or dashes (-).

      It can contain no more than 256 characters.
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    html: '<p>it works!</p>',
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'hello world',
    'html' => '<p>it works!</p>'
  ]);
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>"
  }

  email = resend.Emails.send(params)
  print(email)
  ```

  ```rb Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>"
  }

  sent = Resend::Emails.send(params)
  puts sent
  ```

  ```go Go
  import (
  	"fmt"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    params := &resend.SendEmailRequest{
        From:        "Acme <onboarding@resend.dev>",
        To:          []string{"delivered@resend.dev"},
        Subject:     "hello world",
        Html:        "<p>it works!</p>"
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust
  use resend_rs::types::{CreateEmailBaseOptions};
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "hello world";
    let html = "<p>it works!</p>";

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_html(html);

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateEmailOptions params = CreateEmailOptions.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("hello world")
                  .html("<p>it works!</p>")
                  .build();

          CreateEmailResponse data = resend.emails().send(params);
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
  }
  ```
</ResponseExample>


# Update Email

PATCH /emails/:id
Update a scheduled email.

## Path Parameters

<ParamField path="id" type="string" required>
  The Email ID.
</ParamField>

## Body Parameters

<ParamField body="scheduled_at" type="string">
  Schedule email to be sent later. The date should be in ISO 8601 format (e.g:
  2024-08-05T11:52:01.858Z).
</ParamField>

<RequestExample>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  const oneMinuteFromNow = new Date(Date.now() + 1000 * 60).toISOString();

  resend.emails.update({
    id: '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
    scheduledAt: oneMinuteFromNow,
  });
  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $oneMinuteFromNow = (new DateTime())->modify('+1 minute')->format(DateTime::ISO8601);

  $resend->emails->update('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794', [
    'scheduled_at' => $oneMinuteFromNow
  ]);
  ```

  ```python Python
  import resend
  from datetime import datetime, timedelta

  resend.api_key = "re_123456789"

  one_minute_from_now = (datetime.now() + timedelta(minutes=1)).isoformat()

  update_params: resend.Emails.UpdateParams = {
    "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
    "scheduled_at": one_minute_from_now
  }

  resend.Emails.update(params=update_params)
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  one_minute_from_now = (Time.now + 1 * 60).strftime("%Y-%m-%dT%H:%M:%S.%L%z")

  update_params = {
    "email_id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
    "scheduled_at": one_minute_from_now
  }

  Resend::Emails.update(update_params)
  ```

  ```go Go
  import "github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  oneMinuteFromNow := time.Now().Add(time.Minute * time.Duration(1))
  oneMinuteFromNowISO := oneMinuteFromNow.Format("2006-01-02T15:04:05-0700")

  updateParams := &resend.UpdateEmailRequest{
    Id:          "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
    ScheduledAt: oneMinuteFromNowISO
  }

  updatedEmail, err := client.Emails.Update(updateParams)

  if err != nil {
    panic(err)
  }
  fmt.Printf("%v\n", updatedEmail)
  ```

  ```rust Rust
  use chrono::{Local, TimeDelta};
  use resend_rs::types::UpdateEmailOptions;
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let one_minute_from_now = Local::now()
      .checked_add_signed(TimeDelta::minutes(1))
      .unwrap()
      .to_rfc3339();

    let update = UpdateEmailOptions::new()
      .with_scheduled_at(&one_minute_from_now);

    let _email = resend
      .emails
      .update("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", update)
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          String oneMinuteFromNow = Instant
            .now()
            .plus(1, ChronoUnit.MINUTES)
            .toString();

          UpdateEmailOptions updateParams = UpdateEmailOptions.builder()
                  .scheduledAt(oneMinuteFromNow)
                  .build();

          UpdateEmailResponse data = resend.emails().update("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", updateParams);
      }
  }
  ```

  ```bash cURL
  curl -X PATCH 'https://api.resend.com/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "scheduled_at": "2024-08-05T11:52:01.858Z"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "object": "email",
    "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
  }
  ```
</ResponseExample>


# Errors

Troubleshoot problems with this comprehensive breakdown of all error codes.

## Error schema

We use standard HTTP response codes for success and failure notifications, and our errors are further classified by type.

### `validation_error`

*   **Status:** 400
*   **Message:** We found an error with one or more fields in the request.
*   **Suggested action:** The message will contain more details about what field and error we found.

### `missing_api_key`

*   **Status:** 401
*   **Message:** Missing API key in the authorization header.
*   **Suggested action:** Include the following header in the request: `Authorization: Bearer YOUR_API_KEY`.

### `restricted_api_key`

*   **Status:** 401
*   **Message:** This API key is restricted to only send emails.
*   **Suggested action:** Make sure the API key has `Full access` to perform actions other than sending emails.

### `validation_error`

*   **Status:** 403
*   **Message:** You can only send testing emails to your own email address (`youremail@domain.com`).
*   **Suggested action:** In [Resend's Domain page](https://resend.com/domains), add and verify a domain for which you have DNS access. This allows you to send emails to addresses beyond your own.

### `not_found`

*   **Status:** 404
*   **Message:** The requested endpoint does not exist.
*   **Suggested action:** Change your request URL to match a valid API endpoint.

### `invalid_attachment`

*   **Status:** 422
*   **Message:** Attachment must have either a `content` or `path`.
*   **Suggested action:** Attachments must either have a `content` (strings, Buffer, or Stream contents) or `path` to a remote resource (better for larger attachments).

### `missing_required_field`

*   **Status:** 422
*   **Message:** The request body is missing one or more required fields.
*   **Suggested action:** Check the error message to see the list of missing fields.

### `daily_quota_exceeded`

*   **Status:** 429
*   **Message:** You have reached your daily email sending quota.
*   **Suggested action:** [Upgrade your plan](https://resend.com/settings/billing) to remove the daily quota limit or wait until 24 hours have passed to continue sending.

### `rate_limit_exceeded`

*   **Status:** 429
*   **Message:** Too many requests. Please limit the number of requests per second. Or [contact support](https://resend.com/contact) to increase rate limit.
*   **Suggested action:** You should read the [response headers](./introduction#rate-limit) and reduce the rate at which you request the API. This can be done by introducing a queue mechanism or reducing the number of concurrent requests per second. If you have specific requirements, [contact support](https://resend.com/contact) to request a rate increase.

### `security_error`

*   **Status:** 451
*   **Message:** We may have found a security issue with the request.
*   **Suggested action:** The message will contain more details. [Contact support](https://resend.com/contact) for more information.

### `application_error`

*   **Status:** 500
*   **Message:** An unexpected error occurred.
*   **Suggested action:** Try the request again later. If the error does not resolve, check our status page for service updates.


# Introduction

Understand general concepts, response codes, and authentication strategies.

## Base URL

The Resend API is built on **REST** principles. We enforce **HTTPS** in every request to improve data security, integrity, and privacy. The API does not support **HTTP**.

All requests contain the following base URL:

```
https://api.resend.com
```

## Authentication

To authenticate you need to add an *Authorization* header with the contents of the header being `Bearer re_123456789` where `re_123456789` is your [API Key](https://resend.com/api-keys).

```
Authorization: Bearer re_123456789
```

## Response codes

Resend uses standard HTTP codes to indicate the success or failure of your requests.

In general, `2xx` HTTP codes correspond to success, `4xx` codes are for user-related failures, and `5xx` codes are for infrastructure issues.

| Status | Description                             |
| ------ | --------------------------------------- |
| `200`  | Successful request.                     |
| `400`  | Check that the parameters were correct. |
| `401`  | The API key used was missing.           |
| `403`  | The API key used was invalid.           |
| `404`  | The resource was not found.             |
| `429`  | The rate limit was exceeded.            |
| `5xx`  | Indicates an error with Resend servers. |

<Info>
  Check [Error Codes](/api-reference/errors) for a comprehensive breakdown of
  all possible API errors.
</Info>

## Rate limit

The response headers describe your current rate limit following every request in conformance with the [IETF standard](https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-ratelimit-headers):

| Header name           | Description                                                         |
| --------------------- | ------------------------------------------------------------------- |
| `ratelimit-limit`     | Maximum number of requests allowed within a window.                 |
| `ratelimit-remaining` | How many requests you have left within the current window.          |
| `ratelimit-reset`     | How many seconds until the limits are reset.                        |
| `retry-after`         | How many seconds you should wait before making a follow-up request. |

The default maximum rate limit is **2 requests per second**. This number can be increased for trusted senders by request.

After that, you'll hit the rate limit and receive a `429` response error code.

To prevent this, we recommend reducing the rate at which you request the API. This can be done by introducing a queue mechanism or reducing the number of concurrent requests per second. If you have specific requirements, [contact support](https://resend.com/contact) to request a rate increase.

## FAQ

<AccordionGroup>
  <Accordion title="How does pagination work with the API?">
    At this moment, there are no pagination parameters since we don't provide a
    way to fetch data via API yet. We plan to add pagination capabilities in the
    future.
  </Accordion>

  <Accordion title="How do you handle API versioning?">
    Currently, there's no versioning system in place. We plan to add versioning
    via calendar-based headers in the future.
  </Accordion>
</AccordionGroup>


# Introduction

Visualize all the API Keys on the Resend Dashboard.

## What is an API Key

API Keys are secret tokens used to authenticate your requests. They are unique to your account and should be kept confidential.

## Add API Key

1.  Navigate to **API Keys** on the sidebar.
2.  Click **Create API Key**.
3.  Give your API Key a name.
4.  Select **Full access** or **Sending access** as the permission.
5.  If you select **Sending access**, you can choose the specific domain you want restrict access.

<img alt="Add API Key" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-api-keys-add.png" />

## Understand API Key permissions

There are two different permissions of API Keys:

*   **Full access**: allows the API Key to create, delete, get, and update any resource.
*   **Sending access**: allows the API Key to only send emails.

With API Key permissions, Resend users can give each API Key different permissions, which can limit the damage that may be done both accidentally or maliciously.

## Seeing all API Keys

You can see the **last time you used** an API Key.

By having different color indicators, you can quickly scan and detect which API Keys are being used and which ones are not.

<img alt="View All API Keys" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-api-keys-view-all.jpg" />

## Interacting with an inactive API Key

In the event that an API Key **hasn't been used in the last 30 days**, we now advise users to consider deleting them to keep their accounts secure.

<img alt="View Inactive API Key" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-api-keys-view-inactive.jpg" />

## Viewing an active API Key

When visualizing an active API Key, you can see the **total number of requests** made and go to a separate Logs page to view them.

<img alt="View Active API Key" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-api-keys-view-active.jpg" />


# Contacts

How to manage and import contacts to your audiences.

Resend has [Audiences](/dashboard/audiences/introduction) made up of Contacts. You can send [Broadcasts](/dashboard/broadcasts/introduction) to your Audiences. When adding a Contact, you can assign it an email address and first and last name to personalize your Broadcast to them.

You can add your Contacts to an Audience in three different ways: via API, CSV upload, or manually.

## 1. Adding Contacts programmatically via API

You can add contacts to an Audience programmatically. For instance, after someone makes a purchase, you can add them to your "Paying Customers" audience. Resend's SDKs have support for the [contacts](/api-reference/contacts/create-contact) endpoint.

<CodeGroup>
  ```ts Node.js
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  resend.contacts.create({
  email: 'steve.wozniak@gmail.com',
  firstName: 'Steve',
  lastName: 'Wozniak',
  unsubscribed: false,
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
  });

  ```

  ```php PHP
  $resend = Resend::client('re_123456789');

  $resend->contacts->create(
    audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
    [
      'email' => 'steve.wozniak@gmail.com',
      'first_name' => 'Steve',
      'last_name' => 'Wozniak',
      'unsubscribed' => false
    ]
  );
  ```

  ```python Python
  import resend

  resend.api_key = "re_123456789"

  params: resend.Contacts.CreateParams = {
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "unsubscribed": False,
    "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  }

  resend.Contacts.create(params)
  ```

  ```ruby Ruby
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "unsubscribed": false,
    "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  }

  Resend::Contacts.create(params)
  ```

  ```go Go
  import 	"github.com/resend/resend-go/v2"

  client := resend.NewClient("re_123456789")

  params := &resend.CreateContactRequest{
    Email:        "steve.wozniak@gmail.com",
    FirstName:    "Steve",
    LastName:     "Wozniak",
    Unsubscribed: false,
    AudienceId:   "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  }

  contact, err := client.Contacts.Create(params)
  ```

  ```rust Rust
  use resend_rs::{types::ContactData, Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let contact = ContactData::new("steve.wozniak@gmail.com")
      .with_first_name("Steve")
      .with_last_name("Wozniak")
      .with_unsubscribed(false);

    let _contact = resend
      .contacts
      .create("78261eea-8f8b-4381-83c6-79fa7120f1cf", contact)
      .await?;

    Ok(())
  }
  ```

  ```java Java
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateContactOptions params = CreateContactOptions.builder()
                  .email("steve.wozniak@gmail.com")
                  .firstName("Steve")
                  .lastName("Wozniak")
                  .unsubscribed(false)
                  .audienceId("78261eea-8f8b-4381-83c6-79fa7120f1cf")
                  .build();

          CreateContactResponseSuccess data = resend.contacts().create(params);
      }
  }
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/audiences/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "email": "steve.wozniak@gmail.com",
    "first_name": "Steve",
    "last_name": "Wozniak",
    "unsubscribed": false
  }'
  ```
</CodeGroup>

## 2. Adding Contacts by uploading a .csv

<Steps>
  <Step title="Go to Audiences">
    Go to the [Audiences](https://resend.com/audiences) page, and select **Add Contacts**.

    ![Adding Contacts](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-6.png)
  </Step>

  <Step title="Select Import">
    Select **Import CSV**.
  </Step>

  <Step title="Upload CSV">
    Upload your CSV file from your computer.

    ![Adding Contacts](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-6.png)
  </Step>

  <Step title="Map Fields">
    After uploading your CSV file, you're able to map the fields you want to use. Currently, the supported mapping fields are `email`, `first_name`, `last_name`, and `unsubscribed`.

    <img src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-1.png" alt="Import Contacts via CSV" class="extraWidth" />

    Finally, select **Continue**, review the contacts, and finish the upload.
  </Step>
</Steps>

## 3. Adding Contacts manually

<Steps>
  <Step title="Go to Audiences">
    Go to the [Audiences](https://resend.com/audiences) page, and select **Add Contacts**.

    ![Adding Contacts](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-6.png)
  </Step>

  <Step title="Choose Manual">
    Select **Add Manually**.
  </Step>

  <Step title="Add Contacts">
    You can then add either one, or multiple email addresses into the text field, separating multiple email addresses with commas.

    ![Adding Contacts Manually](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-7.png)
  </Step>
</Steps>


# Introduction

Learn how to add, update, retrieve, and remove contacts that you send Broadcasts to.

Managing subscribers and unsubscribers is a critical part of any email implementation. It's important to respect your users' preferences and ensure that they're receiving the right emails at the right time.

Resend Audiences allow you to group and manage your [contacts](/dashboard/audiences/contacts) in a simple and intuitive way.

<img src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-5.png" alt="Audience" class="extraWidth" />

## Send emails to your Audience

Audiences were designed to be used in conjunction with [Broadcasts](https://resend.com/broadcasts).

You can send emails to your Audience by creating a new Broadcast and selecting the Audience you want to send it to.

![Send emails to your Audience](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-2.png)

You can include the Unsubscribe Footer in your Broadcasts, which will be automatically replaced with the correct link for each contact.

![Unsubscribe Link](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-3.png)

## Automatic Unsubscribes

When you send emails to your Audience, Resend will automatically handle the unsubscribe flow for you.

If a contact unsubscribes from your emails, they will be skipped when sending a future Broadcast to this same audience.

![Automatic Unsubscribes](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/audiences-intro-4.png)

Learn more about managing your unsubscribe list [here](https://resend.com/docs/dashboard/audiences/managing-unsubscribe-list).


# Managing Unsubscribed Contacts

Learn how to check and remove recipients who have unsubscribed to your marketing emails.

It's essential to update your contact list when someone unsubscribes to maintain a good sender reputation. This reduces the likelihood of your emails being marked as spam, and can also improve deliverability for any other marketing or transactional emails you send.

When a contact unsubscribes from your emails, Resend will automatically handle the unsubscribe flow for you, and they will be skipped when sending the next Broadcast to that same audience.

## Checking Unsubcribed Contacts

To see which contacts have unsubscribed, first navigate to the [Audiences page](https://resend.com/audiences). Then, select the Audience that you want to check.

Click on the **All Statuses** filter next to the search bar, then select **Unsubscribed**.

<img alt="Managing Unsubscribe List" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/manage-unsubscriptions-1.png" />


# Introduction

Send marketing emails efficiently without code.

Broadcasts allow you to send email blasts to your customers using a WYSIWYG editor.

You can use this to send email blasts such as:

*   Newsletters
*   Product Launches
*   Investor Updates
*   Promotions
*   Changelogs

Our Broadcasts feature was made to enable your entire team to send email campaigns without having to ask for help from developers.

## No-Code Editor

<video autoPlay muted loop playsinline className="w-full aspect-video" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/broadcasts-intro-1.mp4" />

## Markdown Support

You can also write your emails using Markdown. This works with headings, lists, italic, bold, links, and quotes.

You can easily copy and paste content from applications like Notion, Google Docs, iA Writter and many others maintaining formatting consistency.

<video autoPlay muted loop src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/broadcasts-intro-2.mp4" />

## Custom Styling

You can customize the look and feel of your email by changing **global styles** such as the background color, link color, and container size, alling you create emails to align with their brand identity.

To do this, click on **Styles** at the top left of the Broadcast editor. You can edit specific images or lines of texts by selecting or highlighting them prior to clicking on **Styles**.

<video autoPlay muted loop playsinline className="w-full aspect-video" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/broadcasts-intro-3.mp4" />

You can also edit individual styles for each component, including the font size, font weight, and text alignment. You can also set custom properties for each component, such as image alt, button links, and social links,

<video autoPlay muted loop playsinline className="w-full aspect-video" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/broadcasts-intro-4.mp4" />

## Testing & Sending

Once you're finished writing your email, you can preview it in your personal inbox or send it to your team for feedback.

To do this, click on **Test Email** on the top right of your screen. Enter in the email address you'd like to send your email to, and then click on **Send Test Email** to complete.

Once you're ready to send your email to your Audience, click on **Send**, and slide to confirm.

<video autoPlay muted loop playsinline className="w-full aspect-video" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/broadcasts-intro-5.mp4" />


# Performance Tracking

Track your Broadcasts email performance in real-time

Once your broadcast is sent, you can track its performance right away. The insights you can view are emails delivered, unsubscribed, click rate, and open rate.

You can view these insights by clicking on [Broadcast](https://resend.com/broadcasts) in the left column, and then clicking on the Broadcast that you want to view.

<video autoPlay muted loop playsinline className="w-full aspect-video" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/broadcasts-performance-tracking-1.mp4" />

Please note, at times, open rates can be inaccurate for a number of reasons due to the way inbox providers handle incoming emails. You can [read more about this here.](https://resend.com/docs/knowledge-base/why-are-my-open-rates-not-accurate)


# BIMI

Setting up BIMI to become a verified sender and show your logo from the inbox.

## Prerequisites

To get the most out of this guide, you will need to:

*   **Obtain a registered trademark for your logo**
*   [Setup DMARC on your domain](/dashboard/domains/dmarc)

## What is BIMI?

BIMI (or [Brand Indicators for Message Identification](https://bimigroup.org/)) is a relatively new standard that allows you to specify a logo (and sometimes a checkmark) to be displayed next to your email in the inbox. This is a great way to increase brand recognition and trust as well as improve engagement.

![bimi-example](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/bimi-example.png)

Though this standard is a few years old, many major ISP's have just recently started supporting it. This makes adoption of BIMI a competitive edge for your inbox presence.

## 1. Configure DMARC

Just like SPF and DKIM are required for DMARC. DMARC is required for BIMI. This gives the assurance that your emails are properly authenticated and no one else could spoof your domain and send with your logo.

<Note>
  If you haven't setup DMARC yet, you can follow our [DMARC Setup
  Guide](/dashboard/domains/dmarc).
</Note>

Your DMARC settings much meet a certain strictness to be ready for BIMI.

| Parameter | Purpose    | Required Value               |
| --------- | ---------- | ---------------------------- |
| `p`       | Policy     | `p=quarantine` or `p=reject` |
| `pct`     | Percentage | `pct=100`                    |

Here is an example of an adequate DMARC record:

```
"v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarcreports@example.com"
```

Your emails must also be actively passing DMARC checks. You can check this by looking at the reports sent to you via the `rua` address. Most reports will be an XML format which can be uploaded to a DMARC XML converter like [dmarcian](https://us.dmarcian.com/xml-to-human-converter/).

<Note>
  For BIMI on a subdomain, the root or APEX domain must also have a DMARC policy
  of `p=quarantine` or `p=reject` in addition to the subdomain. If not, the
  subdomain will not be compliant to display a BIMI logo.
</Note>

## 2. Obtain a VMC

VMC (or [Verified Mark Certificate](https://bimigroup.org/verified-mark-certificates-vmc-and-bimi/)) is a certificate issued by a Certificate Authority (CA) that is used to verify that you are the owner of the logo you are trying to display. This is a similar process to obtaining an SSL certificate for your website.

There are multiple vendors that can issue a VMC. We recommend [DigiCert](https://www.digicert.com/).

A few things to know before starting the VMC process:

*   The process could take weeks, so start early and respond to their requests quickly
*   You will need to provide a [SVG Tiny P/S formatted logo](https://bimigroup.org/creating-bimi-svg-logo-files/)
*   You will need to prove you own the domain by adding a DNS record
*   You will need to prove you are the owner of the trademark by providing identification
*   You will need publicly available proof that your business exists. For newer startups, we found that [Yellow Pages](https://marketing.yellowpages.com/en/) or [Google Business Profiles](https://support.google.com/business/answer/3039617?hl=en) were the easiest ways to obtain this.

## 3. Set your BIMI DNS Record

Once you have your VMC, you can set your BIMI DNS record. This is a TXT record that points to the location of your VMC and your logo.

| Name           | Type | Value                                               |
| -------------- | ---- | --------------------------------------------------- |
| default.\_bimi | TXT  | v=BIMI1; l=link\_to\_logo; a=link\_to\_certificate; |

Here is an example of a BIMI DNS record:

```
v=BIMI1; l=https://vmc.digicert.com/00-00.svg; a=https://vmc.digicert.com/00-00.pem;
```

It contains a publicly and programmatically accessible link to your verified logo (.svg) and a link to your VMC (.pem).

It often takes a few days after this record is propagated for your logo to start displaying in inboxes.

## Reference

| Parameter | Purpose             | Example                                |
| --------- | ------------------- | -------------------------------------- |
| `v`       | The version of BIMI | `v=BIMI1`                              |
| `l`       | Logo                | `l=https://vmc.digicert.com/00-00.svg` |
| `a`       | Certificate         | `a=https://vmc.digicert.com/00-00.pem` |

<Note>
  Having issues setting up BIMI? [We can help](https://resend.com/help).
</Note>


# Cloudflare

Verify your domain on Cloudflare with Resend.

## Add Domain to Resend

Login to your [Resend Account](https://resend.com/login) and [add a domain](https://resend.com/domains).

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-add-domain.png" />

<Tip>
  It is a best practice to use a subdomain (updates.example.com) instead of the
  root domain (example.com). This allows for proper reputation segmentation
  based on topics or purpose (e.g. transactional and marketing).
</Tip>

## Login to Cloudflare

Login to your [Cloudflare account](https://cloudflare.com) and go to the DNS Records of your domain.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-cloudflare-main.png" />

## Add MX SPF Record

Click "Add Record" on Cloudflare.

Add the **MX Record** from your domain in Resend to Cloudflare and click "Save".

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-mx.png" />

<br />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-cloudflare-spf-mx.png" />

Below is a mapping of the record fields from Resend to Cloudflare:

| Cloudflare  | Resend   | Example Value                           |
| ----------- | -------- | --------------------------------------- |
| Type        | Type     | `MX`                                    |
| Name        | Name     | `send`                                  |
| Mail Server | Value    | `feedback-smtp.us-east-1.amazonses.com` |
| Priority    | Priority | `10`                                    |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

<Info>
  Do not use the same priority for multiple records. If Priority `10` is already
  in use, try a number slightly higher like `11` or `12`.
</Info>

## Add TXT SPF Record

Click "Add Record" on Cloudflare.

Add the **TXT Record** from your domain in Resend to Cloudflare and click "Save".

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-txt.png" />

<br />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-cloudflare-spf-txt.png" />

Below is a mapping of the record fields from Resend to Cloudflare:

| Cloudflare | Resend | Example Value                         |
| ---------- | ------ | ------------------------------------- |
| Type       | Type   | `TXT`                                 |
| Name       | Name   | `send`                                |
| Content    | Value  | `"v=spf1 include:amazonses.com ~all"` |
| TTL        | -      | `Auto`                                |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

## Add TXT DKIM Records

Click "Add Record" on Cloudflare.

Add the **TXT Record** from your domain in Resend to Cloudflare and click "Save".

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-dkim.png" />

<br />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-cloudflare-dkim-txt.png" />

Below is a mapping of the record fields from Resend to Cloudflare:

| Cloudflare   | Resend | Example Value                                      |
| ------------ | ------ | -------------------------------------------------- |
| Type         | Type   | `TXT`                                              |
| Name         | Name   | `resend._domainkey`                                |
| Target       | Value  | `p=MIGfMA0GCSqGSIbRL/a21QojogA+rYqIQXB/3DQEBDAQAB` |
| Proxy Status | -      | `DNS Only (disabled)`                              |
| TTL          | -      | `Auto`                                             |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `resend._domainkey.example.com`, paste only `resend._domainkey` (or
  `resend._domainkey.subdomain` if you're using a subdomain).
</Info>

## Complete Verification

Now click [Verify DNS Records](https://resend.com/domains) on your Domain in Resend. It may take up to 72 hours to complete the verification process (often much faster).

## Troubleshooting

If your domain is not successfully verified, these are some common troubleshooting methods.

<AccordionGroup>
  <Accordion title="Cloudflare returns 'Code: 1004' when adding CNAME Records.">
    Confirm your proxy settings are set to `DNS Only` on the record you are adding.
  </Accordion>

  <Accordion title="Resend shows my domain verification failed.">
    Review the records you added to Cloudflare to rule out copy and paste errors.
  </Accordion>

  <Accordion title="It has been longer than 72 hours and my domain is still Pending.">
    Message us at [support@resend.com](mailto:support@resend.com) and we will quickly investigate with you.
  </Accordion>
</AccordionGroup>


# DMARC

Setting up DMARC to prevent email spoofing and protect against unauthorized use of a domain in email messages.

## Prerequisites

To get the most out of this guide, your existing emails should be passing SPF and DKIM.

## What is DMARC?

DMARC (or [Domain-based Message Authentication, Reporting, and Conformance](https://dmarc.org/overview/)) is an email authentication protocol used to prevent email spoofing and protect against unauthorized use of a domain in email messages.

## 1. Add Flexible DMARC Record

To start, add a flexible DMARC record to your domain.

| Name                | Type | Value                                                                                            |
| ------------------- | ---- | ------------------------------------------------------------------------------------------------ |
| \_dmarc.example.com | TXT  | "v=DMARC1;p=none;pct=100;rua=mailto:[dmarcreports@example.com](mailto:dmarcreports@example.com)" |

This record is specifying a few parameters (see [Reference](#reference) section for more details):

```
"v=DMARC1; p=none; pct=90; rua=mailto:dmarcreports@example.com"
```

*   `v` - Version:
    This is the version of DMARC
*   `p` - Policy:
    This is telling the inbox how to process messages that fail DMARC. Options are `none`, `quarantine`, `reject` . It's a best practice to use at least quarantine or reject, but you should only do it once you know your messages are delivering and fully passing DMARC.
*   `pct` - Percentage:
    This specifies the percentage of failed messages that the DMARC policy should be applied to. This can be set to a lower number once you move to a quarantine or reject policy to gradually roll out.
*   `rua` - Reporting URI of Aggregate:
    This should be a **valid address** that can receive messages. This can be a different domain than the one you are setting the DMARC policy on, but see step 2 for instructions.

## 2. Test to Confirm Delivery and Passing

You should now send test emails and make sure they are delivering.

You should also inspect the email headers to find `dmarc=pass` .

## 3. Upgrade Policy

Once you feel comfortable with how DMARC is behaving across all your sending, you should upgrade your Policy to `quarantine` . This gives greater confidence because it tells the inbox providers that they should treat the failing messages.

You can use the `pct` here to do a gradual rollout.

## 4. Send Report to a Different Domain (Optional)

If you want to receive the DMARC reports to an address on a different domain, you need to specify in the `rua` of the sending domain but also add a record in the recipient domain giving access to receive the reports.

Let's say you are sending with **blue.com** but want to send the reports to **red.com**:

| Name                              | Type | Value      |
| --------------------------------- | ---- | ---------- |
| blue.com.\_report.\_dmarc.red.com | TXT  | "v=DMARC1" |

## Reference

| Parameter | Purpose                                       | Example                           |
| --------- | --------------------------------------------- | --------------------------------- |
| `v`       | Protocol version                              | `v=DMARC1`                        |
| `pct`     | Percentage of messages subjected to filtering | `pct=20`                          |
| `ruf`     | Reporting URI for forensic reports            | `ruf=mailto:authfail@example.com` |
| `rua`     | Reporting URI of aggregate reports            | `rua=mailto:aggrep@example.com`   |
| `p`       | Policy for organizational domain              | `p=quarantine`                    |
| `sp`      | Policy for subdomains of the OD               | `sp=reject`                       |
| `adkim`   | Alignment mode for DKIM                       | `adkim=s`                         |
| `aspf`    | Alignment mode for SPF                        | `aspf=r`                          |

<Note>
  Having issues setting up DMARC? [We can help](https://resend.com/help).
</Note>


# Introduction

Visualize all the domains on the Resend Dashboard.

<Warning>
  Domain not verifying? [Try
  this](/knowledge-base/what-if-my-domain-is-not-verifying).
</Warning>

## What is a domain

A domain is used to send emails using your own domain. Verifying a domain is a required step because it's essential to ensuring the deliverability of your emails.

In order to verify a domain, you must set the DNS entries that grant us permission to send email on your behalf.

## View domain details

Get information about your domain name, its verification status, and history.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend.png" />

## What are SPF records

Sender Policy Framework (SPF) is an email authentication standard that allows you to list all the IP addresses that are authorized to send email on behalf of your domain.

The SPF configuration is made of a TXT record that lists the IP addresses approved by the domain owner. It also includes a MX record that allows the recipient to send bounce and complaint feedback to your domain.

<img alt="SPF Records" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf.png" />

## What are DKIM records

DomainKeys Identified Mail (DKIM) is an email security standard designed to make sure that an email that claims to have come from a specific domain was indeed authorized by the owner of that domain.

The DKIM configuration is made of a TXT record that contains a public key that is used to verify the authenticity of the email.

<img alt="DKIM Records" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-dkim.png" />

## Understand a domain status

Domains can have different statuses, including:

*   **Not Started**: you've added a domain to Resend, but you haven't clicked on `Verify DNS Records` yet.
*   **Pending**: Resend is still trying to verify the domain.
*   **Verified**: your domain is successfully verified for sending in Resend.
*   **Failure**: Resend was unable to detect the DNS records within 72 hours.
*   **Temporary Failure**: for a previously verified domain, Resend will periodically check for the DNS record required for verification. If at some point, Resend is unable to detect the record, the status would change to "Temporary Failure". Resend will recheck for the DNS record for 72 hours, and if it's unable to detect the record, the domain status would change to "Failure". If it's able to detect the record, the domain status would change to "Verified".

## Open and Click Tracking

Open and click tracking is disabled by default for all domains. You can enable it by clicking on the toggles within the domain settings.

<img alt="Open and Click Tracking" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-open-and-click-tracking.png" />

## How Open Tracking Works

A 1x1 pixel transparent GIF image is inserted in each email and includes a unique reference to this image file. When the image is downloaded, Resend can tell exactly which message was opened and by whom.

## How Click Tracking Works

To track clicks, Resend modifies each link in the body of the HTML email. When recipients open a link, they are sent to a Resend server, and are immediately redirected to the URL destination.


# Namecheap

Verify your domain on Namecheap with Resend.

## Add Domain to Resend

First, login to your [Resend Account](https://resend.com/login) and [add a domain](https://resend.com/domains).

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-add-domain.png" />

<Tip>
  It is a best practice to use a subdomain (updates.example.com) instead of the
  root domain (example.com). This allows for proper reputation segmentation
  based on topics or purpose (e.g. transactional and marketing).
</Tip>

## Login to Namecheap

Then, login to your [Namecheap account](https://ap.www.namecheap.com), and go to the `Advanced DNS` page for the domain you want to verify.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-namecheap-main.png" />

## Add MX SPF Record

Under the `Mail Settings` section, click the dropdown and select `Custom MX`.

<Warning>
  If you are changing the MX configuration from `Gmail` to `Custom MX`, you need
  to [setup new MX records for
  Gmail](https://apps.google.com/supportwidget/articlehome?hl=en\&article_url=https://support.google.com/a/answer/174125).
  If you don't setup new records, receiving mail in your gmail inboxes will
  stop.
</Warning>

Add the **MX Record** from your domain in Resend to Namecheap and click "Save all changes".

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-mx.png" />

<br />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-namecheap-spf-mx.png" />

Below is a mapping of the record fields from Resend to Namecheap:

| Namecheap | Resend   | Example Value                           |
| --------- | -------- | --------------------------------------- |
| Type      | Type     | `MX Record`                             |
| Host      | Name     | `send`                                  |
| TTL       | -        | `Automatic`                             |
| Value     | Value    | `feedback-smtp.us-east-1.amazonses.com` |
| -         | Priority | `10`                                    |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

<Info>
  Namecheap does not label the `priority` column. It is the empty column after
  `Value`. Do not use the same priority for multiple records. If Priority `10`
  is already in use, try a number slightly higher like `11` or `12`.
</Info>

## Add TXT SPF Record

Under the `Host Records` section, click `Add New Record`.

Add the **TXT Record** from your domain in Resend to Namecheap and click the checkmark to save.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-txt.png" />

<br />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-namecheap-spf-txt.png" />

Below is a mapping of the record fields from Resend to Namecheap:

| Namecheap | Resend | Example Value                         |
| --------- | ------ | ------------------------------------- |
| Type      | Type   | `TXT Record`                          |
| Host      | Name   | `send`                                |
| TTL       | -      | `Automatic`                           |
| Value     | Value  | `"v=spf1 include:amazonses.com ~all"` |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

## Add TXT DKIM Records

In that same `Host Records` section, click `Add New Record`.

Add the **TXT Record** from your domain in Resend to Namecheap and click the checkmark to save.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-dkim.png" />

<br />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-namecheap-dkim-txt.png" />

Below is a mapping of the record fields from Resend to Namecheap:

| Namecheap | Resend | Example Value                                      |
| --------- | ------ | -------------------------------------------------- |
| Type      | Type   | `TXT Record`                                       |
| Host      | Name   | `resend._domainkey`                                |
| TTL       | -      | `Automatic`                                        |
| Value     | Value  | `p=MIGfMA0GCSqGSIbRL/a21QojogA+rYqIQXB/3DQEBDAQAB` |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `resend._domainkey.example.com`, paste only `resend._domainkey` (or
  `resend._domainkey.subdomain` if you're using a subdomain).
</Info>

## Complete Verification

Now click [Verify DNS Records](https://resend.com/domains) on your Domain in Resend. It may take up to 72 hours to complete the verification process (often much faster).

## Troubleshooting

If your domain is not successfully verified, these are some common troubleshooting methods.

<AccordionGroup>
  <Accordion title="Resend shows my domain verification failed.">
    Review the records you added to Namecheap to rule out copy and paste errors.
  </Accordion>

  <Accordion title="It has been longer than 72 hours and my domain is still Pending.">
    Message us at [support@resend.com](mailto:support@resend.com) and we will quickly investigate with you.
  </Accordion>
</AccordionGroup>


# Choosing a Region

Resend offers sending from multiple regions

Resend users have the option to send transactional and marketing emails from four different regions:

*   Europe (Ireland)
*   South America (Brazil)
*   East US (North Virginia)
*   Asia Pacific (Tokyo)

This means that no matter where your users are, you can ensure that they receive your emails in a timely and efficient manner.

Here's how you can visualize the different regions in the Resend dashboard:

<img alt="Multi Region Domains" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/multi-region-1.png" />

## Why is this important?

Especially for transactional emails like magic links, password resets, and welcome messages, users expect to receive them right away. If they don't, they might not be able to access your service right away, which could be a missed opportunity for your organization.

Here are some of the other benefits of using our multi-region email sending feature:

1.  **Faster delivery:** By sending emails from the region closest to your user, you can reduce latency and ensure a faster time-to-inbox. This can be the difference between people using/buying your product or not.
2.  **Easier account management:** Instead of having to maintain different accounts for each region, we're providing multi-region within the same account. That way, you aren't juggling different login credentials.
3.  **Increased resilience:** In case of disruption in one region, our multi-region feature enables you to send emails from a backup domain in a separate region, guaranteeing maximum uptime.

## Get Started

To start using our multi-region email sending feature, go to **[Domains](https://resend.com/domains)**, then select the option to add a new domain.
Finally, select the region you want to send your emails.

## How to set up multi-region for the same domain

To set up your domain in multiple regions, simply use a unique subdomain, and configure it to the region of your choosing. (ex: us.domain.com and eu.domain.com)

## Changing Domain Region

If you'd like to switch the region your domain is currently set to, please reach out to [Support](https://resend.com/help), and we can help you out.


# AWS Route 53

Verify your domain on Route 53 with Resend.

## Add Domain to Resend

First, login to your [Resend Account](https://resend.com/login) and [add a domain](https://resend.com/domains).

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-add-domain.png" />

<Tip>
  It is a best practice to use a subdomain (updates.example.com) instead of the
  root domain (example.com). This allows for proper reputation segmentation
  based on topics or purpose (e.g. transactional and marketing).
</Tip>

## Login to Route 53

Then, login to your [AWS Management Console, and open Route 53 console](https://console.aws.amazon.com/route53/), then click on your domain name. From there, click on `Create Record`.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-route53-createrecord.png" />

## Add MX SPF Record

Click the `Record type` dropdown, and select `MX`. Then, type in `send` for the `Record name`, and copy the record into the `Value` field. (be sure to include the 10, as seen in the screenshot!)

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-mx.png" />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-route53-spf-mx.png" />

Then, click on `Create records`.

Below is a mapping of the record fields from Resend to Route 53:

| Route 53       | Resend           | Example Value                              |
| -------------- | ---------------- | ------------------------------------------ |
| Record Type    | Type             | `MX Record`                                |
| Record name    | Name             | `send`                                     |
| Value          | Value & Priority | `10 feedback-smtp.us-east-1.amazonses.com` |
| TTL            | -                | `Use Route 53 Default (300)`               |
| Routing policy | -                | `Simple routing`                           |

<Info>
  Route 53 does not label the `priority` column, and you will need to add this
  in to the `Value` section, as shown in the screenshot. Do not use the same
  priority for multiple records. If Priority `10` is already in use, try a
  number slightly higher like `11` or `12`.
</Info>

## Add TXT SPF Record

Once again, click the `Record type` dropdown. Then, select TXT. Then, type in `send` for the `Record name`, and copy the record into the `Value` field.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-txt.png" />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-route53-spf-txt.png" />

Below is a mapping of the record fields from Resend to Route 53:

| Route 53       | Resend | Example Value                         |
| -------------- | ------ | ------------------------------------- |
| Record type    | Type   | `TXT Record`                          |
| Record name    | Name   | `send`                                |
| Value          | Value  | `"v=spf1 include:amazonses.com ~all"` |
| TTL            | -      | `Use Route 53 Default (300)`          |
| Routing policy | -      | `Simple routing`                      |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

## Add TXT DKIM Records

In the same section, click on `Add another record`.

This time, change the `Record name` to `resend._domainkey`, and change the `Record Type` to TXT. Add the **TXT Record** from your domain in Resend to the `Value` text box, then click on `Create Records`.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-dkim.png" />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-route53-dkim-txt.png" />

Below is a mapping of the record fields from Resend to Route 53:

| Route 53       | Resend | Example Value                                      |
| -------------- | ------ | -------------------------------------------------- |
| Record type    | Type   | `TXT Record`                                       |
| Record name    | Name   | `resend._domainkey`                                |
| Value          | Value  | `p=MIGfMA0GCSqGSIbRL/a21QojogA+rYqIQXB/3DQEBDAQAB` |
| TTL            | -      | `Use Route 53 Default (300)`                       |
| Routing policy | -      | `Simple routing`                                   |

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `resend._domainkey.example.com`, paste only `resend._domainkey` (or
  `resend._domainkey.subdomain` if you're using a subdomain).
</Info>

## Complete Verification

Now click [Verify DNS Records](https://resend.com/domains) on your Domain in Resend. It may take up to 5 hours to complete the verification process (often much faster).

## Troubleshooting

If your domain is not successfully verified, these are some common troubleshooting methods.

<AccordionGroup>
  <Accordion title="Resend shows my domain verification failed.">
    Review the records you added to Route 53 to rule out copy and paste errors.
  </Accordion>

  <Accordion title="It has been longer than 72 hours and my domain is still Pending.">
    Message us at [support@resend.com](mailto:support@resend.com) and we will quickly investigate with you.
  </Accordion>
</AccordionGroup>


# Vercel

Verify your domain on Vercel with Resend.

## Add Domain to Resend

First, login to your [Resend Account](https://resend.com/login) and [add a domain](https://resend.com/domains).

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-add-domain.png" />

<Tip>
  It is a [best practice to use a
  subdomain](/knowledge-base/is-it-better-to-send-emails-from-a-subdomain-or-the-root-domain)
  (updates.example.com) instead of the root domain (example.com). This allows
  for proper reputation segmentation based on topics or purpose (e.g.
  transactional and marketing).
</Tip>

## Login to Vercel

Login to your [Vercel account](https://vercel.com/login) and select the `Domains` tab.

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-vercel-domains.png" />

## Add MX SPF Record

Copy and paste the values in Resend to Vercel. Type `send` for the `Name` of the record in Vercel. Expand the `Type` dropdown and select `MX`. Copy the record value from Resend into the `Value` field in Vercel. Add `10` for the `Priority`.

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-mx.png" />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-vercel-spf-mx.png" />

Then, click on `Add`.

Below is a mapping of the record fields from Resend to Vercel:

| Vercel   | Resend   | Example Value                           |
| -------- | -------- | --------------------------------------- |
| Type     | Type     | `MX Record`                             |
| Name     | Name     | `send`                                  |
| Value    | Value    | `feedback-smtp.us-east-1.amazonses.com` |
| TTL      | -        | `Use Vercel default (60)`               |
| Priority | Priority | `10`                                    |

<Info>
  Do not use the same priority for multiple records. If Priority `10` is already
  in use on another record, try a number slightly higher like `11` or `12`.
</Info>

## Add TXT SPF Record

In the same section, add another record in Vercel.

Once again, type `send` for the `Name` of the record. Expand the `Type` dropdown and select `MX`. Copy the record value from Resend into the `Value` field in Vercel. Add `10` for the `Priority`.

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `send.example.com`, paste only `send` (or `send.subdomain` if you're using a
  subdomain).
</Info>

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-spf-txt.png" />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-vercel-spf-txt.png" />

Below is a mapping of the record fields from Resend to Vercel:

| Vercel | Resend | Example Value                         |
| ------ | ------ | ------------------------------------- |
| Type   | Type   | `TXT Record`                          |
| Name   | Name   | `send`                                |
| Value  | Value  | `"v=spf1 include:amazonses.com ~all"` |
| TTL    | -      | `Use Vercel default (60)`             |

## Add TXT DKIM Records

In the same section, add another record in Vercel.

This time type `resend._domainkey` for the `Name` of the record. Expand the `Type` dropdown and select `TXT`. Copy the record value from Resend into the `Value` field in Vercel.

<Info>
  Omit your domain from the record values in Resend when you paste. Instead of
  `resend._domainkey.example.com`, paste only `resend._domainkey` (or
  `resend._domainkey.subdomain` if you're using a subdomain).
</Info>

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-resend-dkim.png" />

<img alt="Domain Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-domains-vercel-dkim-txt.png" />

Below is a mapping of the record fields from Resend to Vercel:

| Vercel | Resend | Example Value                                      |
| ------ | ------ | -------------------------------------------------- |
| Type   | Type   | `TXT Record`                                       |
| Name   | Name   | `resend._domainkey`                                |
| Value  | Value  | `p=MIGfMA0GCSqGSIbRL/a21QojogA+rYqIQXB/3DQEBDAQAB` |
| TTL    | -      | `Use Vercel default (60)`                          |

## Complete Verification

Now click [Verify DNS Records](https://resend.com/domains) on your Domain in Resend. It may take a few hours to complete the verification process (often much faster).

## Troubleshooting

If your domain is not successfully verified, these are some common troubleshooting methods.

<AccordionGroup>
  <Accordion title="Resend shows my domain verification failed.">
    Review the records you added to Vercel to rule out copy and paste errors.
  </Accordion>

  <Accordion title="It has been longer than 72 hours and my domain is still Pending.">
    Message us at [support@resend.com](mailto:support@resend.com) and we will quickly investigate with you.
  </Accordion>
</AccordionGroup>


# Add an unsubscribe link to transactional emails

Learn how to give email recipients the ability to unsubscribe without searching for the unsubscribe link.

Resend currently doesn't manage contact lists for transactional emails.

If you manage your own list, you can add the `List-Unsubscribe: https://example.com/unsubscribe` header when sending emails using the Resend API.

As of Febuary 2024, your bulk messages must include a URL version in your list-unsubscribe header, `List-Unsubscribe-Post: List-Unsubscribe=One-Click`, and to allow for a `POST` request from the same URL.

When receiving a `POST`, it should return a blank page with `200 (OK)` or `202 (Accepted)`, and should show the regular unsubscribe page with the `GET` method. Ensure that users stop receiving email within 48 hours of this request.

This header allows email clients to offer an easy “Unsubscribe” option in their UI, enhancing user experience and decreasing spam complaints.

You can read more about this requirement in our [Bulk Sending Requirements blog post.](https://resend.com/blog/gmail-and-yahoo-bulk-sending-requirements-for-2024#one-click-unsubscribe)

```ts Node.js {11}
import { Resend } from 'resend';

const resend = new Resend('re_123456789');

await resend.emails.send({
  from: 'Acme <onboarding@resend.dev>',
  to: ['delivered@resend.dev'],
  subject: 'hello world',
  text: 'it works!',
  headers: {
    'List-Unsubscribe': '<https://example.com/unsubscribe>',
  },
});
```

## Example

<Card title="Unsubscribe url header" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-unsubscribe-url-header">
  See the full source code.
</Card>


# Attachments

Send emails with attachments.

There are two ways to send attachments in your emails: from a remote file or from a local file.

## Send attachments from a remote file

To send attachments from a remote file, you can use the `path` parameter. This parameter accepts a URL to the file you want to attach.

You can define the name of the file that will be attached using the `filename` parameter.

<CodeGroup>
  ```ts Node.js {12-13}
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'Receipt for your payment',
    html: '<p>Thanks for the payment</p>',
    attachments: [
      {
        path: 'https://resend.com/static/sample/invoice.pdf',
        filename: 'invoice.pdf',
      },
    ],
  });
  ```

  ```php PHP {10-11}
  $resend = Resend::client('re_123456789');

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'Receipt for your payment',
    'html' => '<p>Thanks for the payment</p>',
    'attachments' => [
      [
        'path' => 'https://resend.com/static/sample/invoice.pdf',
        'filename' => 'invoice.pdf'
      ]
    ]
  ]);
  ```

  ```python Python {6-7}
  import resend

  resend.api_key = "re_123456789"

  attachment: resend.Attachment = {
    "path": "https://resend.com/static/sample/invoice.pdf",
    "filename": "invoice.pdf",
  }

  params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Receipt for your payment",
    "html": "<p>Thanks for the payment</p>",
    "attachments": [attachment],
  }

  resend.Emails.send(params)
  ```

  ```rb Ruby {12-13}
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Receipt for your payment",
    "html": "<p>Thanks for the payment</p>",
    "attachments": [
      {
        "path": "https://resend.com/static/sample/invoice.pdf",
        "filename": 'invoice.pdf',
      }
    ]
  }

  Resend::Emails.send(params)
  ```

  ```go Go {12-13}
  import (
  	"fmt"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    attachment := &resend.Attachment{
      Path:  "https://resend.com/static/sample/invoice.pdf",
      Filename: "invoice.pdf",
    }

    params := &resend.SendEmailRequest{
        From:        "Acme <onboarding@resend.dev>",
        To:          []string{"delivered@resend.dev"},
        Subject:     "Receipt for your payment",
        Html:        "<p>Thanks for the payment</p>",
        Attachments: []*resend.Attachment{attachment},
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust {12-13}
  use resend_rs::types::{Attachment, CreateEmailBaseOptions};
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "Receipt for your payment";

    let path = "https://resend.com/static/sample/invoice.pdf";
    let filename = "invoice.pdf";

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_html("<p>Thanks for the payment</p>")
      .with_attachment(Attachment::from_path(path).with_filename(filename));

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java {8-9}
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          Attachment att = Attachment.builder()
                  .path("https://resend.com/static/sample/invoice.pdf")
                  .fileName("invoice.pdf")
                  .build();

          CreateEmailOptions params = CreateEmailOptions.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("Receipt for your payment")
                  .text("<p>Thanks for the payment</p>")
                  .attachments(att)
                  .build();

          CreateEmailResponse data = resend.emails().send(params);
      }
  }
  ```

  ```bash cURL {11-12}
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Receipt for your payment",
    "html": "<p>Thanks for the payment</p>",
    "attachments": [
      {
        "path": "https://resend.com/static/sample/invoice.pdf",
        "filename": "invoice.pdf"
      }
    ]
  }'
  ```
</CodeGroup>

## Send attachments from a local file

To send attachments from a local file, you will use the `content` parameter. This parameter accepts the Base64 encoded content of the file you want to attach.

You can also define the name of the file that will be attached using the `filename` parameter.

<CodeGroup>
  ```ts Node.js {16-17}
  import { Resend } from 'resend';
  import fs from 'fs';

  const resend = new Resend('re_123456789');

  const filepath = `${__dirname}/static/invoice.pdf`;
  const attachment = fs.readFileSync(filepath).toString('base64');

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'Receipt for your payment',
    text: '<p>Thanks for the payment</p>',
    attachments: [
      {
        content: attachment,
        filename: 'invoice.pdf',
      },
    ],
  });
  ```

  ```php PHP {10-11}
  $resend = Resend::client('re_123456789');

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'Receipt for your payment',
    'html' => '<p>Thanks for the payment</p>',
    'attachments' => [
      [
        'filename' => 'invoice.pdf',
        'content' => $invoiceBuffer
      ]
    ]
  ]);
  ```

  ```python Python {10}
  import os
  import resend

  resend.api_key = "re_123456789"

  f: bytes = open(
    os.path.join(os.path.dirname(__file__), "../static/invoice.pdf"), "rb"
  ).read()

  attachment: resend.Attachment = {"content": list(f), "filename": "invoice.pdf"}

  params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Receipt for your payment",
    "html": "<p>Thanks for the payment</p>",
    "attachments": [attachment],
  }

  resend.Emails.send(params)
  ```

  ```rb Ruby {14-15}
  require "resend"

  Resend.api_key = "re_123456789"

  file = IO.read("invoice.pdf")

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Receipt for your payment",
    "html": "<p>Thanks for the payment</p>",
    "attachments": [
      {
        "content": file.bytes,
        "filename": 'invoice.pdf',
      }
    ]
  }

  Resend::Emails.send(params)
  ```

  ```go Go {19-20}
  import (
  	"fmt"
  	"os"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    pwd, _ := os.Getwd()
    f, err := os.ReadFile(pwd + "/static/invoice.pdf")
    if err != nil {
      panic(err)
    }

    attachment := &resend.Attachment{
      Content:  f,
      Filename: "invoice.pdf",
    }

    params := &resend.SendEmailRequest{
        From:        "Acme <onboarding@resend.dev>",
        To:          []string{"delivered@resend.dev"},
        Subject:     "Receipt for your payment",
        Html:        "<p>Thanks for the payment</p>",
        Attachments: []*resend.Attachment{attachment},
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust {22}
  use std::fs::File;
  use std::io::Read;

  use resend_rs::types::{Attachment, CreateEmailBaseOptions};
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "Receipt for your payment";

    let filename = "invoice.pdf";
    let mut f = File::open(filename).unwrap();
    let mut invoice = Vec::new();
    f.read_to_end(&mut invoice).unwrap();

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_html("<p>Thanks for the payment</p>")
      .with_attachment(Attachment::from_content(invoice).with_filename(filename));

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java {8-9}
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          Attachment att = Attachment.builder()
                  .fileName("invoice.pdf")
                  .content("invoiceBuffer")
                  .build();

          CreateEmailOptions params = CreateEmailOptions.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("Receipt for your payment")
                  .html("<p>Thanks for the payment</p>")
                  .attachments(att)
                  .build();

          CreateEmailOptions params = CreateEmailOptions.builder()
      }
  }
  ```

  ```bash cURL {11-12}
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "Receipt for your payment",
    "html": "<p>Thanks for the payment</p>",
    "attachments": [
      {
        "content": "UmVzZW5kIGF0dGFjaG1lbnQgZXhhbXBsZS4gTmljZSBqb2Igc2VuZGluZyB0aGUgZW1haWwh%",
        "filename": "invoice.txt"
      }
    ]
  }'
  ```
</CodeGroup>

## Limitations

Here are the limitations while sending attachments in Resend:

*   The maximum request size, including the file is 40MB
*   See the list of [unsupported file types](/knowledge-base/what-attachment-types-are-not-supported)
*   Emails with attachments cannot be scheduled

## Examples

<CardGroup>
  <Card title="Attachments with Next.js (remote file)" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-attachments">
    See the full source code.
  </Card>

  <Card title="Attachments with Next.js (local file)" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-attachments-content">
    See the full source code.
  </Card>
</CardGroup>


# Custom Headers

Customize how emails are sent with your own headers.

Email headers are typically hidden from the end user but are crucial for deliverability. They include information about the sender, receiver, timestamp, and more.

Resend already includes all the necessary headers for you, but now you can also add your own custom headers.

This is a fairly advanced feature, but it can be useful for a few things:

*   Prevent threading on Gmail with the **`X-Entity-Ref-ID`** header ([Example](https://github.com/resend/resend-examples/tree/main/with-prevent-thread-on-gmail))
*   Include a shortcut for users to unsubscribe with the **`List-Unsubscribe`** header ([Example](https://github.com/resend/resend-examples/tree/main/with-unsubscribe-url-header))

Here's how you can add custom headers to your emails:

<CodeGroup>
  ```ts Node.js {11}
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    text: 'it works!',
    headers: {
      'X-Entity-Ref-ID': '123456789',
    },
  });
  ```

  ```php PHP {9}
  $resend = Resend::client('re_123456789');

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'hello world',
    'text' => 'it works!',
    'headers' => [
      'X-Entity-Ref-ID' => '123456789',
    ]
  ]);
  ```

  ```python Python {11}
  import resend

  resend.api_key = "re_123456789"

  params: resend.Emails.SendParams = {
    "from": "onboarding@resend.dev",
    "to": ["delivered@resend.dev"],
    "subject": "hi",
    "text": "<strong>hello, world!</strong>",
    "headers": {
      "X-Entity-Ref-ID": "123456789"
    }
  }

  email = resend.Emails.send(params)
  print(email)
  ```

  ```rb Ruby {11}
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "text": "it works!",
    "headers": {
      "X-Entity-Ref-ID": "123"
    },
  }

  sent = Resend::Emails.send(params)
  puts sent
  ```

  ```go Go {17}
  import (
  	"fmt"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    params := &resend.SendEmailRequest{
        From:        "Acme <onboarding@resend.dev>",
        To:          []string{"delivered@resend.dev"},
        Text:        "it works!",
        Subject:     "hello world",
        Headers:     map[string]string{
          "X-Entity-Ref-ID": "123456789",
        }
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust {14}
  use resend_rs::types::{Attachment, CreateEmailBaseOptions, Tag};
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "hello world";

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_text("it works!")
      .with_header("X-Entity-Ref-ID", "123456789");

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java {13}
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateEmailOptions params = CreateEmailOptions.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("hello world")
                  .text("it works!")
                  .headers(Map.of(
                      "X-Entity-Ref-ID", "123456789"
                  ))
                  .build();

          CreateEmailResponse data = resend.emails().send(params);
      }
  }
  ```

  ```bash cURL {10}
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "text": "it works!",
    "headers": {
      "X-Entity-Ref-ID": "123456789"
    }
  }'
  ```
</CodeGroup>


# Deliverability Insights

Improve your deliverability with tailored insights based on your sending.

<Note>
  While in Beta, Deliverability Insights are available for free to all plans.
</Note>

When you view your email within Resend, there is a "Insights" option. When selected, this will run eight deliverability best practice checks on your email and recommend possible changes to improve deliverability.

<img alt="Deliverability Insights" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/deliverability-insights-1.jpg" />

If a check passes, you'll get a nice green check. Resend will provide advice if it fails. We break these into two categories: Attention and Improvements.

## Attention Insights

Changes to your email that can improve deliverability.

<img alt="Attention Insights" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/deliverability-insights-2.jpg" />

#### Link URLs match sending domain

Ensure that the URLs in your email match the sending domain. Mismatched URLs can trigger spam filters.

For example, if your sending domain is `@widgets.com`, ensure links within the message point back to `https://widgets.com`.

#### DMARC Record is Valid

DMARC is a TXT record published in the DNS that specifies how email receivers should handle messages from your domain that don’t pass SPF or DKIM validation. [A valid DMARC record](/dashboard/domains/dmarc) can help improve email deliverability.

Starting in 2024, Gmail and Yahoo require senders to have a DMARC record published. When [viewing your domain](https://resend.com/domains) in Resend, we provide a suggested DMARC record if you’re unsure what to publish.

#### Include Plain Text Version

Including a plain text version of your email ensures that your message is accessible to all recipients, including those who have email clients that do not support HTML.

If you're using Resend's API, [plain text is passed via the `text` parameter](https://resend.com/docs/api-reference/emails/send-email).

This can also generate plain text using [React Email](https://react.email/docs/utilities/render#4-convert-to-plain-text).

#### Don't use "no-reply"

Indicating that this is a one-way communication decreases trust. Some email providers use engagement (email replies) when deciding how to filter your email. A valid email address allows you to communicate with your recipients easily if they have questions.

#### Keep email body size small

Gmail limits the size of each email message to 102 KB. Once that limit is reached, the remaining content is clipped and hidden behind a link to view the entire message. Keep your email body size small to avoid this issue.

This check will show the current size of your email.

## Improvement Insights

If you're diagnosing a deliverability issue, changing your email practices could be helpful.

<img alt="Improvement Insights" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/deliverability-insights-3.jpg" />

#### Use a Subdomain

Using a subdomain instead of the root domain helps segment your sending by purpose. This protects different types of sending from impacting the reputation of others and clearly shows the sending purpose.

#### Disable Click Tracking

Click tracking modifies links, sometimes causing spam filters to flag emails as suspicious or phishing attempts. Disabling click tracking can help with email deliverability, especially for sensitive transactional emails like login or email verification.

If on, you can [disable click tracking on your domain in Resend](https://resend.com/domains).

#### Disable Open Tracking

Spam filters are sensitive to tracking pixels, flagging them as potential spam. Without these tracking elements, emails may bypass these filters more effectively, especially for sensitive transactional emails like login or email verification.

If on, you can [disable open tracking on your domain in Resend](https://resend.com/domains).


# Email Bounces

Understanding and resolving delivery issues.

## Why does an email bounce?

A bounce happens when an email cannot be delivered to the person it was meant for, and is returned to the sender. It essentially "bounces" back to the person who sent it.

Some reasons include invalid email addresses, full mailboxes, technical issues with email servers, spam filters, message size restrictions, or blacklisting of the sender's email server.

## Bounce Types and Subtypes

When an email bounces, Resend receives a message from the recipient's mail server. The bounce message explains why the delivery failed so the sender can fix the issue.

There are three types of bounces:

1.  `Permanent` - also known as "hard bounce,” where the recipient's mail server rejects the email and will never be delivered.

    *   `General` - The recipient's email provider sent a hard bounce message.
    *   `NoEmail` - It was not possible to retrieve the recipient email address from the bounce message.
    *   `Suppressed` - The recipient's email address is on the suppression list because it has a history of producing hard bounces.
    *   `OnAccountSupressionList` - Resend has suppressed sending to this address because it has previously "hard bounced."
    *   `General` - The recipient's email provider sent a general bounce message. You might be able to send a message to the same recipient in the future if the issue that caused the message to bounce is resolved.

2.  `Transient` - also known as "soft bounce,” where the recipient's mail server rejects the email but it could be delivered in the future.

    *   `General` - The recipient's email provider sent a general bounce message. You might be able to send a message to the same recipient in the future if the issue that caused the message to bounce is resolved.
    *   `MailboxFull` - The recipient's email provider sent a bounce message because the recipient's inbox was full. You might be able to send to the same recipient in the future when the mailbox is no longer full.
    *   `MessageTooLarge` - The recipient's email provider sent a bounce message because message you sent was too large. You might be able to send a message to the same recipient if you reduce the size of the message.
    *   `ContentRejected` - The recipient's email provider sent a bounce message because the message you sent contains content that the provider doesn't allow. You might be able to send a message to the same recipient if you change the content of the message.
    *   `AttachementRejected` - The recipient's email provider sent a bounce message because the message contained an unacceptable attachment. For example, some email providers may reject messages with attachments of a certain file type, or messages with very large attachments. You might be able to send a message to the same recipient if you remove or change the content of the attachment.

<Tip>
  Sometimes, inboxes use autoresponders to signal a bounce. A `transient` status
  could mean it's related to the autoresponder, and it's not a permanent issue.
</Tip>

3.  `Undetermined` - where the recipient's email server bounced, but the bounce message didn't contain enough information for Resend to determine the underlying reason.
    *   `Undetermined` - The recipient's email provider sent a bounce message. The bounce message didn't contain enough information for Resend to determine the reason for the bounce.

## Viewing Bounce Details in Resend

You can see the bounce details by clicking on the email, and hovering over the `Bounced` label.

<img alt="Email Bounce Notification" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/email-bounce-details-1.png" />

Once you click **See Details**, the drawer will open on the right side of your screen with the bounce type, subtype, along with suggestions on how to proceed.

<img alt="Email Bounce Drawer" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/email-bounce-details-2.png" />


# Email Templates

Use high quality, unstyled components for your transactional emails using React and Typescript

[React Email](https://react.email/) makes it easy to create email templates with React and TailwindCSS and manage them in your code.

Check out [some examples](https://demo.react.email/preview/reviews/airbnb-review) that we have created, along with the source code so you can start sending emails, quickly.


# Introduction

Visualize all the email on the Resend Dashboard.

## View email details

See all the metadata associated with an email, including the sender address, recipient address, subject, and more.

<img alt="Email Details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-item.png" />

You can also see the email content as HTML or plain text.

<img alt="Email - View Tabs" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-view-tabs.png" />

## Understand email events

Here are all the events that can be associated with an email:

*   `Sent` - The API request was successful and Resend will attempt to deliver the message to the recipient's mail server.
*   `Delivered` - Resend successfully delivered the email to the recipient's mail server.
*   `Delivery Delayed` - The email couldn't be delivered to the recipient's mail server because a temporary issue occurred. Delivery delays can occur, for example, when the recipient's inbox is full, or when the receiving email server experiences a transient issue.
*   `Complained` - The email was successfully delivered to the recipient's mail server, but the recipient marked it as spam.
*   `Bounced` - The recipient's mail server permanently rejected the email.

## Share email link

You can share a public link of an email with anyone. This will help them view the email without needing a Resend account.

To share a link, click on the dropdown menu, and select "Share email".

<img alt="Email - Share Link Option" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-share-option.png" />

Then copy the URL and share it with your team members.

<img alt="Email - Share Link Modal" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-share-modal.png" />

Once they open the link, they should be able to visualize the entire email without any sort of authentication required.

<img alt="Email - Share Link Item" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-share-item.png" />

## See associated logs

You can check all the logs associated with an email. This will help you troubleshoot any issues with the request itself.

To view the logs, click on the dropdown menu, and select "View log".

<img alt="Email - View Logs Option" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-log-option.png" />

This will take you to logs, where you can see all the logs associated with the email.

<img alt="Email - View Logs Item" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-emails-log-item.png" />


# Schedule Email

Send emails at a specific time without additional complexity.

While some emails need to be delivered as soon as possible, like password resets or magic links, others can be scheduled for a specific time.

Here are some examples of when you might want to schedule an email:

*   Send welcome email **5 minutes after** signup
*   Trigger a reminder email **24 hours before** an event
*   Schedule a weekly digest email for the **next day at 9am PST**

Before, you had to use external services to handle the scheduling logic, but now you can use the new Resend API to schedule emails.

<Info>Emails can be scheduled up to 72 hours in advance.</Info>

There are two ways to schedule an email:

1.  [Using natural language](#1-schedule-using-natural-language)
2.  [Using date format](#2-schedule-using-date-format)

## 1. Schedule using natural language

You can use the various Resend SDKs to schedule emails.

The date can be defined using natural language, such as `"in 1 hour"`, `"tomorrow at 9am"`, or `"Friday at 3pm ET"`.

<CodeGroup>
  ```ts Node.js {10}
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    html: '<p>it works!</p>',
    scheduledAt: 'in 1 min',
  });
  ```

  ```php PHP {8}
  $resend = Resend::client('re_123456789');

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'hello world',
    'html' => '<p>it works!</p>',
    'scheduled_at' => 'in 1 min'
  ]);
  ```

  ```python Python {10}
  import resend

  resend.api_key = "re_123456789"

  params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "scheduled_at": "in 1 min"
  }

  resend.Emails.send(params)
  ```

  ```rb Ruby {10}
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "scheduled_at": "in 1 min"
  }

  Resend::Emails.send(params)
  ```

  ```go Go {16}
  import (
  	"fmt"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    params := &resend.SendEmailRequest{
      From:        "Acme <onboarding@resend.dev>",
      To:          []string{"delivered@resend.dev"},
      Subject:     "hello world",
      Html:        "<p>it works!</p>",
      ScheduledAt: "in 1 min"
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust {14}
  use resend_rs::types::CreateEmailBaseOptions;
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "hello world";

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_html("<p>it works!</p>")
      .with_scheduled_at("in 1 min");

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java {12}
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          CreateEmailOptions params = CreateEmailOptions.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("hello world")
                  .html("<p>it works!</p>")
                  .scheduledAt("in 1 min")
                  .build();

          CreateEmailResponse data = resend.emails().send(params);
      }
  }
  ```

  ```bash cURL {9}
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "scheduled_at": "in 1 min"
  }'
  ```
</CodeGroup>

## 2. Schedule using date format

You can also use a date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (e.g: `2024-08-05T11:52:01.858Z`).

<CodeGroup>
  ```ts Node.js {5}
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  const oneMinuteFromNow = new Date(Date.now() + 1000 * 60).toISOString();

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    html: '<p>it works!</p>',
    scheduledAt: oneMinuteFromNow,
  });
  ```

  ```php PHP {3}
  $resend = Resend::client('re_123456789');

  $oneMinuteFromNow = (new DateTime())->modify('+1 minute')->format(DateTime::ISO8601);

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'hello world',
    'html' => '<p>it works!</p>',
    'scheduled_at' => $oneMinuteFromNow
  ]);
  ```

  ```python Python {6}
  import resend
  from datetime import datetime, timedelta

  resend.api_key = "re_123456789"

  one_minute_from_now = (datetime.now() + timedelta(minutes=1)).isoformat()

  params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "scheduled_at": one_minute_from_now
  }

  resend.Emails.send(params)
  ```

  ```rb Ruby {5}
  require "resend"

  Resend.api_key = "re_123456789"

  one_minute_from_now = (Time.now + 1 * 60).strftime("%Y-%m-%dT%H:%M:%S.%L%z")

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "scheduled_at": one_minute_from_now
  }

  Resend::Emails.send(params)
  ```

  ```go Go {12}
  import (
  	"fmt"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    oneMinuteFromNow := time.Now().Add(time.Minute * time.Duration(1))
    oneMinuteFromNowISO := oneMinuteFromNow.Format("2006-01-02T15:04:05-0700")

    params := &resend.SendEmailRequest{
      From:        "Acme <onboarding@resend.dev>",
      To:          []string{"delivered@resend.dev"},
      Subject:     "hello world",
      Html:        "<p>it works!</p>",
      ScheduledAt: oneMinuteFromNowISO
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust {12-15}
  use chrono::{Local, TimeDelta};
  use resend_rs::types::CreateEmailBaseOptions;
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "hello world";
    let one_minute_from_now = Local::now()
      .checked_add_signed(TimeDelta::minutes(1))
      .unwrap()
      .to_rfc3339();

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_html("<p>it works!</p>")
      .with_scheduled_at(&one_minute_from_now);

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java {7-10}
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          String oneMinuteFromNow = Instant
            .now()
            .plus(1, ChronoUnit.MINUTES)
            .toString();

          CreateEmailOptions params = CreateEmailOptions.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("hello world")
                  .html("<p>it works!</p>")
                  .scheduledAt(oneMinuteFromNow)
                  .build();

          CreateEmailResponse data = resend.emails().send(params);
      }
  }
  ```

  ```bash cURL {9}
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "scheduled_at": "2024-08-20T11:52:01.858Z"
  }'
  ```
</CodeGroup>

## View an scheduled email

Once you schedule an email, you can see the scheduled time in the Resend dashboard.

<video autoPlay muted loop playsInline className="w-full" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/schedule-email-api-1.mp4" />

## Reschedule an email

After scheduling an email, you might need to update the scheduled time.

You can do so with the following method:

<CodeGroup>
  ```ts Node.js {3}
  resend.emails.update({
    id: '49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
    scheduledAt: 'in 1 min',
  });
  ```

  ```php PHP {2}
  $resend->emails->update('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794', [
    'scheduled_at' => 'in 1 min'
  ]);
  ```

  ```python Python {3}
  update_params: resend.Emails.UpdateParams = {
    "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
    "scheduled_at": "in 1 min"
  }

  resend.Emails.update(params=update_params)
  ```

  ```rb Ruby {3}
  update_params = {
    "email_id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
    "scheduled_at": "in 1 min"
  }

  updated_email = Resend::Emails.update(update_params)
  ```

  ```go Go {3}
  updateParams := &resend.UpdateEmailRequest{
    Id:          "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
    ScheduledAt: "in 1 min",
  }

  updatedEmail, err := client.Emails.Update(updateParams)

  if err != nil {
    panic(err)
  }
  fmt.Printf("%v\n", updatedEmail)
  ```

  ```rust Rust {2}
  let update = UpdateEmailOptions::new()
    .with_scheduled_at("in 1 min");

  let _email = resend
    .emails
    .update("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", update)
    .await?;
  ```

  ```java Java {2}
  UpdateEmailOptions updateParams = UpdateEmailOptions.builder()
    .scheduledAt("in 1 min")
    .build();

  UpdateEmailResponse data = resend.emails().update("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", updateParams);
  ```

  ```bash cURL {5}
  curl -X PATCH 'https://api.resend.com/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "scheduled_at": "in 1 min"
  }'
  ```
</CodeGroup>

You can also reschedule an email directly in the Resend dashboard.

<video autoPlay muted loop playsInline className="w-full" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/schedule-email-api-2.mp4" />

## Cancel a scheduled email

<Warning>Once an email is canceled, it cannot be rescheduled.</Warning>

If you need to cancel a scheduled email, you can do so with the following code:

<CodeGroup>
  ```ts Node.js
  resend.emails.cancel('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794');
  ```

  ```php PHP
  $resend->emails->cancel('49a3999c-0ce1-4ea6-ab68-afcd6dc2e794');
  ```

  ```python Python
  resend.Emails.cancel(email_id="49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
  ```

  ```rb Ruby
  Resend::Emails.cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
  ```

  ```go Go
  canceled, err := client.Emails.Cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
  if err != nil {
    panic(err)
  }
  fmt.Println(canceled.Id)
  ```

  ```rust Rust
  let _canceled = resend
    .emails
    .cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794")
    .await?;
  ```

  ```java Java
  CancelEmailResponse canceled = resend
      .emails()
      .cancel("49a3999c-0ce1-4ea6-ab68-afcd6dc2e794");
  ```

  ```bash cURL
  curl -X POST 'https://api.resend.com/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794/cancel' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json'
  ```
</CodeGroup>

You can also cancel a scheduled email in the Resend dashboard.

<video autoPlay muted loop playsInline className="w-full" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/schedule-email-api-3.mp4" />

## Limitations

*   Batch emails cannot be scheduled
*   Emails sent via SMTP cannot be scheduled
*   Emails with attachments cannot be scheduled


# Send Test Emails

Simulate different events by sending test emails.

## How to send test emails

During development, it's common to test different scenarios by sending test emails.

Instead of using your personal email account or setting up a fake SMTP server, you can leverage the following email addresses to simulate each event type.

This gives you full use of Resend's Dashboard, Webhooks, and API - without affecting your domain reputation.

## Test delivered emails

To test that your emails are being successfully delivered, you can send an email to:

```
delivered@resend.dev
```

## Test bounced emails

To test that the recipient's email provider rejected your email, you can send an email to:

```
bounced@resend.dev
```

This will generate a SMTP 550 5.1.1 ("Unknown User") response code.

## Test "Marked as Spam" emails

To test that your emails are being received but marked as spam, you can send an email to:

```
complained@resend.dev
```


# Tags

Add unique identifiers to emails sent.

Tags are unique identifiers you can add to your emails. They help associate emails with your application. They are passed in key/value pairs. After the email is sent, the tag is included in the webhook event. Tags can include ASCII letters, numbers, underscores, or dashes.

Some examples of when to use a tag:

*   Associate the email a "customer ID" from your application
*   Add a label from your database like "free" or "enterprise"
*   Note the category of email sent, like "welcome" or "password reset"

Here's how you can add custom tags to your emails:

<CodeGroup>
  ```ts Node.js {10-15}
  import { Resend } from 'resend';

  const resend = new Resend('re_123456789');

  await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    html: '<p>it works!</p>',
    tags: [
      {
        name: 'category',
        value: 'confirm_email',
      },
    ],
  });
  ```

  ```php PHP {8-13}
  $resend = Resend::client('re_123456789');

  $resend->emails->send([
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['delivered@resend.dev'],
    'subject' => 'hello world',
    'html' => '<p>it works!</p>',
    'tags' => [
      [
        'name' => 'category',
        'value' => 'confirm_email',
      ],
    ]
  ]);
  ```

  ```python Python {10-12}
  import resend

  resend.api_key = "re_123456789"

  params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "tags": [
      {"name": "category", "value": "confirm_email"},
    ],
  }

  email = resend.Emails.send(params)
  print(email)
  ```

  ```rb Ruby {10-12}
  require "resend"

  Resend.api_key = "re_123456789"

  params = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "tags": [
      {"name": "category", "value": "confirm_email"}
    ]
  }

  sent = Resend::Emails.send(params)
  puts sent
  ```

  ```go Go {16}
  import (
  	"fmt"

  	"github.com/resend/resend-go/v2"
  )

  func main() {
    ctx := context.TODO()
    client := resend.NewClient("re_123456789")

    params := &resend.SendEmailRequest{
        From:        "Acme <onboarding@resend.dev>",
        To:          []string{"delivered@resend.dev"},
        Text:        "<p>it works!</p>",
        Subject:     "hello world",
        Tags:        []resend.Tag{{Name: "category", Value: "confirm_email"}},
    }

    sent, err := client.Emails.SendWithContext(ctx, params)

    if err != nil {
      panic(err)
    }
    fmt.Println(sent.Id)
  }
  ```

  ```rust Rust {14}
  use resend_rs::types::{CreateEmailBaseOptions, Tag};
  use resend_rs::{Resend, Result};

  #[tokio::main]
  async fn main() -> Result<()> {
    let resend = Resend::new("re_123456789");

    let from = "Acme <onboarding@resend.dev>";
    let to = ["delivered@resend.dev"];
    let subject = "hello world";

    let email = CreateEmailBaseOptions::new(from, to, subject)
      .with_html("<p>it works!</p>")
      .with_tag(Tag::new("category", "confirm_email"));

    let _email = resend.emails.send(email).await?;

    Ok(())
  }
  ```

  ```java Java {17}
  import com.resend.*;

  public class Main {
      public static void main(String[] args) {
          Resend resend = new Resend("re_123456789");

          Tag tag = Tag.builder()
                  .name("category")
                  .value("confirm_email")
                  .build();

          SendEmailRequest sendEmailRequest = SendEmailRequest.builder()
                  .from("Acme <onboarding@resend.dev>")
                  .to("delivered@resend.dev")
                  .subject("hello world")
                  .html("<p>it works!</p>")
                  .tags(tag)
                  .build();

          SendEmailResponse data = resend.emails().send(sendEmailRequest);
      }
  }
  ```

  ```bash cURL {9-14}
  curl -X POST 'https://api.resend.com/emails' \
       -H 'Authorization: Bearer re_123456789' \
       -H 'Content-Type: application/json' \
       -d $'{
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<p>it works!</p>",
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
  }'
  ```
</CodeGroup>


# Event types

List of supported event types and their payload.

### `email.sent`

Occurs whenever the **API request was successful**. Resend will attempt to deliver the message to the recipient's mail server.

<Accordion title="Sample Request Body">
  <Snippet file="email-sent-webhook.mdx" />
</Accordion>

### `email.delivered`

Occurs whenever Resend **successfully delivered the email** to the recipient's mail server.

<Accordion title="Sample Request Body">
  <Snippet file="email-delivered-webhook.mdx" />
</Accordion>

### `email.delivery_delayed`

Occurs whenever the **email couldn't be delivered due to a temporary issue**.

Delivery delays can occur, for example, when the recipient's inbox is full, or when the receiving email server experiences a transient issue.

<Accordion title="Sample Request Body">
  <Snippet file="email-delivery-delayed-webhook.mdx" />
</Accordion>

### `email.complained`

Occurs whenever the email was successfully **delivered, but the recipient marked it as spam**.

<Accordion title="Sample Request Body">
  <Snippet file="email-complained-webhook.mdx" />
</Accordion>

### `email.bounced`

Occurs whenever the recipient's mail server **permanently rejected the email**.

<Accordion title="Sample Request Body">
  <Snippet file="email-bounced-webhook.mdx" />
</Accordion>

### `email.opened`

Occurs whenever the **recipient opened the email**.

<Accordion title="Sample Request Body">
  <Snippet file="email-opened-webhook.mdx" />
</Accordion>

### `email.clicked`

Occurs whenever the **recipient clicks on an email link**.

<Accordion title="Sample Request Body">
  <Snippet file="email-clicked-webhook.mdx" />
</Accordion>

### `contact.created`

Occurs whenever a **contact was successfully created**.

*Note: When importing multiple contacts using CSV, these events won't be triggered. [Contact support](https://resend.com/contact) if you have any questions.*

<Accordion title="Sample Request Body">
  <Snippet file="contact-created-webhook.mdx" />
</Accordion>

### `contact.updated`

Occurs whenever a **contact was successfully updated**.

<Accordion title="Sample Request Body">
  <Snippet file="contact-updated-webhook.mdx" />
</Accordion>

### `contact.deleted`

Occurs whenever a **contact was successfully deleted**.

<Accordion title="Sample Request Body">
  <Snippet file="contact-deleted-webhook.mdx" />
</Accordion>

### `domain.created`

Occurs when a **domain was successfully created**.

<Accordion title="Sample Request Body">
  <Snippet file="domain-created-webhook.mdx" />
</Accordion>

### `domain.updated`

Occurs when a **domain was successfully updated**.

<Accordion title="Sample Request Body">
  <Snippet file="domain-updated-webhook.mdx" />
</Accordion>

### `domain.deleted`

Occurs when a **domain was successfully deleted**.

<Accordion title="Sample Request Body">
  <Snippet file="domain-deleted-webhook.mdx" />
</Accordion>


# Introduction

Use webhooks to notify your application about email events.

## What is a webhook?

Resend uses webhooks to push real-time notifications to you about your email sending. All webhooks use HTTPS and deliver a JSON payload that can be used by your application. You can use webhook feeds to do things like:

*   Automatically remove bounced email addresses from mailing lists
*   Create alerts in your messaging or incident tools based on event types
*   Store all send events in your own database for custom reporting/retention

## Steps to receive webhooks

You can start receiving real-time events in your app using the steps:

1.  Create a local endpoint to receive requests
2.  Register your development webhook endpoint
3.  Test that your webhook endpoint is working properly
4.  Deploy your webhook endpoint to production
5.  Register your production webhook endpoint

## 1. Create a local endpoint to receive requests

In your local application, create a new route that can accept POST requests.

For example, you can add an API route on Next.js:

```js pages/api/webhooks.ts
import type { NextApiRequest, NextApiResponse } from 'next';

export default (req: NextApiRequest, res: NextApiResponse) => {
  if (req.method === 'POST') {
    const payload = req.body;
    console.log(payload);
    res.status(200);
  }
};
```

On receiving an event, you should respond with an `HTTP 200 OK` to signal to Resend that the event was successfully delivered.

## 2. Register your development webhook endpoint

Register your publicly accessible HTTPS URL in the Resend dashboard.

<Tip>
  You can create a tunnel to your localhost server using a tool like
  [ngrok](https://ngrok.com/download). For example:
  `https://8733-191-204-177-89.sa.ngrok.io/api/webhooks`
</Tip>

<img alt="Add Webhook" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-webhooks-add.png" />

## 3. Test that your webhook endpoint is working properly

Send a few test emails to check that your webhook endpoint is receiving the events.

<img alt="Webhook Events List" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/dashboard-webhook-events-list.png" />

## 4. Deploy your webhook endpoint

After you're done testing, deploy your webhook endpoint to production.

## 5. Register your production webhook endpoint

Once your webhook endpoint is deployed to production, you can register it in the Resend dashboard.

## FAQ

<AccordionGroup>
  <Accordion title="What is the retry schedule?">
    If Resend does not receive a 200 response from a webhook server, we will retry the webhooks.

    Each message is attempted based on the following schedule, where each period is started following the failure of the preceding attempt:

    *   5 seconds
    *   5 minutes
    *   30 minutes
    *   2 hours
    *   5 hours
    *   10 hours
  </Accordion>

  <Accordion title="What happens after all the retries fail?">
    After the conclusion of the above attempts the message will be marked as failed, and you will get a webhook of type `message.attempt.exhausted` notifying you of this error.
  </Accordion>
</AccordionGroup>

## Try it yourself

<Card title="Webhook Code Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-webhooks">
  See an example of how to receive webhooks events for Resend emails.
</Card>


# Verify Webhooks Requests

Learn how to use the signing secret to verify your webhooks.

Webhook signing secrets are used to validate the payload data sent to your application from Resend. You can find the signing secret in the webhook detail page.

<img alt="Signing Secret" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/webhooks-secret-1.png" />

To verify the webhook request, you have to use the secret and deconstruct the Svix headers, and Base64-decode the Resend secret. The example below is for Javascript. [Learn more and view all supported languages here.](https://docs.svix.com/receiving/verifying-payloads/how)

First, install the Svix libaries.

<CodeGroup>
  ```sh npm
  npm install svix
  ```

  ```sh yarn
  yarn add svix
  ```
</CodeGroup>

Then, verify the webhooks using the code below. The payload is the raw (string) body of the request, and the headers are the headers passed in the request.

<Tip>
  Make sure that you're using the raw request body when verifying webhooks,
  since the crypotgraphic signature is sensitive to even the slightest change.
  Watch out for frameworks that parse the request as JSON and then stringify it,
  since this too will break the signature verification.
</Tip>

```js
import { Webhook } from 'svix';

const secret = process.env.WEBHOOK_SECRET;

// These were all sent from the server
const headers = {
  'svix-id': 'msg_p5jXN8AQM9LWM0D4loKWxJek',
  'svix-timestamp': '1614265330',
  'svix-signature': 'v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE=',
};
const payload = '{"test": 2432232314}';

const wh = new Webhook(secret);
// Throws on error, returns the verified content on success
const payload = wh.verify(payload, headers);
```

If you prefer, you can also [manually verify the headers as well.](https://docs.svix.com/receiving/verifying-payloads/how-manual)

## Why should I verify webhooks?

Webhooks are vulnerable because attackers can send fake HTTP POST requests to endpoints, pretending to be legitimate services. This can lead to security risks or operational issues.

To mitigate this, each webhook and its metadata are signed with a unique key specific to the endpoint. This signature helps verify the source of the webhook, allowing only authenticated webhooks to be processed.

Another security concern is replay attacks, where intercepted valid payloads, complete with their signatures, are resent to endpoints. These payloads would pass the signature verification and be executed, posing a potential security threat.


# Examples

Explore sample apps for different use cases.

<CardGroup>
  <Card title="Attachments" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-attachments">
    Send emails with attachments
  </Card>

  <Card title="NextAuth" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-nextauth">
    Send emails with NextAuth
  </Card>

  <Card title="React Email" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-react-email">
    Send emails with React Email
  </Card>

  <Card title="Webhooks" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-webhooks">
    A Slack app using Resend webhooks
  </Card>

  <Card title="Prevent thread on Gmail" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-prevent-thread-on-gmail">
    Prevent threading on Gmail
  </Card>

  <Card title="Unsubscribe url header" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-examples/tree/main/with-unsubscribe-url-header">
    Add a shortcut for users to unsubscribe
  </Card>
</CardGroup>


# Integrations

Integrate Resend with the tools you already use.

## No-code

<CardGroup>
  <Card
    title="Zapier"
    href="https://zapier.com/apps/resend/integrations"
    icon={
     <svg className="h-6 w-6" width="68" height="68" viewBox="0 0 256 256">
       <g>
         <path
           d="M128.080089,-0.000183105 C135.311053,0.0131003068 142.422517,0.624138494 149.335663,1.77979593 L149.335663,1.77979593 L149.335663,76.2997796 L202.166953,23.6044907 C208.002065,27.7488446 213.460883,32.3582023 218.507811,37.3926715 C223.557281,42.4271407 228.192318,47.8867213 232.346817,53.7047992 L232.346817,53.7047992 L179.512985,106.400063 L254.227854,106.400063 C255.387249,113.29414 256,120.36111 256,127.587243 L256,127.587243 L256,127.759881 C256,134.986013 255.387249,142.066204 254.227854,148.960282 L254.227854,148.960282 L179.500273,148.960282 L232.346817,201.642324 C228.192318,207.460402 223.557281,212.919983 218.523066,217.954452 L218.523066,217.954452 L218.507811,217.954452 C213.460883,222.988921 208.002065,227.6115 202.182208,231.742607 L202.182208,231.742607 L149.335663,179.04709 L149.335663,253.5672 C142.435229,254.723036 135.323765,255.333244 128.092802,255.348499 L128.092802,255.348499 L127.907197,255.348499 C120.673691,255.333244 113.590195,254.723036 106.677048,253.5672 L106.677048,253.5672 L106.677048,179.04709 L53.8457596,231.742607 C42.1780766,223.466917 31.977435,213.278734 23.6658953,201.642324 L23.6658953,201.642324 L76.4997269,148.960282 L1.78485803,148.960282 C0.612750404,142.052729 0,134.946095 0,127.719963 L0,127.719963 L0,127.349037 C0.0121454869,125.473817 0.134939797,123.182933 0.311311815,120.812834 L0.36577283,120.099764 C0.887996182,113.428547 1.78485803,106.400063 1.78485803,106.400063 L1.78485803,106.400063 L76.4997269,106.400063 L23.6658953,53.7047992 C27.8076812,47.8867213 32.4300059,42.4403618 37.4769335,37.4193681 L37.4769335,37.4193681 L37.5023588,37.3926715 C42.5391163,32.3582023 48.0106469,27.7488446 53.8457596,23.6044907 L53.8457596,23.6044907 L106.677048,76.2997796 L106.677048,1.77979593 C113.590195,0.624138494 120.688946,0.0131003068 127.932622,-0.000183105 L127.932622,-0.000183105 L128.080089,-0.000183105 Z M128.067377,95.7600714 L127.945335,95.7600714 C118.436262,95.7600714 109.32891,97.5001809 100.910584,100.661566 C97.7553011,109.043534 96.0085811,118.129275 95.9958684,127.613685 L95.9958684,127.733184 C96.0085811,137.217594 97.7553011,146.303589 100.923296,154.685303 C109.32891,157.846943 118.436262,159.587052 127.945335,159.587052 L128.067377,159.587052 C137.576449,159.587052 146.683802,157.846943 155.089415,154.685303 C158.257411,146.290368 160.004131,137.217594 160.004131,127.733184 L160.004131,127.613685 C160.004131,118.129275 158.257411,109.043534 155.089415,100.661566 C146.683802,97.5001809 137.576449,95.7600714 128.067377,95.7600714 Z"
           fill="currentColor"
           fillRule="currentColor"
         ></path>
       </g>
     </svg>
    }
  >
    Automate emails using Zapier
  </Card>

  <Card
    title="Pipedream"
    href="https://pipedream.com/apps/resend"
    icon={
     <svg
       className="h-6 w-6"
       width="78"
       height="78"
       viewBox="0 0 78 78"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M47.7519 30.1241C48.0541 31.7495 48.2068 33.8016 48.2068 36.2869C48.2068 39.0588 48.0096 41.316 47.6119 43.0587C47.2142 44.8013 46.667 46.1661 45.9671 47.1433C45.2672 48.1237 44.4273 48.7914 43.4475 49.1497C42.3892 49.5211 41.2764 49.7029 40.1579 49.6872C38.4304 49.6872 36.9861 49.3289 35.8185 48.6123C34.6509 47.8957 33.741 47.013 33.0888 45.9609V27.3294C33.881 26.2317 34.8959 25.3685 36.1334 24.7497C37.4558 24.1088 38.9051 23.7899 40.3679 23.8181C41.5671 23.7939 42.7618 23.9756 43.9024 24.3555C44.9024 24.7112 45.7623 25.3903 46.3521 26.2903C46.982 27.2219 47.4497 28.4988 47.7519 30.1241Z"
         fill="currentColor"
       />
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M1.61933 8.11214C0 11.2903 0 15.4506 0 23.7714V54.2286C0 62.5493 0 66.7097 1.61933 69.8879C3.04374 72.6834 5.31659 74.9563 8.11214 76.3807C11.2903 78 15.4506 78 23.7714 78H54.2286C62.5493 78 66.7097 78 69.8879 76.3807C72.6834 74.9563 74.9563 72.6834 76.3807 69.8879C78 66.7097 78 62.5493 78 54.2286V23.7714C78 15.4506 78 11.2903 76.3807 8.11214C74.9563 5.31659 72.6834 3.04374 69.8879 1.61933C66.7097 0 62.5493 0 54.2286 0H23.7714C15.4506 0 11.2903 0 8.11214 1.61933C5.31659 3.04374 3.04374 5.31659 1.61933 8.11214ZM58.2855 46.3192C59.0776 43.5017 59.4753 40.1793 59.4753 36.3585C59.4753 32.2023 59.1254 28.6909 58.4255 25.8246C57.7256 22.9582 56.6884 20.652 55.3109 18.9094C53.9333 17.1635 52.2408 15.8997 50.2366 15.1115C48.2291 14.3232 45.9194 13.9291 43.3075 13.9291C41.1569 13.9128 39.0217 14.3014 37.0083 15.0756C35.0995 15.8082 33.3425 16.9021 31.829 18.3003L29.7293 14.5024L22.1003 15.004V69.1786H33.0888V61.2244L32.9489 55.4199L33.1588 55.3483C34.5109 56.7326 36.0189 57.6642 37.6732 58.143C39.4174 58.6327 41.2191 58.8738 43.0275 58.8596C45.4995 58.8596 47.7519 58.4068 49.7816 57.4981C51.8113 56.5893 53.5388 55.205 54.9609 53.3418C56.383 51.4787 57.4901 49.1367 58.2855 46.3192Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Build workflows using Pipedream
  </Card>

  <Card
    title="Activepieces"
    href="https://www.activepieces.com/pieces/resend"
    icon={
     <svg
       className="h-6 w-6"
       width="56"
       height="50"
       viewBox="0 0 56 50"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M17.3113 15.3098C14.2791 10.8144 15.4653 4.7122 19.9607 1.68001C24.456 -1.35215 30.5583 -0.165992 33.5904 4.3294L54.0697 34.6911C57.1018 39.1864 55.9157 45.2887 51.4203 48.3209C46.9249 51.353 40.8227 50.1669 37.7905 45.6715L28.9117 32.5081C27.7703 31.0698 25.4468 31.2937 24.0517 32.6888C22.8948 33.8457 22.516 36.8053 22.1881 39.3679C22.14 39.7436 22.093 40.1108 22.0448 40.4625C21.8669 42.1398 21.2877 43.7992 20.2789 45.2948C16.9823 50.1823 10.346 51.4707 5.4586 48.1741C0.571158 44.8775 -0.720183 38.2418 2.57644 33.3544C4.28615 30.8197 6.89414 29.2529 9.69057 28.7918L9.68663 28.7878C17.7665 27.6159 19.2645 18.4973 17.7858 16.0133L17.3113 15.3098Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Build workflows using Activepieces
  </Card>

  <Card
    title="Swishjam"
    href="https://swishjam.com/integrations/resend"
    icon={
     <svg className="h-6 w-6" fill="none" viewBox="0 0 51 57">
       <path
         d="M15.2077 22.8737L2.08203 30.4137V15.3789L15.2077 22.8737Z"
         stroke="currentColor"
         strokeWidth="3"
         strokeLinecap="round"
         strokeLinejoin="round"
       />
       <path
         d="M25.5029 43.7917L25.4286 55.4013L2 42.0282L12.1886 36.1895L25.5029 43.7917Z"
         stroke="currentColor"
         strokeWidth="3"
         strokeLinecap="round"
         strokeLinejoin="round"
       />
       <path
         d="M48.999 30.4141V42.0293L25.4219 55.408L25.5019 43.7928L48.999 30.4141Z"
         stroke="currentColor"
         strokeWidth="3"
         strokeLinecap="round"
         strokeLinejoin="round"
       />
       <path
         d="M49.002 30.4128L38.6877 36.2854L25.5049 43.7915L12.1906 36.1893L2.08203 30.4128L15.2077 22.8728V22.8672L25.5049 28.5L35.6992 22.8898L35.7335 22.9124L49.002 30.4128Z"
         stroke="currentColor"
         strokeWidth="3"
         strokeLinecap="round"
         strokeLinejoin="round"
       />
       <path
         d="M48.7735 15.3787L25.5049 28.7517L2.08203 15.3787L25.3506 2L48.7735 15.3787Z"
         stroke="currentColor"
         strokeWidth="3"
         strokeLinecap="round"
         strokeLinejoin="round"
       />
     </svg>
    }
  >
    Send automated emails using Swishjam
  </Card>
</CardGroup>

## Notifications

<CardGroup>
  <Card
    title="Courier"
    href="https://www.courier.com/docs/guides/providers/email/resend/"
    icon={
     <svg
       className="h-6 w-6"
       width="68"
       height="68"
       viewBox="0 0 68 68"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M63.5245 30.6744C63.6695 30.4568 63.7421 30.1668 63.7421 29.9492C61.1315 14.8658 47.9335 3.40823 32.125 3.40823C14.3585 3.40823 -0.0722441 17.9115 0.00027211 35.7505C0.145305 53.0819 14.7211 67.5851 31.9799 67.5851C46.7007 67.6576 59.101 57.7954 62.9444 44.3799C63.0894 43.9448 62.7993 43.4372 62.3642 43.2197L61.059 42.712C55.9103 40.8991 50.1815 41.5518 45.613 44.525C43.51 45.9028 41.9872 46.9905 41.9872 46.9905C39.3766 48.7309 36.1859 49.8186 32.8501 49.8186C23.7856 49.8186 17.4767 42.422 16.4615 33.43L15.7363 28.4989C15.5188 26.976 14.5035 25.7432 13.0532 25.1631L11.2403 24.4379C10.9502 24.2929 10.8052 23.9303 11.0228 23.6403C18.782 13.2705 28.2816 15.5185 28.2816 15.5185C29.9495 15.6635 31.3998 16.3161 32.5601 17.1138C34.2279 18.2741 35.5332 19.942 36.3309 21.8274C39.2316 28.4989 45.9031 33.2124 53.6623 33.2124C53.6623 33.2124 61.059 33.5025 63.5245 30.6744Z"
         fill="currentColor"
       />
       <path
         d="M19.7247 22.9151C20.766 22.9151 21.6101 22.071 21.6101 21.0297C21.6101 19.9884 20.766 19.1443 19.7247 19.1443C18.6834 19.1443 17.8393 19.9884 17.8393 21.0297C17.8393 22.071 18.6834 22.9151 19.7247 22.9151Z"
         fill="currentColor"
       />
       <path
         d="M20.0873 32.7048C20.5224 35.6054 22.8429 44.8875 33.1402 46.5554C33.2852 46.5554 33.3578 46.3379 33.2127 46.2653C30.8197 45.1776 24.5833 41.5518 20.3773 32.5598C20.3048 32.4872 20.0873 32.5598 20.0873 32.7048Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Trigger messages using Courier
  </Card>

  <Card
    title="Novu"
    href="https://docs.novu.co/channels-and-providers/email/resend"
    icon={
     <svg
       viewBox="0 0 102 32"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
       className="h-6"
     >
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M24.64 12.826c0 .86-1.044 1.286-1.646.671L10.676.907A15.974 15.974 0 0 1 16 0c3.183 0 6.148.93 8.64 2.531v10.295Zm4.48-5.986v5.986c0 4.875-5.919 7.289-9.328 3.804L6.545 3.091C2.576 6.003 0 10.701 0 16c0 3.407 1.065 6.565 2.88 9.16v-5.954c0-4.875 5.919-7.289 9.328-3.804l13.229 13.52C29.416 26.012 32 21.308 32 16c0-3.407-1.065-6.565-2.88-9.16ZM9.006 18.535 21.301 31.1C19.642 31.683 17.858 32 16 32c-3.182 0-6.148-.93-8.64-2.531V19.206c0-.86 1.045-1.286 1.646-.671Z"
         fill="currentColor"
       ></path>
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M24.64 12.826c0 .86-1.044 1.286-1.646.671L10.676.907A15.974 15.974 0 0 1 16 0c3.183 0 6.148.93 8.64 2.531v10.295Zm4.48-5.986v5.986c0 4.875-5.919 7.289-9.328 3.804L6.545 3.091C2.576 6.003 0 10.701 0 16c0 3.407 1.065 6.565 2.88 9.16v-5.954c0-4.875 5.919-7.289 9.328-3.804l13.229 13.52C29.416 26.012 32 21.308 32 16c0-3.407-1.065-6.565-2.88-9.16ZM9.006 18.535 21.301 31.1C19.642 31.683 17.858 32 16 32c-3.182 0-6.148-.93-8.64-2.531V19.206c0-.86 1.045-1.286 1.646-.671Z"
         fill="currentColor"
       ></path>
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M24.64 12.826c0 .86-1.044 1.286-1.646.671L10.676.907A15.974 15.974 0 0 1 16 0c3.183 0 6.148.93 8.64 2.531v10.295Zm4.48-5.986v5.986c0 4.875-5.919 7.289-9.328 3.804L6.545 3.091C2.576 6.003 0 10.701 0 16c0 3.407 1.065 6.565 2.88 9.16v-5.954c0-4.875 5.919-7.289 9.328-3.804l13.229 13.52C29.416 26.012 32 21.308 32 16c0-3.407-1.065-6.565-2.88-9.16ZM9.006 18.535 21.301 31.1C19.642 31.683 17.858 32 16 32c-3.182 0-6.148-.93-8.64-2.531V19.206c0-.86 1.045-1.286 1.646-.671Z"
         fill="currentColor"
       ></path>
     </svg>
    }
  >
    Send notifications using Novu
  </Card>

  <Card
    title="Knock"
    href="https://docs.knock.app/integrations/email/resend"
    icon={
     <svg
       className="h-6 w-6"
       width="14"
       height="20"
       viewBox="0 0 14 20"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M0 20V0.075058H4.19706V11.5013H4.31447L8.92243 5.90189H13.6184L8.51153 11.7003L14 20H9.33333L6.04612 14.5142L4.19706 16.5323V20H0Z"
         fill="currentColor"
       />
       <path
         d="M13.6748 2.45476C13.6748 3.81049 12.5399 4.90953 11.14 4.90953C9.74009 4.90953 8.60522 3.81049 8.60522 2.45476C8.60522 1.09904 9.74009 0 11.14 0C12.5399 0 13.6748 1.09904 13.6748 2.45476Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send notifications using Knock
  </Card>

  <Card
    title="Engagespot"
    href="https://docs.engagespot.co/docs/features/channels/email/resend/"
    icon={
     <svg className="h-6 w-6" fill="none" viewBox="0 0 38 35">
       <g clipPath="url(#clip0_1_2)">
         <mask
           id="mask0_1_2"
           style={{ maskType: 'alpha' }}
           maskUnits="userSpaceOnUse"
           x="0"
           y="0"
           width="38"
           height="35"
         >
           <path d="M38 0H0V35H38V0Z" fill="currentColor" />
         </mask>
         <g mask="url(#mask0_1_2)">
           <mask
             id="mask1_1_2"
             style={{ maskType: 'alpha' }}
             maskUnits="userSpaceOnUse"
             x="0"
             y="0"
             width="39"
             height="35"
           >
             <path
               d="M36.9851 6.29843L28.4354 0.606125C27.3381 -0.131766 25.9208 -0.131766 24.8235 0.606125L19.2456 4.29559L19.1541 4.24287H19.1084L13.5762 0.553417C12.4789 -0.184472 11.0616 -0.184472 9.96426 0.553417L1.4145 6.24571C0.68297 6.72008 0.271484 7.61608 0.271484 8.56481V19.3696C0.271484 21.2144 1.14018 22.901 2.51179 23.797L19.1541 34.8127L35.8423 23.797C37.2137 22.901 38.0826 21.1616 38.0826 19.3169V8.56481C38.1283 7.61608 37.7168 6.77278 36.9851 6.29843Z"
               fill="currentColor"
             />
           </mask>
           <g mask="url(#mask1_1_2)">
             <path
               d="M12.7274 34.8008L-1.21742 26.2624L-1.62891 7.9206L11.8587 -1.88281L25.8035 6.65565L26.215 24.9975L12.7274 34.8008Z"
               fill="currentColor"
             />
             <path
               d="M27.5262 35.5996L13.6271 27.114L13.1699 8.77214L26.7033 -1.03125L40.6481 7.50719L41.0596 25.7963L27.5262 35.5996Z"
               fill="#B22977"
             />
             <path
               d="M19.9286 40.9787L6.02947 32.493L5.57228 14.151L19.1056 4.34766L29.5877 11.8891V31.0365L19.9286 40.9787Z"
               fill="currentColor"
             />
             <path
               opacity="0.36"
               d="M40.5925 21.2415L18.3265 37.2642L17.915 18.9751L41.0904 4.96094L40.5925 21.2415Z"
               fill="currentColor"
             />
             <path
               d="M-3.61505 22.8555L19.291 36.77L18.8795 18.4809L-4.07227 4.56641L-3.61505 22.8555Z"
               fill="currentColor"
             />
           </g>
           <mask
             id="mask2_1_2"
             style={{ maskType: 'alpha' }}
             maskUnits="userSpaceOnUse"
             x="0"
             y="0"
             width="39"
             height="35"
           >
             <path
               d="M36.9851 6.29843L28.4354 0.606125C27.3381 -0.131766 25.9208 -0.131766 24.8235 0.606125L19.2456 4.29559L19.1541 4.24287H19.1084L13.5762 0.553417C12.4789 -0.184472 11.0616 -0.184472 9.96426 0.553417L1.4145 6.24571C0.68297 6.72008 0.271484 7.61608 0.271484 8.56481V19.3696C0.271484 21.2144 1.14018 22.901 2.51179 23.797L19.1541 34.8127L35.8423 23.797C37.2137 22.901 38.0826 21.1616 38.0826 19.3169V8.56481C38.1283 7.61608 37.7168 6.77278 36.9851 6.29843Z"
               fill="currentColor"
             />
           </mask>
           <g mask="url(#mask2_1_2)">
             <path
               d="M12.7274 34.8008L-1.21742 26.2624L-1.62891 7.9206L11.8587 -1.88281L25.8035 6.65565L26.215 24.9975L12.7274 34.8008Z"
               fill="currentColor"
             />
             <path
               d="M27.5262 35.5996L13.6271 27.114L13.1699 8.77214L26.7033 -1.03125L40.6481 7.50719L41.0596 25.7963L27.5262 35.5996Z"
               fill="currentColor"
             />
             <path
               d="M19.9286 40.9787L6.02947 32.493L5.57228 14.151L19.1056 4.34766L29.5877 11.8891V31.0365L19.9286 40.9787Z"
               fill="currentColor"
             />
             <path
               d="M40.5925 21.2415L18.3265 37.2642L17.915 18.9751L41.0904 4.96094L40.5925 21.2415Z"
               fill="currentColor"
             />
             <path
               d="M-3.61505 22.8555L19.291 36.77L18.8795 18.4809L-4.07227 4.56641L-3.61505 22.8555Z"
               fill="currentColor"
             />
           </g>
         </g>
       </g>
       <defs>
         <clipPath id="clip0_1_2">
           <rect width="38" height="35" fill="currentColor" />
         </clipPath>
       </defs>
     </svg>
    }
  >
    Send notifications using Engagespot
  </Card>

  <Card
    title="Dittofeed"
    href="https://docs.dittofeed.com/integrations/channels/resend"
    icon={
     <svg className="h-6 w-6" viewBox="0 0 40 38" fill="none">
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M25.5907 33.1617C27.229 27.0472 24.4917 21.0012 19.4767 19.6575C14.4617 18.3138 9.06812 22.1811 7.42981 28.2953C5.93843 33.8613 9.318 34.724 13.7192 35.8477C14.1529 35.9585 14.5965 36.0716 15.0463 36.1922C15.4961 36.3127 15.9369 36.4365 16.3678 36.5574C20.7411 37.785 24.0994 38.7274 25.5907 33.1617ZM21.5024 30.5195C22.3244 27.4521 20.9385 24.4156 18.4071 23.7373C15.8756 23.059 13.1571 24.9957 12.3352 28.0633C11.5627 30.946 13.3777 31.4228 15.7003 32.0329C15.8491 32.0718 15.9999 32.1114 16.1522 32.1522C16.3046 32.1931 16.455 32.2342 16.6034 32.2748C18.9198 32.9078 20.73 33.4025 21.5024 30.5195ZM13.8755 4.33377C12.2371 10.4481 14.9745 16.494 19.9895 17.8378C25.0046 19.1816 30.3982 15.3143 32.0365 9.19999C33.5278 3.63409 30.1482 2.77127 25.7471 1.64761C25.3133 1.53691 24.8699 1.42365 24.42 1.30314C23.9702 1.1826 23.5293 1.05888 23.0985 0.937938C18.7251 -0.289572 15.3669 -1.23214 13.8755 4.33377ZM17.9636 6.97574C17.1416 10.0433 18.5275 13.0798 21.059 13.7582C23.5905 14.4365 26.309 12.4996 27.1308 9.4321C27.9032 6.54919 26.0883 6.07253 23.7657 5.46254C23.617 5.42348 23.4662 5.38387 23.3137 5.34303C23.1614 5.30222 23.011 5.26111 22.8626 5.22057C20.5462 4.58752 18.7361 4.09283 17.9636 6.97574ZM2.51398 23.1191C6.37268 24.1531 10.5065 21.2378 11.7471 16.6078C12.9878 11.9777 10.8654 7.38613 7.00667 6.35219C3.49407 5.41099 2.68583 8.52804 1.63326 12.5874C1.52956 12.9874 1.42348 13.3965 1.31219 13.8118C1.20091 14.227 1.08823 14.6344 0.97806 15.0326C-0.140057 19.0744 -0.998623 22.1779 2.51398 23.1191ZM4.85546 18.5831C6.47756 19.0177 8.22079 17.7718 8.74908 15.8001C9.27738 13.8285 8.39069 11.8778 6.76859 11.4432C5.24412 11.0347 4.87063 12.4477 4.39264 14.2559C4.36203 14.3717 4.33099 14.4891 4.2992 14.6078C4.26742 14.7265 4.23559 14.8437 4.20419 14.9592C3.71403 16.7642 3.33099 18.1746 4.85546 18.5831ZM36.9296 14.3759C33.0707 13.3419 28.937 16.2572 27.6964 20.8872C26.4558 25.5174 28.5781 30.1088 32.4367 31.1428C35.9494 32.084 36.7576 28.967 37.8102 24.9078C37.9139 24.5078 38.02 24.0986 38.1313 23.6834C38.2425 23.268 38.3552 22.8607 38.4654 22.4624C39.5835 18.4206 40.4421 15.3171 36.9296 14.3759ZM34.5879 18.912C32.9659 18.4773 31.2226 19.7233 30.6945 21.6949C30.1661 23.6665 31.0528 25.6173 32.6748 26.0519C34.1993 26.4603 34.5728 25.0474 35.0508 23.2391C35.0814 23.1234 35.1124 23.0059 35.1443 22.8872C35.176 22.7685 35.2078 22.6515 35.2393 22.5358C35.7293 20.7309 36.1124 19.3204 34.5879 18.912Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send automated emails using Dittofeed
  </Card>
</CardGroup>

## Developer tools

<CardGroup>
  <Card
    title="Inngest"
    href="https://www.inngest.com/docs/guides/resend-webhook-events"
    icon={
     <svg className="h-6 w-6" fill="none" viewBox="0 0 270 270">
       <mask
         id="mask0_680_113"
         style={{ maskType: 'alpha' }}
         maskUnits="userSpaceOnUse"
         x="21"
         y="2"
         width="228"
         height="265"
       >
         <path
           fillRule="evenodd"
           clipRule="evenodd"
           d="M145.841 5.0459L238.431 60.6531C244.777 64.506 248.73 71.3788 248.626 78.8764V189.987C248.626 197.484 244.777 204.357 238.327 208.21L145.737 263.817C141.783 266.421 133.669 269.44 123.89 263.817L31.2994 208.21C24.9533 204.357 21 197.484 21 189.987V78.8764C21 71.3788 24.8492 64.506 31.2994 60.6531L123.994 5.0459C130.756 0.9847 139.078 0.9847 145.841 5.0459ZM77.9258 134.5C67.446 134.5 58.9504 142.996 58.9504 153.475C58.9504 163.955 67.446 172.451 77.9258 172.451C82.9583 172.451 87.7848 170.452 91.3433 166.893C94.9019 163.334 96.9011 158.508 96.9011 153.475C96.9011 142.996 88.4055 134.5 77.9258 134.5ZM134.852 115.525C124.372 115.525 115.876 124.02 115.876 134.5C115.876 144.98 124.372 153.475 134.852 153.475C139.884 153.475 144.711 151.476 148.269 147.918C151.828 144.359 153.827 139.533 153.827 134.5C153.827 124.02 145.331 115.525 134.852 115.525ZM191.778 96.5494C181.298 96.5494 172.802 105.045 172.802 115.525C172.802 126.005 181.298 134.5 191.778 134.5C196.81 134.5 201.637 132.501 205.195 128.942C208.754 125.384 210.753 120.557 210.753 115.525C210.753 105.045 202.257 96.5494 191.778 96.5494Z"
           fill="currentColor"
         />
       </mask>
       <g mask="url(#mask0_680_113)">
         <rect x="21" y="2" width="227.704" height="265" fill="currentColor" />
       </g>
     </svg>
    }
  >
    Send drip campaigns using Inngest
  </Card>

  <Card
    title="Upstash"
    href="https://upstash.com/docs/qstash/integrations/resend"
    icon={
     <svg
       className="h-6 w-6"
       width="354"
       height="472"
       viewBox="0 0 354 472"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M0.421875 412.975C78.5269 491.079 205.16 491.079 283.265 412.975C361.369 334.87 361.369 208.237 283.265 130.132L247.909 165.487C306.488 224.066 306.488 319.041 247.909 377.619C189.331 436.198 94.3559 436.198 35.7769 377.619L0.421875 412.975Z"
         fill="currentColor"
       />
       <path
         d="M71.1328 342.264C110.185 381.316 173.501 381.316 212.554 342.264C251.606 303.212 251.606 239.895 212.554 200.843L177.199 236.198C196.725 255.724 196.725 287.382 177.199 306.909C157.672 326.435 126.014 326.435 106.488 306.909L71.1328 342.264Z"
         fill="currentColor"
       />
       <path
         d="M353.974 59.4209C275.869 -18.6836 149.236 -18.6836 71.1315 59.4209C-6.97352 137.526 -6.97352 264.159 71.1315 342.264L106.486 306.909C47.9085 248.33 47.9085 153.355 106.486 94.7769C165.065 36.1979 260.04 36.1979 318.618 94.7769L353.974 59.4209Z"
         fill="currentColor"
       />
       <path
         d="M283.264 130.132C244.212 91.08 180.894 91.08 141.842 130.132C102.789 169.185 102.789 232.501 141.842 271.553L177.197 236.198C157.671 216.672 157.671 185.014 177.197 165.487C196.723 145.961 228.381 145.961 247.908 165.487L283.264 130.132Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send emails using Upstash
  </Card>

  <Card
    title="Trigger.dev"
    href="https://trigger.dev/docs/guides/examples/resend-email-sequence"
    icon={
     <svg
       className="h-6 w-6"
       width="199"
       height="174"
       viewBox="0 0 199 174"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M59.3512 70.3883L99.5 0.849602L199 173.191H0L40.1488 103.65L68.5493 120.048L56.8032 140.394H142.197L99.5 66.4424L87.7539 86.7881L59.3512 70.3883Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send drip campaigns using Trigger.dev
  </Card>

  <Card
    title="Infisical"
    href="https://infisical.com/docs/self-hosting/configuration/email"
    icon={
     <svg
       className="h-6 w-6"
       width="91"
       height="43"
       viewBox="0 0 91 43"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M21.9734 0C24.8526 0 27.4793 0.412021 29.8535 1.23606C32.2528 2.06011 34.4123 3.13386 36.3318 4.45732C38.2766 5.75581 39.9814 7.10424 41.4463 8.50261C42.2545 9.25174 42.987 9.98839 43.6436 10.7125C44.3003 11.4367 44.9317 12.1609 45.5379 12.885C46.0935 12.1609 46.6618 11.4617 47.2427 10.7875C47.8489 10.0883 48.6066 9.32665 49.5158 8.50261C51.7132 6.38008 54.4409 4.43235 57.699 2.65941C60.9824 0.886471 64.7835 0 69.1024 0C73.1435 0 76.8183 0.97387 80.127 2.92161C83.4609 4.84437 86.1002 7.42886 88.045 10.6751C90.015 13.9213 91 17.5171 91 21.4625C91 24.4591 90.4317 27.2683 89.2952 29.8902C88.1586 32.4872 86.5927 34.7721 84.5974 36.7448C82.6021 38.6925 80.2785 40.2282 77.6266 41.3519C74.9746 42.4506 72.1332 43 69.1024 43C66.2231 43 63.5712 42.6005 61.1465 41.8014C58.7472 40.9774 56.5751 39.9286 54.6303 38.6551C52.7108 37.3815 51.0186 36.0706 49.5537 34.7221C48.7202 33.8981 47.9752 33.124 47.3185 32.3998C46.6871 31.6507 46.0935 30.9141 45.5379 30.1899C44.9065 30.9141 44.2624 31.6507 43.6057 32.3998C42.9491 33.149 42.2166 33.9231 41.4084 34.7221C39.9688 36.0706 38.2766 37.3815 36.3318 38.6551C34.4123 39.9036 32.2528 40.9399 29.8535 41.7639C27.4793 42.588 24.8526 43 21.9734 43C17.8818 43 14.1817 42.0386 10.873 40.1159C7.56439 38.1931 4.92506 35.6086 2.95504 32.3624C0.985013 29.0912 0 25.4579 0 21.4625C0 18.491 0.555648 15.7192 1.66694 13.1472C2.8035 10.5502 4.36941 8.26539 6.3647 6.29269C8.38523 4.31998 10.7215 2.78427 13.3734 1.68554C16.0507 0.561848 18.9173 0 21.9734 0ZM10.4563 21.4625C10.4563 23.5351 10.974 25.4204 12.0096 27.1185C13.0451 28.8165 14.4342 30.1649 16.1769 31.1638C17.9197 32.1626 19.8518 32.662 21.9734 32.662C24.3475 32.662 26.5322 32.1376 28.5275 31.0889C30.5228 30.0401 32.3791 28.7166 34.0966 27.1185C35.1826 26.0947 36.1171 25.1083 36.9001 24.1594C37.683 23.2105 38.365 22.3116 38.9459 21.4625C38.3397 20.6635 37.6199 19.777 36.7864 18.8031C35.9782 17.8043 35.0816 16.8554 34.0966 15.9564C32.4802 14.3833 30.649 13.0598 28.6032 11.9861C26.5575 10.8873 24.3475 10.338 21.9734 10.338C19.8518 10.338 17.9197 10.8499 16.1769 11.8737C14.4342 12.8725 13.0451 14.221 12.0096 15.919C10.974 17.592 10.4563 19.4399 10.4563 21.4625ZM80.4679 21.4625C80.4679 19.4399 79.9502 17.592 78.9146 15.919C77.9044 14.221 76.5405 12.8725 74.8231 11.8737C73.1056 10.8499 71.1987 10.338 69.1024 10.338C67.486 10.338 65.9453 10.5877 64.4804 11.0871C63.0155 11.5865 61.639 12.2607 60.351 13.1098C59.0881 13.9588 57.9263 14.9077 56.8655 15.9564C55.729 17.0052 54.7313 18.079 53.8726 19.1777C53.0139 20.2515 52.3951 21.0131 52.0162 21.4625C52.6477 22.3365 53.3549 23.248 54.1378 24.1969C54.9208 25.1208 55.83 26.0947 56.8655 27.1185C58.5577 28.7166 60.4015 30.0401 62.3968 31.0889C64.4173 32.1376 66.6525 32.662 69.1024 32.662C71.1987 32.662 73.1056 32.1626 74.8231 31.1638C76.5405 30.1649 77.9044 28.8165 78.9146 27.1185C79.9502 25.4204 80.4679 23.5351 80.4679 21.4625Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send email when self-hosting Infisical
  </Card>

  <Card
    title="Fastgen"
    href="https://docs.fastgen.com/actions/integrations/resend"
    icon={
     <svg
       className="h-6 w-6"
       width="341"
       height="639"
       viewBox="0 0 341 639"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M124.055 281.936C85.4199 323.452 41.1491 402.46 167.61 525.124C169.054 525.852 169.226 525.647 167.799 522.085C162.896 509.841 148.76 473.417 147.658 441.383C146.236 400.028 165.156 370.923 174.248 360.761C198.862 333.247 276.425 258.605 309.11 226.217C341.795 193.829 342.822 131.017 339.915 95.628C337.589 67.3167 334.499 72.6184 331.23 75.8291C286.8 120.721 167.035 239.46 124.055 281.936Z"
         fill="currentColor"
       />
       <path
         d="M191.752 543.303C190.004 541.192 166.79 490.436 166.415 451.524C165.007 427.954 168.397 412.593 170.652 401.957C171.473 400.141 172.512 399.788 173.489 400.748C198.436 425.247 260.074 494.383 264.655 499.052C270.399 504.904 276.598 517.658 276.598 517.658C286.61 536.3 298.531 570.561 295.876 608.76C293.891 637.323 292.119 639.736 289.687 638.817C288.292 638.29 272.502 622.982 258.003 608.925C247.209 598.461 237.131 588.69 234.238 586.226C227.46 580.451 208.67 562.084 194.368 546.421C193.493 545.462 193.501 545.413 191.752 543.303Z"
         fill="currentColor"
       />
       <path
         d="M40.6974 208.722C2.06224 250.238 -43.3264 322.115 83.1343 444.78C84.5784 445.508 84.7501 445.302 83.3235 441.74C78.4202 429.497 65.4019 400.203 64.3002 368.169C62.8779 326.814 81.7983 297.709 90.8898 287.547C115.504 260.033 193.067 185.392 225.752 153.003C258.437 120.615 259.464 57.8032 256.557 22.4142C254.232 -5.89712 251.142 -0.59542 247.872 2.61528C203.442 47.507 83.6775 166.246 40.6974 208.722Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Build workflows using Fastgen
  </Card>

  <Card
    title="Medusa"
    href="https://medusajs.com/plugins/medusa-plugin-resend"
    icon={
     <svg
       className="h-6 w-6"
       width="488"
       height="488"
       viewBox="0 0 488 488"
       fill="none"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M394.468 97.5239L296.258 41.013C264.125 22.4774 224.751 22.4774 192.618 41.013L93.9554 97.5239C62.2748 116.06 42.3613 150.418 42.3613 187.037V300.511C42.3613 337.582 62.2748 371.489 93.9554 390.024L192.165 446.987C224.298 465.523 263.673 465.523 295.806 446.987L394.015 390.024C426.149 371.489 445.61 337.582 445.61 300.511V187.037C446.515 150.418 426.601 116.06 394.468 97.5239ZM244.212 344.816C188.544 344.816 143.287 299.607 143.287 244C143.287 188.393 188.544 143.185 244.212 143.185C299.879 143.185 345.589 188.393 345.589 244C345.589 299.607 300.332 344.816 244.212 344.816Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send e-commerce emails using Medusa
  </Card>

  <Card
    title="OpenMeter"
    href="https://openmeter.io/docs/reporting/email"
    icon={
     <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24">
       <path
         d="M10.238 8.44 7.28 6.519l-4.909 9.565.06.04h3.863l3.944-7.684ZM15.786 8.44 12.83 6.519l-4.91 9.565.061.04h3.863l3.943-7.684ZM21.335 8.44l-2.957-1.921-4.91 9.565.06.04h3.864l3.943-7.684Z"
         fill="currentColor"
         clipRule="evenodd"
       ></path>
     </svg>
    }
  >
    Send usage emails using OpenMeter
  </Card>

  <Card
    title="Invopop"
    href="https://invopop.com"
    icon={
     <svg className="h-6 w-6" fill="none" viewBox="0 0 40 41">
       <path
         d="M38.7166 38.5342L37.8332 37.7778H10.2562C10.0628 37.7782 9.87562 37.7081 9.72878 37.5802L2.17692 31.1328H1.82092C1.65297 31.1324 1.48897 31.1845 1.35122 31.2821C1.21347 31.3797 1.10866 31.518 1.05103 31.6782C0.993406 31.8384 0.985766 32.0127 1.02915 32.1775C1.07253 32.3422 1.16484 32.4895 1.29351 32.5991L9.72878 39.8231C9.87668 39.9487 10.0634 40.0175 10.2562 40.0172H38.1859C38.3582 40.0228 38.5277 39.9731 38.6703 39.875C38.813 39.777 38.9216 39.6355 38.9804 39.4711C39.0393 39.3067 39.0454 39.1275 38.998 38.9592C38.9507 38.7911 38.8522 38.6422 38.7166 38.5342Z"
         fill="currentColor"
       />
       <path
         d="M38.7166 34.0882L37.8332 33.3316H10.2562C10.0628 33.3321 9.87562 33.2619 9.72878 33.1341L2.17692 26.6699H1.82092C1.65297 26.6696 1.48897 26.7216 1.35122 26.8192C1.21347 26.9168 1.10866 27.0551 1.05103 27.2154C0.993406 27.3755 0.985766 27.5499 1.02915 27.7146C1.07253 27.8794 1.16484 28.0266 1.29351 28.1362L9.72878 35.3569C9.87562 35.4848 10.0628 35.5549 10.2562 35.5545H38.1859C38.3542 35.5555 38.5186 35.5039 38.6569 35.4066C38.7952 35.3094 38.9004 35.1711 38.9586 35.0106C39.0166 34.8504 39.0244 34.6756 38.9812 34.5106C38.9379 34.3455 38.8454 34.1979 38.7166 34.0882Z"
         fill="currentColor"
       />
       <path
         d="M38.7164 16.3087L37.833 15.5522H10.256C10.0629 15.5538 9.8757 15.4849 9.72854 15.3581L2.17668 8.89387H1.82068C1.64876 8.88903 1.47971 8.93936 1.33758 9.03772C1.19546 9.13609 1.0875 9.27746 1.02908 9.44175C0.970657 9.60602 0.96474 9.78482 1.01217 9.95272C1.0596 10.1206 1.15797 10.269 1.29327 10.3768L9.95598 17.7749L20.1087 26.4787C20.2574 26.6049 20.4454 26.6738 20.6394 26.6728H27.4529L28.3363 27.4294C28.4643 27.5395 28.5561 27.6869 28.5991 27.8517C28.6421 28.0164 28.6344 28.1907 28.5769 28.3508C28.5194 28.5109 28.415 28.6494 28.2777 28.7474C28.1403 28.8454 27.9767 28.8982 27.8089 28.8989H20.6394C20.4477 28.8945 20.2634 28.8222 20.1186 28.6947L12.537 22.2238H1.82068C1.65273 22.2234 1.48873 22.2755 1.35098 22.3731C1.21323 22.4707 1.10842 22.6089 1.05079 22.7692C0.993168 22.9294 0.985528 23.1038 1.02891 23.2685C1.0723 23.4332 1.1646 23.5805 1.29327 23.6901L9.72854 30.9108C9.87539 31.0387 10.0625 31.1087 10.256 31.1082H38.1857C38.3539 31.1084 38.5179 31.0559 38.6557 30.9582C38.7936 30.8604 38.8986 30.7221 38.9564 30.5618C39.0143 30.4015 39.0224 30.2269 38.9794 30.0618C38.9364 29.8968 38.8447 29.7491 38.7164 29.6387L27.4529 19.9978H20.6394C20.449 19.9949 20.2654 19.9265 20.1186 19.8035L17.7451 17.7749H38.1824C38.3509 17.7768 38.5159 17.7257 38.6546 17.6287C38.7934 17.5315 38.8993 17.3934 38.9577 17.2328C39.0163 17.0722 39.0244 16.8974 38.9811 16.7319C38.938 16.5665 38.8454 16.4187 38.7164 16.3087ZM20.1186 22.0264C20.2673 22.1527 20.4553 22.2215 20.6493 22.2205H27.4561L28.3363 22.9737C28.4637 23.0837 28.5549 23.2307 28.5974 23.3948C28.64 23.5589 28.6321 23.7324 28.5746 23.8918C28.5171 24.0512 28.4129 24.1889 28.276 24.2864C28.139 24.3838 27.976 24.4362 27.8089 24.4367H20.6394C20.4496 24.4371 20.2656 24.3709 20.1186 24.2491L12.537 17.7749H15.1345L20.1186 22.0264Z"
         fill="currentColor"
       />
       <path
         d="M38.7165 11.8635L37.8331 11.107H10.2561C10.0633 11.1072 9.87657 11.0384 9.72869 10.9128L2.17681 4.44531H1.82081C1.65296 4.44594 1.48934 4.49884 1.352 4.59684C1.21466 4.69484 1.11021 4.83326 1.05273 4.99341C0.995257 5.15357 0.987512 5.32777 1.03054 5.49254C1.07358 5.65731 1.16532 5.80471 1.2934 5.91488L9.72869 13.1356C9.87585 13.2625 10.063 13.3314 10.2561 13.3297H38.1858C38.354 13.3308 38.5185 13.2792 38.6568 13.1819C38.7951 13.0846 38.9004 12.9463 38.9584 12.786C39.0165 12.6256 39.0244 12.451 38.9811 12.2859C38.9378 12.1208 38.8454 11.9733 38.7165 11.8635Z"
         fill="currentColor"
       />
       <path
         d="M1.29387 1.46623L9.72916 8.70366C9.87704 8.82927 10.0638 8.89801 10.2566 8.89781H38.1863C38.3545 8.89893 38.519 8.84731 38.6573 8.75C38.7955 8.65269 38.9009 8.51443 38.9589 8.35407C39.0169 8.19371 39.0249 8.01907 38.9816 7.85399C38.9383 7.68889 38.8459 7.54139 38.717 7.43159L30.2817 0.194161C30.1332 0.069775 29.9469 0.00120419 29.7543 2.55058e-06H1.82128C1.65334 -0.000420119 1.48934 0.0516987 1.35159 0.149271C1.21384 0.246844 1.10902 0.385136 1.0514 0.545339C0.993773 0.705541 0.986132 0.879881 1.02952 1.04465C1.0729 1.20942 1.1652 1.35662 1.29387 1.46623Z"
         fill="currentColor"
       />
       <path
         d="M38.7166 38.5342L37.8332 37.7778H10.2562C10.0628 37.7782 9.87562 37.7081 9.72878 37.5802L2.17692 31.1328H1.82092C1.65297 31.1324 1.48897 31.1845 1.35122 31.2821C1.21347 31.3797 1.10866 31.518 1.05103 31.6782C0.993406 31.8384 0.985766 32.0127 1.02915 32.1775C1.07253 32.3422 1.16484 32.4895 1.29351 32.5991L9.72878 39.8231C9.87668 39.9487 10.0634 40.0175 10.2562 40.0172H38.1859C38.3582 40.0228 38.5277 39.9731 38.6703 39.875C38.813 39.777 38.9216 39.6355 38.9804 39.4711C39.0393 39.3067 39.0454 39.1275 38.998 38.9592C38.9507 38.7911 38.8522 38.6422 38.7166 38.5342Z"
         fill="currentColor"
       />
       <path
         d="M38.7166 34.0882L37.8332 33.3316H10.2562C10.0628 33.3321 9.87562 33.2619 9.72878 33.1341L2.17692 26.6699H1.82092C1.65297 26.6696 1.48897 26.7216 1.35122 26.8192C1.21347 26.9168 1.10866 27.0551 1.05103 27.2154C0.993406 27.3755 0.985766 27.5499 1.02915 27.7146C1.07253 27.8794 1.16484 28.0266 1.29351 28.1362L9.72878 35.3569C9.87562 35.4848 10.0628 35.5549 10.2562 35.5545H38.1859C38.3542 35.5555 38.5186 35.5039 38.6569 35.4066C38.7952 35.3094 38.9004 35.1711 38.9586 35.0106C39.0166 34.8504 39.0244 34.6756 38.9812 34.5106C38.9379 34.3455 38.8454 34.1979 38.7166 34.0882Z"
         fill="currentColor"
       />
       <path
         d="M38.7164 16.3087L37.833 15.5522H10.256C10.0629 15.5538 9.8757 15.4849 9.72854 15.3581L2.17668 8.89387H1.82068C1.64876 8.88903 1.47971 8.93936 1.33758 9.03772C1.19546 9.13609 1.0875 9.27746 1.02908 9.44175C0.970657 9.60602 0.96474 9.78482 1.01217 9.95272C1.0596 10.1206 1.15797 10.269 1.29327 10.3768L9.95598 17.7749L20.1087 26.4787C20.2574 26.6049 20.4454 26.6738 20.6394 26.6728H27.4529L28.3363 27.4294C28.4643 27.5395 28.5561 27.6869 28.5991 27.8517C28.6421 28.0164 28.6344 28.1907 28.5769 28.3508C28.5194 28.5109 28.415 28.6494 28.2777 28.7474C28.1403 28.8454 27.9767 28.8982 27.8089 28.8989H20.6394C20.4477 28.8945 20.2634 28.8222 20.1186 28.6947L12.537 22.2238H1.82068C1.65273 22.2234 1.48873 22.2755 1.35098 22.3731C1.21323 22.4707 1.10842 22.6089 1.05079 22.7692C0.993168 22.9294 0.985528 23.1038 1.02891 23.2685C1.0723 23.4332 1.1646 23.5805 1.29327 23.6901L9.72854 30.9108C9.87539 31.0387 10.0625 31.1087 10.256 31.1082H38.1857C38.3539 31.1084 38.5179 31.0559 38.6557 30.9582C38.7936 30.8604 38.8986 30.7221 38.9564 30.5618C39.0143 30.4015 39.0224 30.2269 38.9794 30.0618C38.9364 29.8968 38.8447 29.7491 38.7164 29.6387L27.4529 19.9978H20.6394C20.449 19.9949 20.2654 19.9265 20.1186 19.8035L17.7451 17.7749H38.1824C38.3509 17.7768 38.5159 17.7257 38.6546 17.6287C38.7934 17.5315 38.8993 17.3934 38.9577 17.2328C39.0163 17.0722 39.0244 16.8974 38.9811 16.7319C38.938 16.5665 38.8454 16.4187 38.7164 16.3087ZM20.1186 22.0264C20.2673 22.1527 20.4553 22.2215 20.6493 22.2205H27.4561L28.3363 22.9737C28.4637 23.0837 28.5549 23.2307 28.5974 23.3948C28.64 23.5589 28.6321 23.7324 28.5746 23.8918C28.5171 24.0512 28.4129 24.1889 28.276 24.2864C28.139 24.3838 27.976 24.4362 27.8089 24.4367H20.6394C20.4496 24.4371 20.2656 24.3709 20.1186 24.2491L12.537 17.7749H15.1345L20.1186 22.0264Z"
         fill="currentColor"
       />
       <path
         d="M38.7165 11.8635L37.8331 11.107H10.2561C10.0633 11.1072 9.87657 11.0384 9.72869 10.9128L2.17681 4.44531H1.82081C1.65296 4.44594 1.48934 4.49884 1.352 4.59684C1.21466 4.69484 1.11021 4.83326 1.05273 4.99341C0.995257 5.15357 0.987512 5.32777 1.03054 5.49254C1.07358 5.65731 1.16532 5.80471 1.2934 5.91488L9.72869 13.1356C9.87585 13.2625 10.063 13.3314 10.2561 13.3297H38.1858C38.354 13.3308 38.5185 13.2792 38.6568 13.1819C38.7951 13.0846 38.9004 12.9463 38.9584 12.786C39.0165 12.6256 39.0244 12.451 38.9811 12.2859C38.9378 12.1208 38.8454 11.9733 38.7165 11.8635Z"
         fill="currentColor"
       />
       <path
         d="M1.29387 1.46623L9.72916 8.70366C9.87704 8.82927 10.0638 8.89801 10.2566 8.89781H38.1863C38.3545 8.89893 38.519 8.84731 38.6573 8.75C38.7955 8.65269 38.9009 8.51443 38.9589 8.35407C39.0169 8.19371 39.0249 8.01907 38.9816 7.85399C38.9383 7.68889 38.8459 7.54139 38.717 7.43159L30.2817 0.194161C30.1332 0.069775 29.9469 0.00120419 29.7543 2.55058e-06H1.82128C1.65334 -0.000420119 1.48934 0.0516987 1.35159 0.149271C1.21384 0.246844 1.10902 0.385136 1.0514 0.545339C0.993773 0.705541 0.986132 0.879881 1.02952 1.04465C1.0729 1.20942 1.1652 1.35662 1.29387 1.46623Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send invoice emails using Invopop
  </Card>

  <Card
    title="Prisma Pulse"
    href="https://pris.ly/pulse-resend"
    icon={
     <svg className="h-6 w-6" viewBox="0 0 980 980" fill="none">
       <g clipPath="url(#clip0_27_9)">
         <path
           fillRule="evenodd"
           clipRule="evenodd"
           d="M815.215 777.789L374.881 908.022C361.429 912.005 348.536 900.369 351.363 886.801L508.669 133.441C511.611 119.36 531.084 117.123 537.228 130.17L828.491 748.67C833.984 760.337 827.717 774.096 815.215 777.789ZM890.727 747.069L553.485 30.9242V30.9089C549.294 22.0903 542.796 14.57 534.678 9.14543C526.56 3.72089 517.125 0.594309 507.374 0.0972217C486.851 -1.09786 468.465 8.79987 458.093 25.6459L92.3365 618.054C86.78 627.003 83.8893 637.35 84.0032 647.883C84.1172 658.416 87.2311 668.698 92.98 677.524L271.767 954.477C282.423 971.009 300.886 980.577 320.076 980.577C325.515 980.577 330.985 979.811 336.363 978.218L855.335 824.726C863.147 822.437 870.377 818.498 876.535 813.174C882.694 807.851 887.638 801.267 891.034 793.869C894.385 786.512 896.094 778.515 896.041 770.431C895.988 762.348 894.175 754.38 890.727 747.069Z"
           fill="currentColor"
         />
       </g>
       <defs>
         <clipPath id="clip0_27_9">
           <rect width="980" height="980" fill="currentColor" />
         </clipPath>
       </defs>
     </svg>
    }
  >
    Send based on database events using Prisma Pulse
  </Card>

  <Card
    title="Payload CMS"
    href="https://payloadcms.com/docs/beta/email/overview#official-email-adapters"
    icon={
     <svg className="h-6 w-6" viewBox="0 0 40 40" fill="none">
       <path
         d="M18.4469 0L36.8 11.0415V31.9965L22.9773 40V19.0451L4.61523 8.01243L18.4469 0Z"
         fill="currentColor"
       />
       <path
         d="M17.0495 38.8363V22.4829L3.20001 30.5042L17.0495 38.8363Z"
         fill="currentColor"
       />
     </svg>
    }
  >
    Send emails using Payload CMS
  </Card>
</CardGroup>

## Build your own integration

Here's how to build your own integration with Resend:

1.  Read the documentation on [how to send emails](/api-reference/emails/send-email).
2.  Integrate with your product offering.
3.  [Reach out to us](https://resend.com/contact) to feature your product on this page.


# Introduction

Resend is the email API for developers.

## Quickstart

Learn how to get Resend set up in your project.

<CardGroup cols={2}>
  <Card
    title="Node.js Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       height="40"
       viewBox="0 0 16 16"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path d="M 8 1.0234375 C 7.736875 1.0234375 7.4742344 1.0924687 7.2402344 1.2304688 L 2.7402344 3.8789062 C 2.2832344 4.1469063 2 4.642875 2 5.171875 L 2 11.005859 C 2 11.554859 2.29925 12.059266 2.78125 12.322266 L 4.2558594 13.126953 C 4.4828594 13.250953 4.7286094 13.310547 4.9746094 13.310547 C 5.2386094 13.310547 5.4992812 13.239609 5.7382812 13.099609 C 6.1982812 12.826609 6.4726562 12.344594 6.4726562 11.808594 L 6.4726562 5.4648438 L 5.4726562 5.4648438 L 5.4726562 11.808594 C 5.4726562 12.065594 5.3025156 12.195281 5.2285156 12.238281 C 5.1555156 12.281281 4.959375 12.371047 4.734375 12.248047 L 3.2617188 11.445312 C 3.1007187 11.357312 3 11.188859 3 11.005859 L 3 5.171875 C 3 4.995875 3.0940938 4.8302344 3.2460938 4.7402344 L 7.7460938 2.0917969 C 7.9020937 1.9997969 8.0979062 2.0007969 8.2539062 2.0917969 L 12.753906 4.7402344 C 12.904906 4.8302344 13 4.995875 13 5.171875 L 13 11.009766 C 13 11.189766 12.900234 11.359219 12.740234 11.449219 L 8.2402344 13.900391 C 8.0902344 13.980391 7.9097656 13.980391 7.7597656 13.900391 L 6.8808594 13.419922 C 6.7108594 13.629922 6.5 13.810937 6.25 13.960938 C 6.17 14.010938 6.0897656 14.050078 6.0097656 14.080078 L 7.2792969 14.779297 C 7.5092969 14.899297 7.75 14.960938 8 14.960938 C 8.25 14.960938 8.4907031 14.899297 8.7207031 14.779297 L 13.220703 12.320312 C 13.700703 12.060313 14 11.559766 14 11.009766 L 14 5.171875 C 14 4.642875 13.717719 4.1469062 13.261719 3.8789062 L 8.7617188 1.2304688 C 8.5272187 1.0924688 8.263125 1.0234375 8 1.0234375 z M 9.4511719 5.3183594 C 7.8711719 5.3183594 7.0703125 5.8690781 7.0703125 6.9550781 C 7.0703125 8.1850781 8.4869687 8.3680781 9.1679688 8.4550781 C 9.2659688 8.4680781 9.352875 8.4791875 9.421875 8.4921875 L 9.7207031 8.5449219 C 10.760703 8.7189219 11 8.836875 11 9.171875 C 11 9.333875 10.999172 9.8242188 9.4511719 9.8242188 C 8.1381719 9.8242188 7.8691406 9.4346094 7.8691406 8.8496094 L 6.8691406 8.8496094 C 6.8691406 9.7516094 7.3171719 10.824219 9.4511719 10.824219 C 11.557172 10.824219 12 9.925875 12 9.171875 C 12 7.913875 10.777719 7.7076406 9.8867188 7.5566406 L 9.5996094 7.5078125 C 9.5166094 7.4928125 9.4119219 7.4788438 9.2949219 7.4648438 C 8.6589219 7.3828438 8.0703125 7.2650312 8.0703125 6.9570312 C 8.0703125 6.7340313 8.0691719 6.3193594 9.4511719 6.3183594 C 10.370172 6.3183594 10.837891 6.6207969 10.837891 7.2167969 L 11.837891 7.2167969 C 11.837891 6.2997969 11.209172 5.3183594 9.4511719 5.3183594 z" />
     </svg>
    }
    href="/send-with-nodejs"
  />

  <Card
    title="Next.js Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       height="1024pt"
       viewBox=".5 -.2 1023 1024.1"
       width="1024pt"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path d="m478.5.6c-2.2.2-9.2.9-15.5 1.4-145.3 13.1-281.4 91.5-367.6 212-48 67-78.7 143-90.3 223.5-4.1 28.1-4.6 36.4-4.6 74.5s.5 46.4 4.6 74.5c27.8 192.1 164.5 353.5 349.9 413.3 33.2 10.7 68.2 18 108 22.4 15.5 1.7 82.5 1.7 98 0 68.7-7.6 126.9-24.6 184.3-53.9 8.8-4.5 10.5-5.7 9.3-6.7-.8-.6-38.3-50.9-83.3-111.7l-81.8-110.5-102.5-151.7c-56.4-83.4-102.8-151.6-103.2-151.6-.4-.1-.8 67.3-1 149.6-.3 144.1-.4 149.9-2.2 153.3-2.6 4.9-4.6 6.9-8.8 9.1-3.2 1.6-6 1.9-21.1 1.9h-17.3l-4.6-2.9c-3-1.9-5.2-4.4-6.7-7.3l-2.1-4.5.2-200.5.3-200.6 3.1-3.9c1.6-2.1 5-4.8 7.4-6.1 4.1-2 5.7-2.2 23-2.2 20.4 0 23.8.8 29.1 6.6 1.5 1.6 57 85.2 123.4 185.9s157.2 238.2 201.8 305.7l81 122.7 4.1-2.7c36.3-23.6 74.7-57.2 105.1-92.2 64.7-74.3 106.4-164.9 120.4-261.5 4.1-28.1 4.6-36.4 4.6-74.5s-.5-46.4-4.6-74.5c-27.8-192.1-164.5-353.5-349.9-413.3-32.7-10.6-67.5-17.9-106.5-22.3-9.6-1-75.7-2.1-84-1.3zm209.4 309.4c4.8 2.4 8.7 7 10.1 11.8.8 2.6 1 58.2.8 183.5l-.3 179.8-31.7-48.6-31.8-48.6v-130.7c0-84.5.4-132 1-134.3 1.6-5.6 5.1-10 9.9-12.6 4.1-2.1 5.6-2.3 21.3-2.3 14.8 0 17.4.2 20.7 2z" />
       <path d="m784.3 945.1c-3.5 2.2-4.6 3.7-1.5 2 2.2-1.3 5.8-4 5.2-4.1-.3 0-2 1-3.7 2.1zm-6.9 4.5c-1.8 1.4-1.8 1.5.4.4 1.2-.6 2.2-1.3 2.2-1.5 0-.8-.5-.6-2.6 1.1zm-5 3c-1.8 1.4-1.8 1.5.4.4 1.2-.6 2.2-1.3 2.2-1.5 0-.8-.5-.6-2.6 1.1zm-5 3c-1.8 1.4-1.8 1.5.4.4 1.2-.6 2.2-1.3 2.2-1.5 0-.8-.5-.6-2.6 1.1zm-7.6 4c-3.8 2-3.6 2.8.2.9 1.7-.9 3-1.8 3-2 0-.7-.1-.6-3.2 1.1z" />
     </svg>
    }
    href="/send-with-nextjs"
  />

  <Card
    title="Express Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       xmlns="http://www.w3.org/2000/svg"
       viewBox="0 0 32 32"
       width="64"
       height="64"
     >
       <path d="M32 24.795c-1.164.296-1.884.013-2.53-.957l-4.594-6.356-.664-.88-5.365 7.257c-.613.873-1.256 1.253-2.4.944l6.87-9.222-6.396-8.33c1.1-.214 1.86-.105 2.535.88l4.765 6.435 4.8-6.4c.615-.873 1.276-1.205 2.38-.883l-2.48 3.288-3.36 4.375c-.4.5-.345.842.023 1.325L32 24.795zM.008 15.427l.562-2.764C2.1 7.193 8.37 4.92 12.694 8.3c2.527 1.988 3.155 4.8 3.03 7.95H1.48c-.214 5.67 3.867 9.092 9.07 7.346 1.825-.613 2.9-2.042 3.438-3.83.273-.896.725-1.036 1.567-.78-.43 2.236-1.4 4.104-3.45 5.273-3.063 1.75-7.435 1.184-9.735-1.248C1 21.6.434 19.812.18 17.9c-.04-.316-.12-.617-.18-.92q.008-.776.008-1.552zm1.498-.38h12.872c-.084-4.1-2.637-7.012-6.126-7.037-3.83-.03-6.58 2.813-6.746 7.037z" />
     </svg>
    }
    href="send-with-express/"
  />

  <Card
    title="PHP Quickstart"
    icon={
     <svg
       className="h-6 w-6 overflow-visible ml-1"
       fill="currentcolor"
       viewBox="0 0 16 16"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         clipRule="evenodd"
         d="M7.9999 13.6496C10.5698 13.6496 12.9461 13.1038 14.7162 12.1728C16.44 11.2661 17.8399 9.84028 17.8399 8.00001C17.8399 6.15974 16.44 4.73389 14.7162 3.82722C12.9461 2.89617 10.5698 2.35043 7.9999 2.35043C5.42997 2.35043 3.05373 2.89617 1.28358 3.82722C-0.440229 4.73389 -1.84009 6.15974 -1.84009 8.00001C-1.84009 9.84028 -0.440229 11.2661 1.28358 12.1728C3.05373 13.1038 5.42997 13.6496 7.9999 13.6496ZM16.8399 8.00001C16.8399 10.5679 12.8821 12.6496 7.9999 12.6496C3.11771 12.6496 -0.840088 10.5679 -0.840088 8.00001C-0.840088 5.43212 3.11771 3.35043 7.9999 3.35043C12.8821 3.35043 16.8399 5.43212 16.8399 8.00001ZM6.87738 4.72751C6.88194 4.70401 6.90252 4.68703 6.92646 4.68703H7.9244C7.93933 4.68703 7.95347 4.6937 7.96297 4.70522C7.97247 4.71674 7.97633 4.7319 7.97348 4.74655L7.7477 5.91034C7.84026 5.91005 7.9323 5.90915 8.02328 5.90826C8.33164 5.90523 8.62788 5.90233 8.89109 5.9236C9.24813 5.95245 9.55863 6.02638 9.76423 6.216C9.87161 6.31473 9.94117 6.42259 9.97569 6.5654C10.0097 6.70601 10.0089 6.87748 9.98244 7.10232C9.94727 7.40106 9.8651 7.80454 9.74965 8.37142L9.74964 8.37145L9.74963 8.3715C9.69183 8.65534 9.62568 8.98014 9.55291 9.35328C9.54833 9.37676 9.52775 9.39371 9.50383 9.39371H8.49295C8.47802 9.39371 8.46387 9.38704 8.45437 9.37552C8.44488 9.364 8.44102 9.34884 8.44386 9.33419C8.52282 8.92716 8.58966 8.5905 8.64516 8.31095L8.6452 8.31076C8.73782 7.8442 8.79885 7.53677 8.83193 7.32694C8.85847 7.15866 8.86601 7.05871 8.85915 6.99197C8.85276 6.92984 8.83413 6.8978 8.80269 6.8641L8.80265 6.86405C8.74366 6.80064 8.64179 6.76909 8.43806 6.75735C8.30039 6.74942 8.12483 6.75064 7.89766 6.75222H7.89756C7.80294 6.75288 7.69936 6.7536 7.58584 6.75374L7.07911 9.35328C7.07453 9.37676 7.05396 9.39371 7.03003 9.39371H6.03318C6.01825 9.39371 6.0041 9.38704 5.9946 9.37552C5.9851 9.36401 5.98125 9.34885 5.98409 9.33419L6.87738 4.72751ZM2.69684 5.95416C2.7014 5.93065 2.72198 5.91368 2.74593 5.91368H4.67706C5.26358 5.91368 5.70732 6.06602 5.98566 6.3872L5.94796 6.42002L5.98574 6.38729L5.98566 6.3872C6.25284 6.69412 6.33382 7.1487 6.26023 7.60473C6.18652 8.06151 5.95682 8.52755 5.59142 8.86359C5.00271 9.41486 4.36602 9.40924 3.44999 9.40117C3.34805 9.40027 3.24265 9.39934 3.13347 9.39914L2.90398 10.5831C2.89942 10.6066 2.87884 10.6236 2.85489 10.6236H1.85156C1.83663 10.6236 1.82249 10.6169 1.81299 10.6054C1.80349 10.5939 1.79963 10.5787 1.80248 10.5641L2.69684 5.95416ZM10.5358 5.95415C10.5403 5.93065 10.5609 5.91368 10.5848 5.91368H12.5171C13.1036 5.91368 13.5473 6.06602 13.8256 6.3872L13.788 6.42003L13.8257 6.38729L13.8256 6.3872C14.0928 6.69412 14.1738 7.1487 14.1002 7.60473C14.0265 8.06152 13.7968 8.52756 13.4314 8.86361C12.8466 9.41043 12.238 9.4066 11.2662 9.40048H11.2662H11.2662H11.2662H11.2661C11.1721 9.39988 11.0746 9.39927 10.9735 9.39913L10.744 10.5831C10.7394 10.6066 10.7188 10.6236 10.6949 10.6236H9.68939C9.67446 10.6236 9.66031 10.6169 9.65081 10.6054C9.64131 10.5939 9.63746 10.5787 9.64031 10.5641L10.5358 5.95415ZM3.65348 6.74077L3.29849 8.56995C3.36057 8.57023 3.42151 8.5709 3.48133 8.57155H3.48135H3.48137H3.48138H3.4814C3.6276 8.57314 3.76717 8.57465 3.90059 8.57041C4.10547 8.56389 4.28973 8.54381 4.4503 8.49113C4.60986 8.43878 4.7459 8.35429 4.85535 8.21803C4.96524 8.08121 5.05079 7.88912 5.10374 7.61781C5.17864 7.22899 5.12314 7.02269 4.9944 6.90717C4.92839 6.84793 4.83845 6.80787 4.72385 6.78174C4.60919 6.7556 4.47305 6.74411 4.31748 6.73973C4.1854 6.736 4.04245 6.73745 3.88872 6.739H3.88871H3.88869H3.88868H3.88866L3.88856 6.739C3.81282 6.73977 3.73445 6.74056 3.65348 6.74077ZM11.4902 6.74077L11.1352 8.56998C11.2034 8.57036 11.2702 8.57129 11.3358 8.57221C11.471 8.57409 11.601 8.57591 11.7268 8.57265C11.9303 8.56738 12.1151 8.54876 12.2771 8.49702C12.438 8.4456 12.5762 8.36154 12.6876 8.22455C12.7995 8.08703 12.8869 7.89302 12.9405 7.61781C13.0154 7.22882 12.9608 7.02253 12.8329 6.90707C12.7674 6.8479 12.6779 6.80786 12.5636 6.78174C12.4493 6.7556 12.3132 6.74411 12.1575 6.73973C12.0252 6.736 11.8816 6.73745 11.727 6.739L11.7268 6.739H11.7268H11.7268H11.7268C11.6506 6.73977 11.5717 6.74056 11.4902 6.74077Z"
         fillRule="evenodd"
       ></path>
     </svg>
    }
    href="send-with-php/"
  />

  <Card
    title="Laravel Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="none"
       height="40"
       viewBox="0 0 16 16"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M6.69141 2.76562L4.07422 4.27344M6.69141 2.76562L4.07422 1.25781L1.46094 2.76562M6.69141 2.76562V8.74242M4.07422 4.27344L1.46094 2.76562M4.07422 4.27344V10.2397M1.46094 2.76562V11.7266L6.69141 14.7422M6.69141 14.7422V11.7266M6.69141 14.7422L11.9201 11.7266V8.74242M6.69141 11.7266L4.07422 10.2397M6.69141 11.7266L11.9201 8.74242M4.07422 10.2397L6.69141 8.74242M9.31189 4.27344L11.9201 2.76562L14.5365 4.27344M9.31189 4.27344L11.9201 5.77934M9.31189 4.27344V7.24025M11.9201 5.77934L14.5365 4.27344M11.9201 5.77934V8.74242M14.5365 4.27344V7.24025L11.9201 8.74242M11.9201 8.74242L9.31189 7.24025M9.31189 7.24025L6.69141 8.74242"
         stroke="currentcolor"
         strokeLinecap="round"
         strokeLinejoin="round"
         strokeWidth="0.9"
       ></path>
     </svg>
    }
    href="send-with-laravel/"
  />

  <Card
    title="Python Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       height="40"
       viewBox="0 0 16 16"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         clipRule="evenodd"
         d="M5.00008 2.48333C5.00008 2.28791 5.17329 1.97181 5.75348 1.67407C6.30368 1.39174 7.09756 1.2 8.00008 1.2C8.9026 1.2 9.69648 1.39174 10.2467 1.67407C10.8269 1.97181 11.0001 2.28791 11.0001 2.48333L11 4.49999V4.66666C11 5.4877 10.9478 6.0615 10.8418 6.46743C10.7387 6.86203 10.595 7.06047 10.4316 7.18155C10.2553 7.31215 9.98982 7.40251 9.54728 7.45087C9.10384 7.49934 8.5515 7.5 7.83337 7.5H7.80801C7.20363 7.49999 6.65752 7.49998 6.19769 7.55571C5.72755 7.6127 5.28198 7.73413 4.91686 8.02623C4.54439 8.32421 4.31834 8.74858 4.18424 9.28498C4.06996 9.74209 4.01556 10.3077 4.00296 11H2.48341C2.28799 11 1.97188 10.8268 1.67415 10.2466C1.39181 9.6964 1.20007 8.90252 1.20007 8C1.20007 7.09748 1.39181 6.3036 1.67415 5.7534C1.97188 5.17321 2.28799 5 2.48341 5H4.50008H8.00007V4H5.00008V2.48333ZM2.48341 12H4.00005L4.00008 13.5167C4.00008 14.2877 4.61037 14.8633 5.29693 15.2156C6.01348 15.5833 6.9696 15.8 8.00008 15.8C9.03056 15.8 9.98668 15.5833 10.7032 15.2156C11.3898 14.8633 12.0001 14.2877 12.0001 13.5167V12H13.5167C14.2878 12 14.8634 11.3897 15.2157 10.7031C15.5834 9.9866 15.8001 9.03048 15.8001 8C15.8001 6.96952 15.5834 6.0134 15.2157 5.29685C14.8634 4.61029 14.2878 4 13.5167 4H12.0001L12.0001 2.48334C12.0001 1.71225 11.3898 1.13669 10.7032 0.784379C9.98668 0.416675 9.03056 0.199997 8.00008 0.199997C6.9696 0.199997 6.01348 0.416675 5.29693 0.784379C4.61037 1.13669 4.00008 1.71225 4.00008 2.48333V4H2.48341C1.71232 4 1.13677 4.61029 0.784455 5.29685C0.416751 6.0134 0.200073 6.96952 0.200073 8C0.200073 9.03048 0.416751 9.9866 0.784455 10.7031C1.13677 11.3897 1.71232 12 2.48341 12ZM8.00007 12H11.0001V13.5167C11.0001 13.7121 10.8269 14.0282 10.2467 14.3259C9.69648 14.6083 8.9026 14.8 8.00008 14.8C7.09756 14.8 6.30368 14.6083 5.75348 14.3259C5.17329 14.0282 5.00008 13.7121 5.00008 13.5167L5.00004 11.5L5.00004 11.5L5.00004 11.3333C5.00004 10.5132 5.05211 9.93659 5.15438 9.52752C5.25466 9.12641 5.39319 8.92579 5.54155 8.8071C5.69727 8.68253 5.92878 8.59563 6.31802 8.54845C6.71114 8.5008 7.19784 8.5 7.83337 8.5H7.85761C8.54613 8.50001 9.15215 8.50001 9.65592 8.44495C10.1665 8.38915 10.6406 8.27118 11.0268 7.98511C11.4259 7.68952 11.6676 7.26296 11.8093 6.72007C11.9294 6.26027 11.9844 5.69226 11.9971 5H13.5167C13.7122 5 14.0283 5.17321 14.326 5.7534C14.6083 6.3036 14.8001 7.09748 14.8001 8C14.8001 8.90252 14.6083 9.6964 14.326 10.2466C14.0283 10.8268 13.7122 11 13.5167 11H11.5001H8.00007V12ZM6.2262 3.45245C6.57205 3.45245 6.85242 3.17208 6.85242 2.82622C6.85242 2.48037 6.57205 2.2 6.2262 2.2C5.88035 2.2 5.59998 2.48037 5.59998 2.82622C5.59998 3.17208 5.88035 3.45245 6.2262 3.45245ZM9.77725 13.8045C10.1237 13.8045 10.4045 13.5237 10.4045 13.1773C10.4045 12.8308 10.1237 12.55 9.77725 12.55C9.43083 12.55 9.15 12.8308 9.15 13.1773C9.15 13.5237 9.43083 13.8045 9.77725 13.8045Z"
         fillRule="evenodd"
       ></path>
     </svg>
    }
    href="/send-with-python"
  />

  <Card
    title="Ruby Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       height="40"
       viewBox="0 0 16 16"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path d="M 7.992188 1 C 7.917969 1 7.84375 1.019531 7.777344 1.054688 L 4.777344 2.554688 C 4.730469 2.578125 4.683594 2.609375 4.648438 2.648438 L 2.648438 4.648438 C 2.617188 4.675781 2.589844 4.707031 2.570313 4.742188 L 1.070313 7.242188 C 1.023438 7.320313 1 7.410156 1 7.5 C 1 7.507813 1 7.519531 1 7.53125 L 1 11.5 C 1 11.628906 1.050781 11.757813 1.140625 11.847656 C 1.238281 12.371094 1.375 12.890625 1.742188 13.257813 C 2.3125 13.828125 3.109375 14.027344 4 13.976563 L 4 14 L 14 14 L 14 5.539063 C 14 5.511719 14 5.484375 14 5.460938 L 14 3.5 L 13.992188 3.5 C 13.949219 2.8125 13.722656 2.207031 13.257813 1.742188 C 12.890625 1.375 12.371094 1.238281 11.847656 1.140625 C 11.753906 1.050781 11.628906 1 11.5 1 L 8 1 C 8 1 7.996094 1 7.992188 1 Z M 9.652344 2 L 11.40625 2 C 11.425781 2.003906 11.445313 2.007813 11.464844 2.007813 C 11.941406 2.042969 12.296875 2.195313 12.550781 2.449219 C 12.949219 2.84375 13.089844 3.539063 12.929688 4.445313 L 9.820313 2.117188 L 9.800781 2.101563 C 9.792969 2.09375 9.785156 2.089844 9.777344 2.085938 Z M 7.964844 2.078125 L 8.90625 2.703125 L 8.0625 5.230469 L 5.257813 8.03125 L 2.734375 8.453125 L 2.09375 7.484375 L 3.398438 5.3125 L 5.296875 3.410156 Z M 9.757813 3.316406 L 12 5 L 9.195313 5 Z M 9.238281 6 L 12.410156 6 C 11.980469 6.960938 11.3125 7.988281 10.4375 8.992188 Z M 8.316406 6.390625 L 9.601563 9.601563 L 6.390625 8.316406 Z M 13 7.078125 L 13 12.292969 L 10.925781 10.21875 L 10.847656 10.023438 C 11.742188 9.0625 12.472656 8.0625 13 7.078125 Z M 4.9375 9.101563 L 4.660156 11.859375 L 3.28125 9.375 Z M 2 9.152344 L 2.070313 9.257813 L 4.125 12.957031 C 3.382813 13.03125 2.796875 12.898438 2.449219 12.550781 C 2.449219 12.550781 2.449219 12.550781 2.445313 12.550781 C 2.191406 12.296875 2.042969 11.945313 2.007813 11.464844 C 2.007813 11.441406 2.003906 11.421875 2 11.40625 Z M 5.929688 9.210938 L 8.992188 10.4375 C 7.847656 11.433594 6.660156 12.171875 5.59375 12.585938 Z M 10.023438 10.847656 L 10.21875 10.925781 L 12.292969 13 L 7.078125 13 C 8.0625 12.472656 9.0625 11.742188 10.023438 10.847656 Z" />
     </svg>
    }
    href="/send-with-ruby"
  />

  <Card
    title="Rails Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       width="14"
       height="10"
       viewBox="0 0 14 10"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         fillRule="evenodd"
         clipRule="evenodd"
         d="M9.26954 1.31918C8.74765 1.18951 8.22291 1.12537 7.70403 1.12123L7.70802 0.621251C8.26552 0.625698 8.8294 0.694622 9.3901 0.833934L9.26954 1.31918ZM6.1341 1.29217C5.61738 1.40973 5.1165 1.5859 4.64137 1.81461L4.42451 1.36409C4.9329 1.11936 5.46929 0.930647 6.02318 0.804633L6.1341 1.29217ZM11.4358 2.2739C11.2094 2.12558 10.98 1.99259 10.7486 1.87436L10.976 1.42909C11.2236 1.55556 11.4685 1.69759 11.7098 1.85567L12.0666 2.08946L11.7926 2.50769L11.4358 2.2739ZM3.30044 2.65449C2.88728 2.98213 2.51016 3.35589 2.17885 3.76948L1.78862 3.45688C2.14375 3.01354 2.54767 2.61332 2.98975 2.26273L3.30044 2.65449ZM12.8631 3.20907L12.5063 2.97527L12.7803 2.55704L13.1371 2.79084L12.8631 3.20907ZM1.33981 5.10736C1.11705 5.57601 0.945725 6.07612 0.834598 6.60227L0.34539 6.49894C0.464781 5.93367 0.648893 5.39625 0.888228 4.89272L1.33981 5.10736ZM0.688533 8.1753C0.693883 8.43516 0.713433 8.69954 0.748067 8.96796L0.252178 9.03194C0.215265 8.74586 0.194362 8.46356 0.188639 8.18559L0.688533 8.1753ZM13.0001 4.99995L11.8648 4.46569C8.7923 3.0198 5.37433 5.6624 6.00012 8.99995H1.50012C0.752281 3.39114 7.11327 -0.36068 11.6602 3.00738L13.0001 3.99995V4.99995ZM9.39343 5.36218C9.65957 5.28953 9.9379 5.25342 10.2218 5.25912L10.2319 4.75922C9.89885 4.75254 9.57282 4.79491 9.26176 4.87982L9.39343 5.36218ZM11.0465 5.39477C11.1775 5.43577 11.3086 5.48648 11.4394 5.54749L11.8031 5.71725L12.0146 5.26415L11.6508 5.0944C11.5001 5.02407 11.3482 4.9653 11.1959 4.91761L11.0465 5.39477ZM7.97238 6.22066C8.16447 6.01612 8.38421 5.83825 8.62428 5.69298L8.36542 5.2652C8.08642 5.43403 7.83115 5.64067 7.60791 5.87838L7.97238 6.22066ZM12.5307 6.05675L12.8944 6.2265L13.1058 5.77341L12.7421 5.60365L12.5307 6.05675ZM7.21528 7.69283C7.26885 7.41392 7.36213 7.14921 7.48862 6.90405L7.04428 6.67479C6.89644 6.96135 6.78708 7.27139 6.72425 7.59851L7.21528 7.69283ZM7.24372 8.94374C7.21128 8.80315 7.189 8.6643 7.17618 8.52767L6.67837 8.57438C6.69328 8.73332 6.71913 8.89411 6.75653 9.05617L7.24372 8.94374Z"
         fill="currentcolor"
       />
     </svg>
    }
    href="/send-with-rails"
  />

  <Card
    title="Go Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       height="40"
       style={{ overflow: 'visible' }}
       viewBox="0 0 16 16"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         clipRule="evenodd"
         d="M8.58088 6.38879C8.24298 6.47352 7.96479 6.54646 7.6815 6.62074L7.68145 6.62075C7.45577 6.67992 7.22686 6.73994 6.96195 6.80744L6.94603 6.81166C6.8165 6.84601 6.80299 6.84959 6.68249 6.71229C6.53794 6.55054 6.43194 6.44588 6.22957 6.35073C5.62247 6.05577 5.03464 6.1414 4.48536 6.49345C3.83008 6.9121 3.4928 7.53056 3.50244 8.30126C3.51208 9.06244 4.04208 9.69042 4.80337 9.79508C5.45865 9.88072 6.00793 9.65236 6.44157 9.1671C6.50586 9.08953 6.56485 9.00671 6.63032 8.91481L6.63033 8.91479L6.63041 8.91468C6.65324 8.88263 6.67685 8.84948 6.70176 8.81506H4.84191C4.63955 8.81506 4.59136 8.69136 4.65882 8.52961C4.7841 8.23466 5.01537 7.73989 5.15028 7.4925C5.17919 7.43541 5.24665 7.34027 5.39119 7.34027H8.49247C8.63176 6.90459 8.85774 6.49291 9.15917 6.10338C9.86263 5.18996 10.7106 4.71423 11.8574 4.51441C12.8403 4.34315 13.7654 4.4383 14.6038 4.99967C15.365 5.51347 15.8372 6.20805 15.9625 7.12147C16.1263 8.40596 15.7505 9.45259 14.8543 10.3469C14.2183 10.9844 13.4377 11.384 12.5415 11.5648C12.3708 11.5961 12.1999 11.6109 12.0318 11.6255C11.9439 11.6331 11.8567 11.6407 11.7706 11.6505C10.8937 11.6314 10.0939 11.384 9.41935 10.8132C8.94488 10.4082 8.61806 9.91052 8.45568 9.33109C8.34297 9.55585 8.2082 9.7711 8.05087 9.97586C7.35704 10.8798 6.45121 11.4411 5.30447 11.5934C4.36009 11.7171 3.48317 11.5363 2.71225 10.9654C1.99914 10.4326 1.59441 9.72849 1.48841 8.85312C1.36314 7.816 1.6715 6.88356 2.30751 6.06528C2.9917 5.18041 3.89754 4.61904 5.00573 4.41923C5.91157 4.25748 6.77885 4.36214 7.55941 4.88545C8.07014 5.21847 8.43633 5.67518 8.67724 6.22704C8.73506 6.31267 8.69652 6.36024 8.58088 6.38879ZM-2.29935 6.56005C-2.33789 6.56005 -2.34753 6.54102 -2.32826 6.51248L-2.12589 6.25558C-2.10662 6.22704 -2.05844 6.20801 -2.01989 6.20801H1.42034C1.45889 6.20801 1.46853 6.23655 1.44925 6.2651L1.28543 6.51248C1.26616 6.54102 1.21798 6.56957 1.18907 6.56957L-2.29935 6.56005ZM-3.75442 7.43554C-3.79297 7.43554 -3.8026 7.41651 -3.78333 7.38797L-3.58096 7.13107C-3.56169 7.10253 -3.51351 7.0835 -3.47496 7.0835H0.919281C0.957828 7.0835 0.977101 7.11204 0.967464 7.14059L0.890373 7.36894C0.880736 7.407 0.84219 7.42603 0.803644 7.42603L-3.75442 7.43554ZM-1.4513 8.2537C-1.47057 8.28224 -1.46093 8.31078 -1.42239 8.31078L0.678369 8.3203C0.707278 8.3203 0.745825 8.29175 0.745825 8.2537L0.765097 8.02534C0.765097 7.98728 0.745825 7.95874 0.707279 7.95874H-1.22002C-1.25856 7.95874 -1.29711 7.98728 -1.31638 8.01583L-1.4513 8.2537ZM14.0575 7.70514C14.0594 7.73699 14.0613 7.77055 14.0641 7.80653C14.0159 8.6248 13.6016 9.23375 12.8403 9.62385C12.3295 9.88075 11.7995 9.9093 11.2695 9.68094C10.5757 9.37647 10.2095 8.6248 10.383 7.88265C10.595 6.98826 11.1732 6.42689 12.0694 6.22708C12.9848 6.01775 13.8617 6.55058 14.0352 7.49254C14.0489 7.56001 14.0529 7.62749 14.0575 7.70514Z"
         fillRule="evenodd"
       ></path>
     </svg>
    }
    href="/send-with-go"
  />

  <Card
    title="Rust Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       height="40"
       viewBox="0 0 24 24"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         d="M19.8904 11.804L19.219 11.388C19.2133 11.3227 19.207 11.2576 19.2 11.1925L19.7769 10.654C19.806 10.6273 19.8278 10.5936 19.8401 10.556C19.8523 10.5185 19.8548 10.4785 19.8471 10.4397C19.8394 10.401 19.8219 10.3649 19.7962 10.3349C19.7705 10.3049 19.7375 10.2821 19.7004 10.2685L18.9625 9.9925C18.944 9.92877 18.9249 9.86527 18.905 9.802L19.3649 9.1625C19.3881 9.13058 19.4026 9.09328 19.4073 9.05414C19.4119 9.015 19.4064 8.97533 19.3914 8.93889C19.3764 8.90246 19.3523 8.87048 19.3214 8.846C19.2905 8.82151 19.2539 8.80533 19.215 8.79901L18.4365 8.67251C18.4065 8.61351 18.375 8.55551 18.343 8.49751L18.67 7.78002C18.6867 7.7442 18.6939 7.70467 18.6908 7.66526C18.6878 7.62585 18.6747 7.58788 18.6527 7.55502C18.6308 7.52215 18.6007 7.4955 18.5655 7.47764C18.5302 7.45977 18.4909 7.45129 18.4515 7.45302L17.662 7.48052C17.6211 7.42954 17.5794 7.3792 17.537 7.32952L17.7185 6.56003C17.7277 6.52167 17.7269 6.48159 17.7162 6.44362C17.7055 6.40564 17.6852 6.37105 17.6573 6.34316C17.6294 6.31526 17.5948 6.29499 17.5569 6.28429C17.5189 6.27359 17.4788 6.27281 17.4405 6.28203L16.6715 6.46303C16.6215 6.42103 16.5715 6.37953 16.52 6.33803L16.5475 5.54904C16.5492 5.50955 16.5407 5.47028 16.5229 5.43503C16.505 5.39977 16.4783 5.36971 16.4455 5.34775C16.4126 5.32579 16.3746 5.31267 16.3352 5.30965C16.2958 5.30664 16.2563 5.31383 16.2205 5.33054L15.503 5.65754C15.445 5.62551 15.3867 5.59418 15.328 5.56354L15.2015 4.78555C15.1952 4.74669 15.1791 4.71008 15.1546 4.6792C15.1302 4.64833 15.0983 4.6242 15.0619 4.60913C15.0256 4.59405 14.9859 4.58851 14.9468 4.59305C14.9077 4.59759 14.8704 4.61205 14.8385 4.63505L14.1985 5.09504C14.1354 5.075 14.0721 5.05583 14.0085 5.03755L13.7325 4.29955C13.7189 4.26253 13.696 4.22962 13.666 4.20398C13.636 4.17833 13.6 4.16081 13.5613 4.15308C13.5226 4.14536 13.4826 4.14769 13.4451 4.15985C13.4076 4.17201 13.3738 4.1936 13.347 4.22255L12.8085 4.80055C12.7435 4.79355 12.6785 4.78655 12.613 4.78155L12.197 4.10955C12.1763 4.07606 12.1474 4.04841 12.113 4.02924C12.0786 4.01006 12.0399 4 12.0005 4C11.9611 4 11.9224 4.01006 11.888 4.02924C11.8536 4.04841 11.8247 4.07606 11.804 4.10955L11.388 4.78155C11.323 4.78655 11.2575 4.79355 11.1925 4.80055L10.654 4.22305C10.6271 4.19449 10.5933 4.17323 10.5559 4.16128C10.5185 4.14932 10.4786 4.14706 10.4401 4.1547C10.4016 4.16235 10.3656 4.17965 10.3356 4.20498C10.3056 4.23032 10.2825 4.26286 10.2685 4.29955L9.99251 5.03755C9.92852 5.05605 9.86502 5.07554 9.80252 5.09554L9.16252 4.63505C9.13068 4.61164 9.09334 4.59684 9.05412 4.59205C9.01489 4.58727 8.97509 4.59268 8.93856 4.60776C8.90203 4.62283 8.87 4.64706 8.84556 4.67812C8.82112 4.70917 8.80509 4.746 8.79902 4.78505L8.67202 5.56354C8.61352 5.59404 8.55552 5.62554 8.49702 5.65754L7.78003 5.33054C7.74425 5.31386 7.70477 5.30667 7.6654 5.30966C7.62604 5.31265 7.5881 5.32572 7.55525 5.34762C7.5224 5.36952 7.49574 5.39951 7.47784 5.4347C7.45994 5.46989 7.45139 5.50909 7.45303 5.54854L7.48053 6.33853C7.42953 6.37953 7.37903 6.42103 7.32903 6.46353L6.56004 6.28203C6.5217 6.27314 6.48173 6.27415 6.4439 6.28497C6.40606 6.29578 6.37159 6.31604 6.34374 6.34384C6.31588 6.37164 6.29556 6.40607 6.28468 6.44389C6.2738 6.48171 6.27272 6.52168 6.28154 6.56003L6.46304 7.32952C6.42054 7.37952 6.37904 7.42952 6.33804 7.48052L5.54855 7.45302C5.50915 7.45158 5.47004 7.46024 5.43494 7.47818C5.39984 7.49612 5.36992 7.52275 5.34801 7.55553C5.32611 7.5883 5.31296 7.62614 5.30982 7.66543C5.30667 7.70473 5.31364 7.74417 5.33005 7.78002L5.65704 8.49801C5.62554 8.55551 5.59405 8.61351 5.56355 8.67301L4.78555 8.79901C4.74661 8.80526 4.70991 8.82139 4.67897 8.84584C4.64802 8.8703 4.62385 8.90227 4.60876 8.93871C4.59367 8.97516 4.58817 9.01486 4.59277 9.05403C4.59737 9.09321 4.61193 9.13055 4.63505 9.1625L5.09505 9.802C5.07505 9.865 5.05605 9.9285 5.03755 9.99199L4.29955 10.2685C4.26267 10.2823 4.22992 10.3053 4.20441 10.3353C4.17891 10.3653 4.1615 10.4013 4.15383 10.4399C4.14617 10.4785 4.1485 10.5185 4.16062 10.5559C4.17273 10.5934 4.19423 10.6272 4.22305 10.654L4.80055 11.1925C4.79305 11.2575 4.78655 11.3225 4.78105 11.388L4.10955 11.804C4.07606 11.8247 4.04841 11.8536 4.02924 11.888C4.01006 11.9224 4 11.9611 4 12.0005C4 12.0398 4.01006 12.0786 4.02924 12.113C4.04841 12.1474 4.07606 12.1763 4.10955 12.197L4.78105 12.6125C4.78655 12.678 4.79305 12.7435 4.80055 12.8085L4.22305 13.347C4.19423 13.3738 4.17273 13.4075 4.16062 13.445C4.1485 13.4825 4.14617 13.5224 4.15383 13.561C4.1615 13.5997 4.17891 13.6357 4.20441 13.6657C4.22992 13.6957 4.26267 13.7187 4.29955 13.7325L5.03755 14.0085C5.05605 14.0725 5.07555 14.136 5.09555 14.1985L4.63505 14.8384C4.61205 14.8704 4.59759 14.9077 4.59305 14.9468C4.58852 14.9859 4.59405 15.0255 4.60913 15.0619C4.62421 15.0983 4.64833 15.1302 4.6792 15.1546C4.71008 15.179 4.74669 15.1951 4.78555 15.2014L5.56355 15.3279C5.59405 15.3869 5.62504 15.4454 5.65754 15.5029L5.33005 16.2204C5.31364 16.2563 5.30667 16.2957 5.30982 16.335C5.31296 16.3743 5.32611 16.4121 5.34801 16.4449C5.36992 16.4777 5.39984 16.5043 5.43494 16.5223C5.47004 16.5402 5.50915 16.5489 5.54855 16.5474L6.33804 16.5199C6.37904 16.5714 6.42054 16.6214 6.46304 16.6714L6.28154 17.4409C6.27224 17.4793 6.27298 17.5195 6.2837 17.5575C6.29441 17.5955 6.31474 17.6301 6.34273 17.658C6.37071 17.6859 6.40541 17.7061 6.44347 17.7167C6.48153 17.7273 6.52168 17.7279 6.56004 17.7184L7.32903 17.5374C7.37903 17.5799 7.42953 17.6209 7.48053 17.6619L7.45303 18.4519C7.45154 18.4913 7.46017 18.5304 7.47811 18.5655C7.49605 18.6007 7.5227 18.6306 7.55551 18.6524C7.58831 18.6743 7.62618 18.6874 7.66549 18.6905C7.7048 18.6935 7.74424 18.6864 7.78003 18.6699L8.49753 18.3429C8.55502 18.3749 8.61352 18.4064 8.67252 18.4369L8.79902 19.2144C8.80508 19.2535 8.82108 19.2903 8.84548 19.3214C8.86988 19.3525 8.90187 19.3768 8.93838 19.392C8.97488 19.4071 9.01467 19.4126 9.05392 19.408C9.09317 19.4033 9.13057 19.3887 9.16252 19.3654L9.80202 18.9044C9.86502 18.9244 9.92851 18.9444 9.99201 18.9624L10.268 19.7004C10.2816 19.7375 10.3044 19.7704 10.3344 19.7961C10.3644 19.8218 10.4005 19.8393 10.4393 19.847C10.478 19.8547 10.518 19.8523 10.5556 19.84C10.5931 19.8277 10.6268 19.806 10.6535 19.7769L11.1925 19.1994C11.2575 19.2069 11.3225 19.2134 11.388 19.2194L11.804 19.8909C11.8248 19.9243 11.8537 19.9518 11.8881 19.9709C11.9225 19.99 11.9612 20 12.0005 20C12.0398 20 12.0785 19.99 12.1129 19.9709C12.1473 19.9518 12.1762 19.9243 12.197 19.8909L12.6125 19.2189C12.678 19.2134 12.7435 19.2069 12.8085 19.1994L13.347 19.7769C13.3737 19.8059 13.4074 19.8275 13.4449 19.8397C13.4823 19.8519 13.5223 19.8543 13.5609 19.8466C13.5996 19.8389 13.6356 19.8215 13.6656 19.7959C13.6955 19.7702 13.7184 19.7374 13.732 19.7004L14.0085 18.9624C14.072 18.9444 14.1355 18.9244 14.1985 18.9044L14.8385 19.3654C14.8705 19.3883 14.9078 19.4026 14.9469 19.407C14.986 19.4115 15.0256 19.4059 15.0619 19.3908C15.0983 19.3756 15.1301 19.3515 15.1546 19.3207C15.179 19.2898 15.1951 19.2532 15.2015 19.2144L15.3285 18.4364C15.387 18.4064 15.445 18.3744 15.503 18.3429L16.2205 18.6699C16.2563 18.6865 16.2958 18.6935 16.3351 18.6905C16.3745 18.6874 16.4124 18.6742 16.4452 18.6523C16.478 18.6304 16.5047 18.6004 16.5226 18.5652C16.5405 18.53 16.5491 18.4908 16.5475 18.4514L16.52 17.6614C16.571 17.6214 16.6215 17.5799 16.6715 17.5374L17.4405 17.7184C17.4788 17.7278 17.5189 17.7271 17.5569 17.7164C17.5949 17.7058 17.6295 17.6856 17.6574 17.6577C17.6853 17.6299 17.7056 17.5953 17.7163 17.5573C17.727 17.5193 17.7277 17.4793 17.7185 17.4409L17.5375 16.6714C17.5795 16.6214 17.621 16.5714 17.662 16.5199L18.452 16.5474C18.4914 16.5491 18.5306 16.5405 18.5658 16.5226C18.601 16.5047 18.631 16.4781 18.6529 16.4452C18.6748 16.4124 18.6878 16.3744 18.6908 16.3351C18.6938 16.2957 18.6866 16.2562 18.67 16.2204L18.343 15.5029C18.375 15.4454 18.406 15.3869 18.4365 15.3279L19.2145 15.2014C19.2535 15.1954 19.2903 15.1794 19.3213 15.155C19.3524 15.1307 19.3766 15.0987 19.3917 15.0622C19.4068 15.0258 19.4123 14.986 19.4076 14.9468C19.4029 14.9076 19.3882 14.8703 19.3649 14.8384L18.905 14.1985C18.9248 14.1353 18.944 14.072 18.9625 14.0085L19.7004 13.7325C19.7375 13.7189 19.7705 13.696 19.7962 13.666C19.8219 13.636 19.8394 13.5999 19.8471 13.5612C19.8548 13.5225 19.8523 13.4824 19.8401 13.4449C19.8278 13.4074 19.806 13.3737 19.7769 13.347L19.1994 12.8085C19.2064 12.7435 19.213 12.678 19.219 12.6125L19.8904 12.197C19.9239 12.1763 19.9516 12.1474 19.9708 12.113C19.9899 12.0786 20 12.0398 20 12.0005C20 11.9611 19.9899 11.9224 19.9708 11.888C19.9516 11.8536 19.9239 11.8247 19.8904 11.804ZM15.395 17.3759C15.2745 17.3466 15.1702 17.2715 15.1043 17.1665C15.0383 17.0614 15.016 16.9348 15.042 16.8136C15.068 16.6924 15.1403 16.5861 15.2434 16.5173C15.3466 16.4485 15.4726 16.4227 15.5945 16.4454C15.7154 16.4743 15.8203 16.5494 15.8866 16.6546C15.9529 16.7599 15.9753 16.8868 15.9492 17.0084C15.9231 17.13 15.8504 17.2365 15.7467 17.3052C15.6431 17.3739 15.5171 17.3993 15.395 17.3759ZM15.1665 15.8324C15.1109 15.8205 15.0535 15.8197 14.9975 15.83C14.9416 15.8403 14.8882 15.8615 14.8405 15.8925C14.7928 15.9234 14.7516 15.9634 14.7193 16.0102C14.6871 16.0571 14.6644 16.1098 14.6525 16.1654L14.414 17.2784C13.6557 17.6223 12.8326 17.7996 12 17.7984C11.12 17.7984 10.285 17.6034 9.53552 17.2549L9.29702 16.1424C9.2852 16.0868 9.26252 16.034 9.23028 15.9871C9.19805 15.9402 9.15688 15.9001 9.10915 15.8691C9.06141 15.8382 9.00804 15.8169 8.95208 15.8066C8.89612 15.7962 8.83867 15.797 8.78302 15.8089L7.80053 16.0199C7.61797 15.8321 7.44825 15.6321 7.29253 15.4214H12.073C12.127 15.4214 12.163 15.4114 12.163 15.3624V13.6715C12.163 13.622 12.127 13.6125 12.073 13.6125H10.675V12.54H12.187C12.325 12.54 12.925 12.5795 13.117 13.3465C13.177 13.582 13.309 14.3494 13.399 14.5949C13.489 14.8704 13.855 15.4209 14.245 15.4209H16.627C16.656 15.4207 16.6849 15.4178 16.7135 15.4124C16.5485 15.6369 16.367 15.8494 16.172 16.0474L15.1665 15.8324ZM8.55502 17.3524C8.43312 17.3751 8.30718 17.3493 8.204 17.2806C8.10081 17.2118 8.02854 17.1055 8.00254 16.9842C7.97655 16.863 7.99889 16.7364 8.06481 16.6314C8.13074 16.5264 8.23504 16.4512 8.35553 16.4219C8.41666 16.4089 8.47976 16.408 8.54124 16.4193C8.60271 16.4306 8.66136 16.4539 8.71382 16.4879C8.76629 16.5219 8.81155 16.5659 8.84701 16.6174C8.88248 16.6688 8.90746 16.7268 8.92052 16.7879C8.93359 16.8491 8.93449 16.9122 8.92317 16.9736C8.91184 17.0351 8.88852 17.0938 8.85454 17.1462C8.82055 17.1987 8.77656 17.2439 8.72509 17.2794C8.67361 17.3149 8.61615 17.3394 8.55502 17.3524ZM6.74154 9.99899C6.76685 10.056 6.78068 10.1175 6.78224 10.1798C6.78381 10.2422 6.77307 10.3043 6.75064 10.3625C6.72822 10.4207 6.69454 10.474 6.65155 10.5192C6.60855 10.5644 6.55706 10.6007 6.50004 10.626C6.44301 10.6513 6.38156 10.6651 6.31919 10.6667C6.25682 10.6683 6.19475 10.6575 6.13653 10.6351C6.0783 10.6127 6.02507 10.579 5.97986 10.536C5.93465 10.493 5.89836 10.4415 5.87304 10.3845C5.82192 10.2693 5.81865 10.1386 5.86394 10.021C5.90923 9.90339 5.99937 9.80862 6.11454 9.7575C6.22971 9.70638 6.36047 9.7031 6.47805 9.74839C6.59564 9.79368 6.69042 9.88383 6.74154 9.99899ZM6.18404 11.3205L7.20753 10.8655C7.31257 10.8187 7.39473 10.7321 7.43598 10.6248C7.47723 10.5174 7.47419 10.3981 7.42753 10.293L7.21703 9.8165H8.04603V13.5535H6.37354C6.16707 12.8283 6.10305 12.0701 6.18404 11.3205ZM10.6755 10.9575V9.856H12.6495C12.7515 9.856 13.3695 9.97399 13.3695 10.436C13.3695 10.8195 12.8955 10.9575 12.5055 10.9575H10.6755ZM17.85 11.949C17.85 12.095 17.8445 12.2395 17.8335 12.383H17.2335C17.1735 12.383 17.1495 12.423 17.1495 12.4815V12.757C17.1495 13.406 16.7835 13.547 16.463 13.583C16.158 13.617 15.819 13.455 15.7775 13.268C15.5975 12.2555 15.2975 12.039 14.8235 11.665C15.4115 11.292 16.0235 10.741 16.0235 10.0035C16.0235 9.207 15.4775 8.70551 15.1055 8.45951C14.5835 8.11551 14.0055 8.04651 13.8495 8.04651H7.64253C8.50018 7.08726 9.65054 6.43799 10.915 6.19953L11.6465 6.96703C11.812 7.14002 12.0865 7.14702 12.259 6.98103L13.078 6.19803C13.9123 6.35469 14.7026 6.6909 15.3941 7.18335C16.0855 7.67581 16.6616 8.31275 17.0825 9.05L16.522 10.316C16.4754 10.4211 16.4725 10.5404 16.5137 10.6477C16.555 10.755 16.637 10.8416 16.742 10.8885L17.8215 11.3675C17.84 11.559 17.85 11.7525 17.85 11.949ZM11.647 5.54654C11.6921 5.5034 11.7453 5.46957 11.8035 5.447C11.8617 5.42443 11.9238 5.41355 11.9862 5.41499C12.0486 5.41643 12.1101 5.43016 12.1672 5.45539C12.2243 5.48062 12.2759 5.51686 12.319 5.56204C12.3621 5.60728 12.3959 5.66057 12.4185 5.71888C12.441 5.77718 12.4519 5.83936 12.4504 5.90185C12.4489 5.96434 12.4351 6.02593 12.4098 6.0831C12.3845 6.14027 12.3482 6.1919 12.303 6.23503C12.2579 6.27813 12.2047 6.3119 12.1465 6.33443C12.0884 6.35695 12.0263 6.36778 11.9639 6.36629C11.9016 6.36481 11.8401 6.35104 11.7831 6.32577C11.726 6.3005 11.6745 6.26423 11.6315 6.21903C11.5446 6.1277 11.4974 6.00563 11.5003 5.87958C11.5032 5.75354 11.556 5.63378 11.647 5.54654ZM17.2085 10.022C17.2597 9.90683 17.3545 9.81671 17.4721 9.77146C17.5898 9.72622 17.7205 9.72956 17.8357 9.78075C17.9509 9.83193 18.041 9.92677 18.0862 10.0444C18.1315 10.162 18.1281 10.2928 18.077 10.408C18.0516 10.465 18.0153 10.5165 17.97 10.5595C17.9248 10.6025 17.8715 10.6361 17.8133 10.6585C17.7551 10.6809 17.693 10.6916 17.6306 10.69C17.5682 10.6884 17.5067 10.6746 17.4497 10.6492C17.3927 10.6239 17.3412 10.5876 17.2982 10.5423C17.2552 10.4971 17.2216 10.4438 17.1992 10.3856C17.1768 10.3273 17.1661 10.2652 17.1677 10.2029C17.1693 10.1405 17.1831 10.079 17.2085 10.022Z"
         fill="currentColor"
       ></path>
     </svg>
    }
    href="/send-with-rust"
  />

  <Card
    title="Elixir Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       fill="currentcolor"
       height="40"
       viewBox="0 0 16 16"
       width="40"
       xmlns="http://www.w3.org/2000/svg"
     >
       <path
         clipRule="evenodd"
         d="M8.95169 0.940326L8.97457 0.208954L8.28489 0.45342C7.07051 0.883867 5.99667 2.09398 5.02015 3.89315C4.30013 5.21975 3.4379 6.88892 3.09609 8.62234C2.75009 10.377 2.93069 12.2387 4.34004 13.8814C4.98953 14.6384 5.86559 15.2573 6.9497 15.5007C8.03868 15.7451 9.28923 15.5995 10.6621 14.9092C11.8527 14.3106 12.5834 13.1706 12.9194 12.0293C13.2515 10.9011 13.2298 9.66104 12.7781 8.8081C12.0293 7.39378 11.2718 6.47993 10.6584 5.73986L10.6584 5.73985L10.5548 5.61473C9.92016 4.84726 9.50366 4.30289 9.32552 3.53488C9.05065 2.34986 8.93437 1.49391 8.95169 0.940326ZM5.89904 4.37018C6.61644 3.04841 7.31909 2.19545 7.9882 1.72834C8.04627 2.2973 8.16963 2.97725 8.35138 3.76083C8.58889 4.78478 9.15631 5.49275 9.78417 6.252L9.88372 6.37222C10.4932 7.10777 11.1945 7.95414 11.8944 9.27603C12.1844 9.82388 12.2463 10.7747 11.9601 11.7469C11.6777 12.7059 11.0882 13.5757 10.2129 14.0158C9.01413 14.6185 7.99909 14.7113 7.16869 14.5249C6.33341 14.3375 5.6363 13.8565 5.09899 13.2303C3.943 11.8829 3.77243 10.3613 4.07719 8.81581C4.38614 7.24906 5.17662 5.70118 5.89904 4.37018ZM4.675 10.5227C4.81738 11.1996 5.12501 11.8571 5.64824 12.467C6.32801 13.2593 7.33535 13.8556 8.61589 13.7953L8.56887 12.7964C7.65729 12.8393 6.92974 12.4249 6.40719 11.8159C5.99411 11.3344 5.76156 10.8302 5.65359 10.3169L4.675 10.5227Z"
         fillRule="evenodd"
       ></path>
     </svg>
    }
    href="/send-with-elixir"
  />

  <Card
    title="Java Quickstart"
    icon={
     <svg
       className="h-6 w-6"
       width="40"
       height="40"
       viewBox="0 0 40 40"
       fill="currentcolor"
       stroke="currentcolor"
       xmlns="http://www.w3.org/2000/svg"
     >
       <g clipPath="url(#clip0_1059_8989)">
         <path
           d="M13.9627 29.3125C13.9627 29.3125 12.0795 30.5902 15.3029 31.0226C19.208 31.5424 21.2038 31.4679 25.5072 30.5176C25.5072 30.5176 26.6387 31.3453 28.2188 32.0622C18.5716 36.8862 6.38534 31.7828 13.9627 29.3125Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M13.9194 24.5625C13.9194 24.5625 12.0673 25.9582 14.8958 26.2561C18.5535 26.6403 21.442 26.6717 26.4403 25.6918C26.4403 25.6918 27.1317 26.4054 28.2187 26.7956C17.9915 29.8403 6.60026 27.0357 13.9194 24.5625Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M21.3193 16.5103C22.86 18.2484 20.9146 19.8125 20.9146 19.8125C20.9146 19.8125 24.8265 17.8336 23.0299 15.3555C21.352 13.0446 20.0652 11.8964 27.0312 7.9375C27.0312 7.9375 16.0969 10.6135 21.3193 16.5103Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M34.4522 33.2528C34.4522 33.2528 35.7597 34.2935 33.0122 35.0986C27.7878 36.6275 11.2676 37.0892 6.67835 35.1596C5.02864 34.4663 8.12232 33.5041 9.09547 33.3022C10.1104 33.0896 10.6904 33.1293 10.6904 33.1293C8.8557 31.8807 -1.16807 35.5808 5.59877 36.6404C24.0529 39.5315 39.239 35.3386 34.4522 33.2528Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M15.145 19.8191C15.145 19.8191 6.55287 21.5665 12.1023 22.201C14.4455 22.4697 19.1165 22.4089 23.4674 22.0967C27.0233 21.8399 30.5938 21.2938 30.5938 21.2938C30.5938 21.2938 29.3399 21.7536 28.4328 22.284C19.7076 24.2488 2.85216 23.3347 7.70463 21.3249C11.8084 19.6264 15.145 19.8191 15.145 19.8191Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M30.7628 27.9175C39.1741 23.7999 35.285 19.8429 32.5705 20.376C31.9052 20.5065 31.6085 20.6195 31.6085 20.6195C31.6085 20.6195 31.8555 20.255 32.3273 20.0973C37.6974 18.3187 41.8274 25.3429 30.5938 28.125C30.5938 28.125 30.7239 28.0155 30.7628 27.9175Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M22.6092 2C22.6092 2 25.9593 5.1498 19.4318 9.9933C14.1975 13.8786 18.2382 16.0939 19.4297 18.625C16.3743 16.034 14.132 13.7531 15.6363 11.6302C17.8442 8.51409 23.9609 7.00326 22.6092 2Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
         <path
           d="M15.8835 39.8818C24.3732 40.3152 37.41 39.6413 37.7187 36.4375C37.7187 36.4375 37.1252 37.652 30.7025 38.6166C23.4564 39.7042 14.5194 39.5772 9.21875 38.8802C9.21875 38.8802 10.3039 39.5964 15.8835 39.8818Z"
           strokeWidth="0.2"
           strokeLinejoin="round"
         />
       </g>
     </svg>
    }
    href="/send-with-java"
  />
</CardGroup>

## Explore

Discover the full range of features and capabilities.

<CardGroup cols={3}>
  <Card title="Emails" href="dashboard/emails">
    Visualize all the activity in your account.
  </Card>

  <Card title="Domains" href="dashboard/domains/introduction">
    Ensure deliverability of your emails.
  </Card>

  <Card title="Webhooks" href="/dashboard/webhooks">
    Notify your application about email events.
  </Card>
</CardGroup>


# Can I receive emails with Resend?

Resend does not offer the functionality to receive email but there are a few workarounds that could help.

You can't receive emails within Resend (yet), but you can [set a Reply To Address](api-reference/emails/send-email) (`reply_to`) on your email to direct any responses to a different location like an existing inbox, slack channel, etc.

Until we add email receiving within Resend, here are a few workarounds that could help:

*   **Sending to existing inbox**: You could set the `reply_to` as your personal email address. If any recipient replies to your email, it will be sent to the `reply_to` address. This could be a different address on the same domain, or a different domain entirely.
*   **Sending to Slack**: You could set the `reply_to` as a [channel email address in Slack](https://slack.com/help/articles/206819278-Send-emails-to-Slack). This will create a new message in slack with the contents of the reply.


# How can I delete my Resend account?

How to request your Resend account and data to be deleted.

To request your Resend account and data to be deleted, go to **Settings**, then select [**Team**](https://resend.com/settings/team).

Once you scroll down, you will see the **Request Account Deletion** button. Please note that this action is not reversible, so please request with caution.


# How can I join multiple teams?

A workaround for joining different teams.

Currently, we only support one team per email address. One workaround is using a +address to create a new account and join different teams. For example, [name@acme.com](mailto:name@acme.com) can be linked to one account, and [name+foo@acme.com](mailto:name+foo@acme.com) can be linked to another. Keep in mind that this workaround is limited to specific inbox providers, one being Gmail.

Please note that if you accept an invite to another team, you will join that team and leave behind all of your assets from the other team (domains, API keys, logs, etc.). If you need help migrating a domain to a specific team, please reach out to our [support](https://resend.com/help), and we can help you with this!


# How do Dedicated IPs work?

When are Dedicated IPs helpful, and how can they be requested.

## What is a Dedicated IP?

In email delivery, the sending IP address serves as a key identifier. Inbox Providers like Gmail track the reputation of these IPs based on the quality and quantity of emails sent from them, factoring this information into filtering and inbox placement decisions.

By default, all Resend users utilize our shared IPs, which are a collection of IPs shared across many senders. Optionally, you can purchase a dedicated IP pool so a range of IPs are exclusively assigned to your sending.

Resend goes one step further and exclusively provisions "Managed Dedicated IP Pools". These managed pools handle multiple delicate and time consuming aspects of dedicated IPs:

*   **Automatic warmup**: New IPs have no reputation and are therefore under scrutiny by inbox providers. We carefully migrate your sending over from the shared pool to your dedicated pool.
*   **Automatic scaling**: IPs can only send at a certain rate based on the specifications of each inbox provider. We scale your pool dynamically based on the inbox provider feedback, without you lifting a finger.
*   **Continuous monitoring**: Resend continuously monitors the reputation and performance of your dedicated IPs.
*   **Fully dedicated**: You can segregate your emails from sending on shared pools to reduce risk of "noisy neighbors".

<Note>
  Resend only provisions Managed Dedicated IP Pools, but we will refer to them
  as **Dedicated IPs** in this article to be succinct.
</Note>

## When are Dedicated IPs helpful?

Historically, Dedicated IPs were seen as the primary ingredient to great deliverability. This is not true anymore as Inbox Providers have incorporated dozens of other factors like sending history, domain reputation, and sending feedback (bounces and complaints) more predominantly than IP reputation.

Though Dedicated IPs are not a deliverability silver bullet, they maintain a very helpful benefit: **removing risk of noisy neighbors**.

There is power in numbers, and for many senders it can be very helpful to leverage the positive reputation of other senders in an IP pool. For some senders though, they want to maintain their own IP reputation without any chance of being impacted, positively or negatively, by other senders. For them, Dedicated IPs are a helpful solution.

## When are Dedicated IPs not helpful?

Dedicated IPs can be very helpful, but there are some situations where they can actually hinder your ability to reach the inbox. If any of these situations match your use case, Dedicated IPs may hinder more than help:

*   **Low email volume**: Sending less than 30k emails a month may not be enough to keep the IPs warm.
*   **Inconsistent sending**: Sudden changes in email volume can hurt your IP reputation.
*   **Poor email practices**: A Dedicated IP simply exposes your sending behavior even more.
*   **New sender**: If you're just starting out and have no sending history.
*   **IP Allowlisting**: Resend does not expose the IPs included in your dedicated pool.

## How does IP warmup work?

With Resend's Managed Dedicated IP Pools, the warmup process is handled automatically:

1.  **Automatic scaling**: Add or remove IP addresses based on your sending volume.
2.  **Gradual increase**: Gradually increase the volume of emails sent through new IPs over time.
3.  **Traffic distribution**: During warmup, traffic is distributed across shared and dedicated IPs.
4.  **Reputation monitoring**: Continuously monitor the reputation of your dedicated IPs.
5.  **Adaptive warmup**: Adapt the warmup process to your sending patterns.

Often IP warmup is a highly manual process and requires great care if you don't want a deliverability degradation in the process. With this automatic warmup process, we handle that for you so you can simply focus on sending.

<Note>
  Because Managed Dedicated IP Pools are dynamically scaled, **we do not expose
  the list of IPs** in your dedicated pool.
</Note>

## How to request a Dedicated IP

You can request a Dedicated IP by [chatting with support](https://resend.com/help).

**We will request the following information**:

*   What types of emails are you sending?
*   How many emails are you sending per day and month on average?
*   Is your sending consistent every day, or do you send in bursts?
*   Which domains do you want included in your Dedicated IP?

Before we can provision a Dedicated IP, **we also require** that:

*   Your domains are in the same region (Dedicated IPs are provisioned per region).
*   Your sending volume exceeds 500 emails sent per day.
*   You already have an active Transactional Scale or Marketing Pro subscription.
*   All domains you want added to the Dedicated IP are already verified on Resend.


# How do I avoid conflicts with my MX records?

Learn how to avoid conflicts with your existing MX records when setting up a Resend domain.

## What is an MX record?

MX (Mail Exchanger) records specify where incoming mail should be delivered on behalf of a domain. Every MX value has a unique priority (also known as preference) value. The lower the number, the higher the priority.

Resend requires that you setup an MX record on send.yourdomain.com to establish a return-path for bounce/complaint reports from Inbox Providers. We set this return path in the email headers of every email you send through Resend.

## Won't this conflict with my existing Inbox Provider?

Let's look at an example. Say you're using G Suite for your email. You'll have an MX record that looks something like this:

```
resend.com     MX    1 alt3.aspmx.l.google.com.
```

The records specifies that incoming mail to any address on the `@resend.com` domain should be delivered to the google servers.

Now, let's say you want to use Resend to send emails from `@yourdomain.com`. You'll need to add an MX record for `send.yourdomain.com` that looks something like this:

```
send.resend.com     MX    10 feedback-smtp.us-east-1.amazonses.com
```

Two things to note here:

*   **The MX record is for `send.yourdomain.com`, not `yourdomain.com`**. MX records only impact the subdomain they are associated to, so the Resend MX record will not affect your existing records on the root domain.
*   **The priority value is 10**. Though we suggest a priority of 10, this can be changed to lower or higher as needed to avoid conflicts.

## Solving common conflicts

<AccordionGroup>
  <Accordion title="Conflicts with existing records">
    If you already have a MX record set for `send.yourdomain.com`, you will need to remove it before adding the Resend MX record.

    If you need to keep the existing record, you can add a subdomain to your domain (e.g. `sub.yourdomain.com`) which will move the Resend MX location to `send.sub.yourdomain.com`.
  </Accordion>

  <Accordion title="Conflicts with existing priority">
    Each MX should have a unique priority value. We suggest using 10 for your MX record on `send.yourdomain.com`, but you can use a higher number if 10 is already in use.
  </Accordion>
</AccordionGroup>


# How do I avoid Gmail's spam folder?

Learn how to improve inbox placement in Gmail.

<Note>
  This guide is adapted from Google's article to [Prevent mail from being
  blocked or sent to
  spam](https://support.google.com/mail/answer/81126?hl=en\&vid=1-635789122382665739-3305764358\&sjid=4594872399309427672-NA#thirdparty)
</Note>

## Authenticate Your Email

All communication is built on trust, and email is no different. When you send an email, you want to be sure that the recipient (and Gmail) knows who you are and that you are a legitimate sender. Email authentication is a way to prove that an email is really from you. It also helps to prevent your email from being spoofed or forged.

| Authentication                    | Requires Setup | Purpose                                                      |
| --------------------------------- | -------------- | ------------------------------------------------------------ |
| **SPF**                           | No             | Proves you are allowed to send from this domain              |
| **DKIM**                          | No             | Proves your email originated from you                        |
| [DMARC](/dashboard/domains/dmarc) | Yes            | Proves you own the domain and instructs how to handle spoofs |
| [BIMI](/dashboard/domains/bimi)   | Yes            | Proves you are the brand you say you are                     |

**SPF** and **DKIM** are baseline requirements for all sending which is why both are automatically setup when you verify your domain with Resend. [DMARC](/dashboard/domains/dmarc) and [BIMI](/dashboard/domains/bimi) are both additional authentication methods that can build trust and further improve inbox placement.

**Action Items**

1.  [Setup DMARC](/dashboard/domains/dmarc) for your domain
2.  [Setup BIMI](/dashboard/domains/bimi) for your domain

## Legitimize Your Domain

Gmail is using many methods to identify who you are as a sender, and one way they do that is by looking at your domain. You should make sure that the domain you send with is the same domain where your website is hosted. If you send from `@example.com` but your website is hosted at `example.net`, Gmail won't be able to use your site to help legitimize you.

You can regularly check if your domain is listed as unsafe with [Google Safe Browsing](https://transparencyreport.google.com/safe-browsing/search?hl=en) to make sure Google isn't classifying your domain as suspicious.

**Action Items**

1.  Host your website at the domain that you send from (especially for new domains)
2.  Check if your domain is listed as unsafe with [Google Safe Browsing](https://transparencyreport.google.com/safe-browsing/search?hl=en)

## Manage your Mailing List

Gmail monitors your sending across all Gmail inboxes to see if recipients want to receive your emails. This is mainly measured by their engagement with your messages (opens, clicks, replies). If Gmail doesn't see this engagement, they will start to move your inbox placement towards promotional or even spam.

It would seem like adding open and click tracking would be ideal to gather this information, but this has been seen to negatively impact your inbox placement. Instead, focus on sending to recipients who want to receive your emails.

**Prevent sending to recipients who**:

*   Didn't ask to be sent to (opt-in)
*   Show no signs of engagement with your emails or product
*   Requested to be unsubscribed
*   Marked your emails as spam (complained)
*   Never received your email (bounced)

**Action Items**

1.  Make it easy to opt-out to your emails (including the [Unsubscribe Headers](https://resend.com/docs/dashboard/emails/add-unsubscribe-to-transactional-emails))
2.  Use [Webhooks](/dashboard/webhooks/introduction) to remove bounced or complained recipients from your list
3.  Use [Gmail's Postmaster Tool](https://support.google.com/mail/answer/9981691?sjid=4594872399309427672-NA\&visit_id=638259770782293948-1913697299\&rd=1) to monitor your spam reports

## Monitor Affiliate Marketers

Affiliate marketing programs offer rewards to companies or individuals that send visitors to your website. However, spammers can take advantage of these programs. If your brand is associated with marketing spam, other messages sent by you might be marked as spam.

We recommend you regularly monitor affiliates, and remove any affiliates that send spam.

**Action Items**

1.  Monitor your affiliate marketers for any spam

## Make Content People Want to Read

Trust is not only built with the domain, but also in the message. Sending content that people want to read and that is not misleading will help build trust with Gmail.

A few good rules for content:

*   Less is more (keep it simple and to the point)
*   Plain text over complex HTML
*   Links should be visible and match the sending domain
*   No content should be hidden or manipulative

**Action Items**

1.  Reduce and simplify your email content
2.  Make sure your links are using your sending domain

## Establish Sending Patterns

This is especially true for new domains since Gmail doesn't have any history of trust. Sending a large volume of emails from a new domain will likely result in poor inbox placement. Instead, start small and build up your sending volume over time.

A great way to start is by sending regular person-to-person email with your gmail account. These messages will have high engagement and built trust quickly, which will carry over when you start integrating with a sending service like Resend.

It can also be very helpful to segment your sending by sending address to give Gmail more indication of what type of sending you are doing. This allows Gmail to place your emails in the correct inbox tab (Primary, Promotions, etc.).

Some examples of helpful email addresses:

*   **Personal emails** should come from an address with a name like [marissa@domain.com](mailto:marissa@domain.com)
*   **Transactional emails** should come from an address like [notifications@domain.com](mailto:notifications@domain.com)
*   **Marketing emails** should come from an address like [updates@domain.com](mailto:updates@domain.com).

**Action Items**

1.  Send emails from your gmail account before sending transactional
2.  Send transactional emails before sending marketing emails
3.  Choose dedicated sending addresses for each type of email

## Summary

Email deliverability is overwhelming. One way to simplify it is to think: **what would a phisher do?**

**Then do the opposite!**

Gmail's goal is to only show emails that their users want to see and malicious emails are at the very bottom of the list. Reverse engineer phishing sending habits and consider how you could prove to Gmail at each step that you clearly have no malicious intent.

<Info>Anything we missed? [Let us know](https://resend.com/help).</Info>


# How do I avoid Outlook's spam folder?

Learn how to improve inbox placement in Outlook.

<Note>
  This guide is adapted from Microsoft's article to [Improve your spam
  reputation](https://support.microsoft.com/en-us/office/sender-support-in-outlook-com-05875e8d-1950-4d89-a5c3-adc355d0d652)
</Note>

*   **Add your sender name**. Set your `from` like this: `"Name <name.domain.com>"`.

*   **Engage with your own email**. Send an email to yourself, open it, and reply to it.

*   **Add yourself as a contact**. See how to add contacts in [Outlook.com](https://support.microsoft.com/en-us/office/create-view-and-edit-contacts-and-contact-lists-in-outlook-com-5b909158-036e-4820-92f7-2a27f57b9f01).

*   **Ask your recipients to add you in their contacts**. This can be done in [Outlook](https://support.microsoft.com/en-us/office/add-recipients-of-my-email-messages-to-the-safe-senders-list-be1baea0-beab-4a30-b968-9004332336ce) or [outlook.com](https://support.microsoft.com/en-us/office/safe-senders-in-outlook-com-470d4ee6-e3b6-402b-8cd9-a6f00eda7339).

*   **Don't blast to a BCC list**. Send separate emails if you are sending to a large number of recipients.

*   **Prevent over sending**. Limits are impacted on historical engagements and sending volumes, but you should be hesitent to send too many emails at once. If you think this is an issue, reduce the frequency or volume.

*   **Send to engaged recipients**. Don't keep sending if there is no engagement from your recipients. This is especially true if a recipient has requested to unsubscribe or an address is bouncing.

*   **Limit use of HTML**. Keep emails as close to plain text as possible.


# How do I ensure sensitive data isn't stored on Resend?

Information on how we can help you protect your customer's information.

Teams on the Pro subscription plan have the ability to disable email storage on Resend. Contact our [support team](https://resend.com/help) and they can disable email storage for your team.


# How do I fix CORS issues?

Information on recommended options to avoid CORS errors when sending emails.

## Problem

It's common for people to hit CORS (Cross-Origin Resource Sharing) issues when using the Resend API. This error typically shows as:

```
Access to XMLHttpRequest at 'https://api.resend.com/emails'
from origin 'http://localhost:3000' has been blocked by CORS policy:
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
```

## Solution

Usually CORS errors happens when you're sending emails from the **client-side**.

We recommend you to send the emails on the **server-side** to not expose your API keys and avoid CORS issues.


# How do I maximize deliverability for Supabase Auth emails?

Everything you should do before you start sending authentication emails with Resend and Supabase.

<Note>
  If you haven't yet, [configure your own Supabase
  integration](https://resend.com/settings/integrations)!
</Note>

Below are **five steps to improve the deliverability of your authentication emails**.

## 1. Setup a custom domain on Supabase

By default, Supabase generates a `supabase.co` domain for your project, and uses that domain for the links in your authentication emails (e.g., verify email, reset password).

Once you are ready to go live, though, it is important to setup a custom domain. The key benefit here is to align the domains used in your `from` address and the links in your emails. Especially for something as sensitive as email verification and magic links, **giving confidence to the inbox providers that the origin of the email and the links in the body are the same** can be very impactful.

This changes your links from:

```
https://039357829384.supabase.co/auth/v1/{code}
```

To something like this:

```
https://auth.yourdomain.com/auth/v1/{code}
```

Supabase has a helpful guide for [Setting up a custom domain](https://supabase.com/docs/guides/platform/custom-domains).

## 2. Setup a dedicated subdomain

There are many benefits to using a subdomain vs your root domain for sending, one being that you can isolate the reputation of the subdomain from your root domain.

For authentication emails, using a subdomain is particularly helpful because it is a way to **signal your intention to the inbox provider**. For example, if you use `auth.yourdomain.com` for your authentication emails, you are communicating to the inbox provider that all emails from this subdomain are related to sending authentication emails.

This clarity is essential because it helps the inbox provider understand that this subdomain is not used for sending marketing emails, which are more likely to be marked as spam.

<Note>
  If you don't want a subdomain just for auth, you can also achieve this by
  establishing one subdomain for all your transactional emails (e.g.,
  `notifications.yourdomain.com`).
</Note>

To add a subdomain to Resend, you can [add it as a domain on the dashboard](https://resend.com/domains).

<img alt="Create auth subdomain" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/kb-create-auth-subdomain.png" />

## 3. Disable link and open tracking

Link and open tracking can be great for marketing emails but not for transactional emails. This kind of **tracking can actually hurt your deliverability**. Open tracking embeds a 1x1 pixel image in the email, and link tracking rewrites the links in the email to point to Resend's servers first. Both types can be seen as suspicious by the inbox provider and hurt your deliverability.

Also, Supabase has noted that link tracking is [known for corrupting verification links](https://supabase.com/docs/guides/platform/going-into-prod), making them unusable for your users.

You can disable link and open tracking by clicking on your domain and disabling at the bottom.

<img alt="Disable link and open tracking" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/kb-disable-tracking.png" />

## 4. Prepare for link scanners

Some inbox providers or enterprise systems have email scanners that run a `GET` request on all links in the body of the email. This type of scan can be problematic since Supabase Auth links are single-use.

To get around this problem, consider altering the email template to replace the original magic link with a link to a domain you control. The domain can present the user with a "Sign-in" button, which redirects the user to the original magic link URL when clicked.

## 5. Setup DMARC

Like our human relationships, email deliverability is built on trust. The more inboxes can trust your emails, your domain, and your sending, the more likely your emails will be delivered to the inbox. This makes [Email Authentication a critical pillar](https://resend.com/blog/email-authentication-a-developers-guide) in the journey to excellent deliverability.

That is where DMARC comes in. As the industry standard for email authentication, **DMARC is a way to tell the inbox provider that you are who you say you are**. It is a way to signal to the inbox provider that you are a legitimate sender and that your emails should be delivered to the inbox.

Following security best practices like DMARC will show your validity and authenticity.

<img alt="DMARC policy details" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/kb-dmarc.png" />

You can use our [DMARC setup guide to get started](/dashboard/domains/dmarc).


# How do I send with an avatar?

Learn how to show your avatar in the inbox of your recipients.

[Recent studies](https://www.businesswire.com/news/home/20210720005361/en/Red-Sift-and-Entrust-Survey-Showing-a-Logo-Positively-Affects-Consumer-Interaction-With-Emails-Open-Rates-Buying-Behavior-Brand-Recall-and-Confidence) are showing meaningful benefits of displaying your logo in the inbox:

*   Increases brand recall by 18%.
*   Improves open rate by 21%.
*   Boosts purchase likelihood by 34%.
*   Reinforces confidence in email by 90%.

![Email with an avatar](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/sender-avatar.png)

## Gmail

Follow these steps to add an avatar to your Gmail inbox:

1.  Go to your [Google Account Settings](https://myaccount.google.com/personal-info)
2.  Upload a profile picture

Avatars in Gmail only display in the mobile app (including in push notifications) and inside opened emails on desktop.

## Outlook

Follow these steps to add an avatar to your Outlook inbox:

1.  Go to your [Outlook Profile Settings](https://account.microsoft.com/profile/)
2.  Upload a profile picture

Avatars in Outlook only display in the mobile app and inside opened emails on desktop.

## Yahoo

Follow these steps to add an avatar to your Yahoo inbox:

1.  Go to your [Yahoo Account Setting](https://login.yahoo.com/account/personalinfo)
2.  Upload a profile picture

Avatars in Yahoo only display in the mobile app and inside an opened email on desktop.

## Apple Mail

Apple Mail does not support avatars. They rely on recipients to add images to contacts.

## Limitations

Almost every email provider has its own way of adding a profile picture to an inbox.

This means **you can only**:

1.  Add your avatar to a real inbox, limiting it only to that provider
2.  Send mail from the same address that you set the avatar on

The way around this is [BIMI (Brand Indicators for Message Identification)](/dashboard/domains/bimi). It is much more difficult to obtain, but supports by nearly all providers and allows you to send from any address on that domain.

<Note>
  Need assistance setting up BIMI? [We can help](https://resend.com/help).
</Note>


# Introduction

A collection of answers to frequently asked questions.

<CardGroup cols={1}>
  <Card title="Can I receive emails with Resend?" href="/knowledge-base/can-i-receive-emails-with-resend">
    Resend does not offer the functionality to receive email but there are a few
    workarounds that could help.
  </Card>

  <Card title="How can I join multiple teams?" href="/knowledge-base/how-can-i-join-multiple-teams">
    Learn how to join multiple teams in Resend.
  </Card>

  <Card title="How do Dedicated IPs Work?" href="/knowledge-base/how-do-dedicated-ips-work">
    Learn how Dedicated IPs work and how to request them.
  </Card>

  <Card title="How do I avoid conflicts with my MX records?" href="/knowledge-base/how-do-i-avoid-conflicting-with-my-mx-records">
    Learn how to avoid conflicts with your existing MX records when setting up a
    Resend domain.
  </Card>

  <Card title="How do I avoid Gmail's spam folder?" href="/knowledge-base/how-do-i-avoid-gmails-spam-folder">
    Learn how to improve inbox placement in Gmail.
  </Card>

  <Card title="How do I avoid Outlook's spam folder?" href="/knowledge-base/how-do-i-avoid-outlooks-spam-folder">
    Learn how to improve inbox placement in Outlook.
  </Card>

  <Card title="How do I ensure sensitive data isn't stored on Resend?" href="/knowledge-base/how-do-i-ensure-sensitive-data-isnt-stored-on-resend">
    Information on how we can help you protect your customer's information.
  </Card>

  <Card title="How do I fix CORS issues?" href="/knowledge-base/how-do-i-fix-cors-issues">
    Information on recommended options to avoid CORS errors when sending emails.
  </Card>

  <Card title="How do I maximize deliverability for Supabase Auth emails?" href="/knowledge-base/how-do-i-maximize-deliverability-for-supabase-auth-emails">
    Everything you should do before you start sending authentication emails with
    Resend and Supabase.
  </Card>

  <Card title="How do I send with an avatar?" href="/knowledge-base/how-do-i-send-with-an-avatar">
    Learn how to show your avatar in the inbox of your recipients.
  </Card>

  <Card title="Is it better to send emails from a subdomain or the root domain?" href="/knowledge-base/is-it-better-to-send-emails-from-a-subdomain-or-the-root-domain">
    Discover why sending emails from a subdomain can be better than using a root
    domain.
  </Card>

  <Card title="What if an email says delivered but the recipient hasn't received it?" href="/knowledge-base/what-if-an-email-says-delivered-but-the-recipient-has-not-received-it">
    Learn the steps to take when an email is delivered, but the recipient does not
    receive it.
  </Card>

  <Card title="What if my domain is not verifying?" href="/knowledge-base/what-if-my-domain-is-not-verifying">
    Learn what steps to take when your domain doesn't seem to verifying.
  </Card>

  <Card title="What is Resend Pricing?" href="/knowledge-base/what-is-resend-pricing">
    Learn more about Resend's pricing plans.
  </Card>

  <Card title="Why are my open rates not accurate?" href="/knowledge-base/why-are-my-open-rates-not-accurate">
    Learn why your open rate statistics are not accurate and what you can do about
    it.
  </Card>

  <Card title="How can I delete my Resend account?" href="/knowledge-base/how-can-i-delete-my-resend-account">
    Learn how to permanently delete your Resend account and data.
  </Card>

  <Card title="Should I add an unsubscribe link to all of my emails sent with Resend?" href="/knowledge-base/should-i-add-an-unsubscribe-link">
    Learn when to add unsubscribe links to your transactional and marketing
    emails.
  </Card>
</CardGroup>


# Is it better to send emails from a subdomain or the root domain?

Discover why sending emails from a subdomain can be better than using a root domain.

We recommend sending emails from a subdomain (`notifications.acme.com`) instead of your root/apex domain (`acme.com`).

There are **two main goals you should achieve with your domain setup**:

*   Reputation Isolation
*   Sending Purpose Transparency

## Reputation Isolation

Things happen. Maybe someone decides to DDOS your signup page and you get stuck sending tens of thousands of bounced verification emails to burner addresses. Or maybe a cold outreach campaign gets out of hand and your sending gets pegged as spam.

Whatever it is, you want to be consistently hedging your reputation. One way to do this is by not using your root domain. This allows you to quarantine a compromised subdomain if needed. If your root domain ends up with a jeopardized reputation, it can be a long road to recovery.

## Sending Purpose Transparency

All of us want all of our emails to go right to the top of the priority folder of the inbox, but the reality is, not all of our email should. A password reset email should have higher priority than a monthly product update. Inbox providers like Outlook and Gmail are constantly trying to triage incoming mail to put only the most important stuff in that priority spot, and move the rest towards Promotional or even Spam.

By segmenting your sending purposes by subdomain, you are giving Inbox Providers clear indication of how they should place your emails, which will build trust and confidence.

<Note>
  We cover this in depth in our [deliverability
  guide](/knowledge-base/how-do-i-avoid-gmails-spam-folder#establish-sending-patterns).
</Note>


# Should I add an unsubscribe link to all of my emails sent with Resend?

Learn best practices about using unsubscribe links.

Transactional emails are generally exempt from including an unsubscribe link. Unlike marketing emails, transactional emails serve a functional purpose, such as account confirmation, password resets, and order confirmations.

As a best practice, we recommend telling recipients how to opt out of receiving future email from you if the content is more related to nurturing relationships with your customers, rather than pragmatic, action-oriented emails.

Laws enforced by the FTC and GDPR prioritize giving recipients an easy way to give and withdraw their consent to recieving email marketing content. Additionally, not having an option for opting out of emails risks recipients complaining or marking the email as spam, which can hurt your reputation as a sender.

Here is more on how to [manually add and manage unsubscribe links](https://resend.com/docs/dashboard/emails/add-unsubscribe-to-transactional-emails). If you're using [Resend Broadcasts](https://resend.com/docs/dashboard/audiences/managing-unsubscribe-list), the unsubscribe headers are added automatically to your emails.


# What attachment types are not supported?

Learn which file attachment extensions are unsupported.

Resend accepts all file attachment types except for those in the following list.

|          |       |       |         |           |
| -------- | ----- | ----- | ------- | --------- |
| .adp     | .app  | .asp  | .bas    | .bat      |
| .cer     | .chm  | .cmd  | .com    | .cpl      |
| .crt     | .csh  | .der  | .exe    | .fxp      |
| .gadget  | .hlp  | .hta  | .inf    | .ins      |
| .isp     | .its  | .js   | .jse    | .ksh      |
| .lib     | .lnk  | .mad  | .maf    | .mag      |
| .mam     | .maq  | .mar  | .mas    | .mat      |
| .mau     | .mav  | .maw  | .mda    | .mdb      |
| .mde     | .mdt  | .mdw  | .mdz    | .msc      |
| .msh     | .msh1 | .msh2 | .mshxml | .msh1xml  |
| .msh2xml | .msi  | .msp  | .mst    | .ops      |
| .pcd     | .pif  | .plg  | .prf    | .prg      |
| .reg     | .scf  | .scr  | .sct    | .shb      |
| .shs     | .sys  | .ps1  | .ps1xml | .ps2      |
| .ps2xml  | .psc1 | .psc2 | .tmp    | .url      |
| .vb      | .vbe  | .vbs  | .vps    | .vsmacros |
| .vss     | .vst  | .vsw  | .vxd    | .ws       |
| .wsc     | .wsf  | .wsh  | .xnk    |           |


# What if an email says delivered but the recipient has not received it?

Learn the steps to take when an email is delivered, but the recipient does not receive it.

Some emails may be marked as `Delivered` but not reach the recipient's inbox due to various inbox sorting variables. This guide provides reasons for and advice on avoiding such issues.

## Why does this happen

When an email is sent, it is marked as `Delivered` once the recipient server accepts it with a `250 OK` response. However, the server can then direct the email to the inbox, queue it for later, route it to the spam folder, or even discard it. This is done by major inbox providers (e.g., Gmail, Yahoo, Outlook), as well as by IT departments and individual users who set up firewalls or filtering rules.

As a result, even though most legitimate emails should land in the intended inboxes, your message might end up in the spam/junk folder or, in rare cases, be deleted.

**Inbox Providers do not share any information on how the messages are later filtered.** Resend is only notified about the initial acceptance and marks the email as `Delivered`. Any subsequent events (e.g., open/click events, unsubscribes) require recipient engagement.

## How to avoid this

### If you are in contact with the user

The easiest way to solve this is by cooperating with the end user. If you have direct communication with the recipient, you can ask them to **check these places for your email**:

*   Corporate spam filters or firewalls
*   Personal inbox filtering
*   Promotional, spam, or deleted folders
*   Group inboxes or queues

If they find it, ask them to mark the email as `Not Spam` or add your domain to an allowlist.

### If you are not in contact with the user

Debugging without direct contact with the user is challenging. However, there are some optimizations that can **improve your chances of delivering to their inbox next time**:

*   [Configure DMARC](/dashboard/domains/dmarc) to build trust with the inbox provider
*   Warm up new domains slowly before sending large volumes
*   Change all links in your email to use your own domain (matching your sender domain)
*   Turn off open and click tracking
*   Reduce the number of images in your email
*   Improve wording to be succinct, clear, and avoid spammy words

We have an [extensive but practical deliverability guide](/knowledge-base/how-do-i-avoid-gmails-spam-folder) that covers these topics in more detail.


# What if my domain is not verifying?

Learn what steps to take when your domain doesn't seem to verifying.

Verifying a domain involves a few steps:

1.  Add your domain to Resend
2.  Start verifying your Domain
3.  Add the records to your DNS provider
4.  Wait for DNS propagation

When this process is completed correctly, your domain will probably verify within 15 minutes of you adding the DNS records.

So what if your domain isn't verifying?

<Tip>
  If your are having any conflict issues with the `MX` records, [checkout this
  guide](/knowledge-base/how-do-i-avoid-conflicting-with-my-mx-records).
</Tip>

## Confirm your DNS records are correct

Usually when a domain doesn't verify, it is because the DNS records were not added correctly.

When you add a record to your DNS provider, it will propagate it to a public registry. This allows our system to confirm the correct records are present to prove you own the domain. This also means you can ping your registry to see what we are seeing.

You'll notice that you needed to add records for subdomains (`send.yourdomain.com` and `resend._domainkey.yourdomain.com`). We can then ping those domains to check for which records are present.

<AccordionGroup>
  <Accordion title="Check your records in the browser">
    Tools like [easydmarc.com](https://easydmarc.com) allow you to check your DNS records in the browser.

    *   [Check send.yourdomain.com](https://easydmarc.com/tools/multi-record-checker?domain=send.yourdomain.com\&dns_type=mx\&dns_type=txt)
    *   [Check resend.\_domainkey.yourdomain.com](https://easydmarc.com/tools/txt-record-checker?domain=resend._domainkey.yourdomain.com\&dns_type=txt)

    Go to these URL's and replace `yourdomain.com` with the domain you added in Resend.

    ![Check domain records with EasyDMARC](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/domain-not-verifying-1.png)

    You are looking to see the same values that you see in Resend.
  </Accordion>

  <Accordion title="Check your records in the terminal">
    Checking your DNS records in the terminal is just as easy. You can use the `nslookup` command and a record type flag to get the same information.

    Replace `yourdomain.com` with whatever you added as the domain in Resend:

    Check your DKIM `TXT` record:

    ```
    nslookup -type=TXT resend._domainkey.yourdomain.com
    ```

    Check your SPF `TXT` record:

    ```
    nslookup -type=TXT send.yourdomain.com
    ```

    Check your SPF `MX` record:

    ```
    nslookup -type=MX send.yourdomain.com
    ```

    ![Check domain records with nslookup](https://mintlify.s3-us-west-1.amazonaws.com/resend/images/domain-not-verifying-2.png)

    You are looking to see the same values that you see in Resend.
  </Accordion>
</AccordionGroup>


# What is Resend Pricing

Learn more about Resend's pricing plans.

You can learn more about Resend's pricing at [resend.com/pricing](https://resend.com/pricing).


# What's the difference between Opportunistic TLS vs Enforced TLS?

Understand the different TLS configurations available.

Resend supports TLS 1.2, TLS 1.1 and TLS 1.0 for TLS connections.

There are two types of TLS configurations available:

*   Opportunistic TLS
*   Enforced TLS

## What is Opportunistic TLS?

Opportunistic TLS means that Resend always attempts to make a secure connection to the receiving mail server.

If the receiving server does not support TLS, the fallback is sending the message unencrypted.

## What is Enforced TLS?

Enforced TLS means that the email communication must use TLS no matter what.

If the receiving server does not support TLS, the email will not be sent.

## Is Enforced TLS better than Opportunistic TLS?

One strategy is not necessarily better than the other.

The decision is less about one option being safe and the other being unsafe, and more about one option being safe and the other being safer.

When you have Enforced TLS enabled, you might see an increase in bounce rates because some outdated mail servers do not support TLS.

So it's important to understand the different use cases for each configuration. If you're sending sensitive information like authentication emails, you might want to use Enforced TLS. If you're sending marketing emails, you might want to use Opportunistic TLS.

In simple terms, with Opportunistic TLS, delivery is more important than security. On the other hand, with Enforced TLS, security is more important than delivery.


# Why are my open rates not accurate?

Learn why your open rate statistics are not accurate and what you can do about it.

## How are open rates tracked?

A 1x1 pixel transparent GIF image is inserted in each email and includes a unique reference. When the image is downloaded, an open event is triggered.

## Why are my open rates not accurate?

Open tracking is generally not accurate because each inbox handles incoming email differently.

**Clipped messages in Gmail** happen when you send a message over 102KB. A message over this size won’t be counted as an open unless the recipient views the entire message. Resend’s Deliverability Insights on the email will note if a message exceeds this threshold.

**Some inboxes do not download images by default** or block/cache assets with a corporate firewall. This approach can prevent the open event from being tracked.

**Other inboxes open the email prior to delivering** in order to scan for malware or to [protect user privacy](https://www.apple.com/newsroom/2021/06/apple-advances-its-privacy-leadership-with-ios-15-ipados-15-macos-monterey-and-watchos-8/). This approach can trigger an open event without the recipient reading your email.

Because of this, open tracking is **not a statistically accurate way** of detecting if your users are engaging with your content.

## Does open tracking impact inbox placement?

Though open tracking should not impact if your email is delivered, it most likely will impact your inbox placement. Trackers are generally **used by marketers and even spammers**. Because of this, inbox providers will often use open tracking as a signal that your email is promotional, or even spam, and categorize accordingly.

**We suggest disabling open rates for transactional email**, to maximize inbox placement.

## What's the alternative?

Instead of relying on open rates, there are a few other ways to still understand your sending.

1.  **Track Clicks:** Monitoring the link clicks is an even more granular way to know how a recipient engaged with your email. By knowing if they clicked, you also know that they read parts of your email and took action.
2.  **Track Outside the Inbox:** Often emails are sent as a means to an end. Maybe it's to increase page visits of an announcement or convert free users to paid. Tracking your sending by metrics outside of the inbox can be a great way to understand the true impact of your sending.


# SDKs

Open source client libraries for your favorite platforms.

## Official SDKs

<CardGroup cols={2}>
  <Card title="Node.js" icon="github" href="https://github.com/resend/resend-node">
    github.com/resend/resend-node
  </Card>

  <Card title="PHP" icon="github" href="https://github.com/resend/resend-php">
    github.com/resend/resend-php
  </Card>

  <Card title="Laravel" icon="github" href="https://github.com/resend/resend-laravel">
    github.com/resend/resend-laravel
  </Card>

  <Card title="Python" icon="github" href="https://github.com/resend/resend-python">
    github.com/resend/resend-python
  </Card>

  <Card title="Ruby" icon="github" href="https://github.com/resend/resend-ruby">
    github.com/resend/resend-ruby
  </Card>

  <Card title="Go" icon="github" href="https://github.com/resend/resend-go">
    github.com/resend/resend-go
  </Card>

  <Card title="Java" icon="github" href="https://github.com/resend/resend-java">
    github.com/resend/resend-java
  </Card>
</CardGroup>

## Community SDKs

<CardGroup cols={2}>
  <Card title="Elixir" icon="github" href="https://github.com/elixir-saas/resend-elixir">
    github.com/elixir-saas/resend-elixir
  </Card>

  <Card title=".NET" icon="github" href="https://github.com/filipetoscano/resend.net">
    github.com/filipetoscano/resend.net
  </Card>

  <Card title="NestJS" icon="github" href="https://github.com/jiangtaste/nestjs-resend">
    github.com/jiangtaste/nestjs-resend
  </Card>

  <Card title="Dart" icon="github" href="https://github.com/coderaveHQ/dart_resend">
    github.com/coderaveHQ/dart\_resend
  </Card>
</CardGroup>

## OpenAPI

<CardGroup cols={2}>
  <Card title="OpenAPI" icon="github" href="https://github.com/resend/resend-openapi">
    github.com/resend/resend-openapi
  </Card>
</CardGroup>


# Security

An overview of Resend security features and practices.

## Governance

Resend establishes policies and controls, monitors compliance with those controls, and proves the security and compliance to third-party auditors.

Our policies are based on the following **foundational principles**:

<CardGroup cols={2}>
  <Card title="Least Privilege" icon="square-1">
    Access should be limited to only those with a legitimate business needs,
    based on the principle of least privilege.
  </Card>

  <Card title="Consistency" icon="square-2">
    Security controls should be applied consistently across all areas of the
    enterprise.
  </Card>

  <Card title="Defense in Depth" icon="square-3">
    Security controls should be implemented and layered according to the
    principle of defense-in-depth.
  </Card>

  <Card title="Continuous Improvement" icon="square-4">
    The implementation of controls should be iterative, continuously improving
    effectiveness and decreasing friction.
  </Card>
</CardGroup>

### Compliance Standards

<AccordionGroup>
  <Accordion title="SOC 2 Type II" icon="hourglass-clock">
    Resend is SOC 2 Type II compliant. The audit was completed by Vanta & Advantage Partners.
    You can download a copy of the report on the [Documents](https://resend.com/settings/documents) page.
  </Accordion>

  <Accordion title="GDPR" icon="hourglass-clock">
    Resend is GDPR compliant. You can learn more about our [GDPR compliance](https://resend.com/security/gdpr) or view our [DPA](https://resend.com/legal/dpa).
  </Accordion>
</AccordionGroup>

## Data Protection

<CardGroup cols={1}>
  <Card title="Data at rest" icon="server">
    All datastores are encrypted at rest. Sensitive collections and tables also
    use row-level encryption.
  </Card>

  <Card title="Data in transit" icon="network-wired">
    Resend uses TLS 1.3 or higher everywhere data is transmitted over
    potentially insecure networks.
  </Card>

  <Card title="Data backup" icon="database">
    Resend backs-up all production data using a point-in-time approach. Backups
    are persisted for 30 days, and are globally replicated for resiliency
    against regional disasters.
  </Card>
</CardGroup>

## Product Security

### Penetration testing

Resend engages with third-party firms to conduct penetration testing at least annually.

All areas of the Resend product and cloud infrastructure are in-scope for these assessments, and source code is fully available to the testers in order to maximize the effectiveness and coverage.

You can download the latest penetration test report on the [Documents](https://resend.com/settings/documents) page.

### Vulnerability scanning

Resend uses multiple vulnerability monitoring techniques including code-level scanning, dependency scanning, and security reviews to identify and remediate vulnerabilities.

Vulnerabilities are prioritized based on severity and risk, and are remediated according to the following schedule:

*   Critical: 15 Days
*   High: 30 Days
*   Medium: 90 Day
*   Low: 180 Days
*   Informational: As needed

## Enterprise Security

<CardGroup cols={1}>
  <Card title="Endpoint protection" icon="computer">
    All company devices are equipped with anti-malware protection. Endpoint security alerts are monitored with 24/7/365 coverage. We use MDM software to enforce secure configuration of endpoints, such as disk encryption, screen lock configuration, and software updates.
  </Card>

  <Card title="Security education" icon="graduation-cap">
    Resend provides comprehensive security training to all employees upon onboarding and annually.

    Resend's conducts threat briefings with employees to inform them of important security and safety-related updates that require special attention or action.
  </Card>

  <Card title="Identity and access management" icon="id-badge">
    Resend employees are granted access to applications based on their role, and automatically deprovisioned upon termination of their employment. Further access must be approved according to the policies set for each application.

    Multi-factor authentication is required for all employees to access company applications.
  </Card>
</CardGroup>

## Responsible Disclosure

To report a vulnerability, please check the guidelines on the [Responsible Disclosure](https://resend.com/security/responsible-disclosure) page.


# Auth0 with SMTP

Learn how to integrate Auth0 with Resend SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Get the Resend SMTP credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

## 2. Integrate with Auth0 SMTP

After logging into your [Auth0](https://auth0.com/) dashboard, you'll need to enable the SMTP integration.

1.  From your Auth0 dashboard, go to [Branding > Email Provider](https://manage.auth0.com/#/templates/provider).
2.  Enable the **Use my own email provider** toggle.
3.  Select **SMTP Provider**.
4.  Enter a **From** email address, and then enter the Resend SMTP server's **Host**, **Port**, **Username**, and your API key as the **Password**.

<img alt="Auth0 SMTP - Email Provider Settings" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/auth0-smtp.png" />

## 3. Send a test email

Once you have configured the SMTP settings, click **Save**. Next send a test email using the **Send Test Email** button. If everything is configured correctly, you will receive a confirmation email. If you did not receive an email, check your [Auth0 Logs](https://manage.auth0.com/#/logs).


# AWS Lambda

Learn how to send your first email using AWS Lambda.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Create a AWS Lambda function

Go to [aws.amazon.com](https://aws.amazon.com) and create a new Lambda function using the Node.js 18.x runtime.

<img alt="AWS Lambda - New Function" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/aws-lambda-new-function.png" />

## 2. Edit the handler function

Paste the following code into the browser editor:

```js index.mjs
const RESEND_API_KEY = 're_123456789';

export const handler = async (event) => {
  const res = await fetch('https://api.resend.com/emails', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${RESEND_API_KEY}`,
    },
    body: JSON.stringify({
      from: 'Acme <onboarding@resend.dev>',
      to: ['delivered@resend.dev'],
      subject: 'hello world',
      html: '<strong>it works!</strong>',
    }),
  });

  if (res.ok) {
    const data = await res.json();

    return {
      statusCode: 200,
      body: data,
    };
  }
};
```

## 3. Deploy and send email

Click on `Deploy` and then `Test` at the top of the screen.

<img alt="AWS Lambda - Edit Function" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/aws-lambda-edit-function.png" />

## 4. Try it yourself

<Card title="AWS Lambda Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-aws-lambda-example">
  See the full source code.
</Card>


# Axum

Send your first email using Axum and the Resend Rust SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Rust SDK and the [Tokio](https://tokio.rs) runtime.

```bash
cargo add resend-rs
cargo add tokio -F macros,rt-multi-thread
```

## 2. Send an Email

```rust
use std::sync::Arc;

use axum::{extract::State, http::StatusCode, routing::get, Router};
use resend_rs::types::CreateEmailBaseOptions;
use resend_rs::{Resend, Result};

// Cloning the Resend client is fine and cheap as the internal HTTP client is
// not cloned.
#[derive(Clone)]
struct AppState {
  resend: Resend,
}

#[tokio::main]
async fn main() {
  let shared_state = Arc::new(AppState {
    resend: Resend::new("re_123456789"),
  });

  // build our application with a single route
  let app = Router::new()
    .route("/", get(endpoint))
    // provide the state so the router can access it
    .with_state(shared_state);

  // run our app with hyper, listening globally on port 3000
  let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
  axum::serve(listener, app).await.unwrap();
}

async fn endpoint(State(state): State<Arc<AppState>>) -> Result<String, StatusCode> {
  let from = "Acme <onboarding@resend.dev>";
  let to = ["delivered@resend.dev"];
  let subject = "Hello World";

  let email = CreateEmailBaseOptions::new(from, to, subject)
    .with_html("<strong>It works!</strong>");

  // access the state via the `State` extractor and handle the error
  match state.resend.emails.send(email).await {
    Ok(email) => Ok(email.id.to_string()),
    Err(_) => Err(StatusCode::INTERNAL_SERVER_ERROR),
  }
}
```

Opening your browser at `http://localhost:3000` (or running `curl localhost:3001`) should send an
email and return you its id!

## 3. Try it yourself!

<Card title="Axum Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-axum-example">
  See the full source code.
</Card>


# Bun

Learn how to send your first email using Bun and the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

```bash
bun install resend
```

## 2. Create an email template

Start by creating your email template on `email-template.tsx`.

```tsx email-template.tsx
import * as React from 'react';

interface EmailTemplateProps {
  firstName: string;
}

export const EmailTemplate: React.FC<Readonly<EmailTemplateProps>> = ({
  firstName,
}) => (
  <div>
    <h1>Welcome, {firstName}!</h1>
  </div>
);
```

## 3. Send email using React

Create a new file `index.tsx` and send your first email.

```tsx index.tsx
import { Resend } from 'resend';
import { EmailTemplate } from './email-template';

const resend = new Resend(process.env.RESEND_API_KEY);

const server = Bun.serve({
  port: 3000,
  async fetch() {
    const { data, error } = await resend.emails.send({
      from: 'Acme <onboarding@resend.dev>',
      to: ['delivered@resend.dev'],
      subject: 'Hello World',
      react: EmailTemplate({ firstName: 'Vitor' }),
    });

    if (error) {
      return new Response(JSON.stringify({ error }));
    }

    return new Response(JSON.stringify({ data }));
  },
});

console.log(`Listening on http://localhost:${server.port} ...`);
```

Start the local server by running `bun index.tsx` and navigate to `http://localhost:3000`.

## 3. Try it yourself

<Card title="Bun Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-bun-example">
  See the full source code.
</Card>


# Cloudflare Workers

Learn how to send your first email using Cloudflare Workers.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)
*   Have a Cloudflare worker with a bundling setup
    *   Recommended to be bootstrapped with `npm create cloudflare`

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Create an email template

Start by creating your email template on `src/emails/email-template.tsx`:

```tsx src/emails/email-template.tsx
import * as React from 'react';

interface EmailTemplateProps {
  firstName: string;
}

export const EmailTemplate: React.FC<Readonly<EmailTemplateProps>> = ({
  firstName,
}) => (
  <div>
    <h1>Welcome, {firstName}!</h1>
  </div>
);

export default EmailTemplate;
```

## 3. Send the email using React and the SDK

Change the file extension of the worker's main file to `tsx` and modify your configurations.

After that, you can send your email using the `react` parameter:

```tsx src/index.tsx
import { Resend } from 'resend';
import { EmailTemplate } from './emails/email-template';

export default {
  async fetch(request, env, context): Promise<Response> {
    const resend = new Resend('re_123456789');

    const data = await resend.emails.send({
      from: 'Acme <onboarding@resend.dev>',
      to: ['delivered@resend.dev'],
      subject: 'hello world',
      react: <EmailTemplate firstName="John" />,
    });

    return Response.json(data);
  },
} satisfies ExportedHandler<Env, ExecutionContext>;
```

## 4. Deploy and send email

Run `wrangler deploy` and wait for it to finish. Once it's done, it will
give you a URL to try out, like `https://my-worker.your_name.workers.dev`,
that you can open and verify that your email has been sent.

## 5. Try it yourself

<Card title="Cloudflare Workers Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-cloudflare-workers-example">
  See the full source code.
</Card>


# Customer.io with SMTP

Learn how to integrate Customer.io with Resend SMTP.

### Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Get the Resend SMTP credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

## 2. Integrate with Customer.io SMTP

After logging into your [Customer.io](https://customer.io) account, you'll need to enable the SMTP integration.

1.  Go to **Settings** > **Workspace Settings**.

<img alt="Customer.io SMTP - Workspace Settings" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/customer-io-smtp-1.png" />

2.  Go to the Messaging tab and select **Email**.

<img alt="Customer.io SMTP - Email" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/customer-io-smtp-2.png" />

3.  Select the **Custom SMTP** tab and click **Add Custom SMTP Server**.

<img alt="Customer.io SMTP - Add Custom SMTP Server" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/customer-io-smtp-3.png" />

4.  Select **Other SMTP** and click **Continue to set up**.

<img alt="Customer.io SMTP - Other SMTP" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/customer-io-smtp-4.png" />

5.  Copy-and-paste the SMTP credentials from Resend to Customer.io.

<img alt="Customer.io SMTP integration" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/customer-io-smtp-5.png" />


# Deno Deploy

Learn how to send your first email using Deno Deploy.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Create a Deno Deploy project

Go to [dash.deno.com/projects](https://dash.deno.com/projects) and create a new playground project.

<img alt="Deno Deploy - New Project" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/deno-deploy-new-project.png" />

## 2. Edit the handler function

Paste the following code into the browser editor:

```js index.ts
import { serve } from "https://deno.land/std@0.190.0/http/server.ts";

const RESEND_API_KEY = 're_123456789';

const handler = async (_request: Request): Promise<Response> => {
    const res = await fetch('https://api.resend.com/emails', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': `Bearer ${RESEND_API_KEY}`
        },
        body: JSON.stringify({
            from: 'Acme <onboarding@resend.dev>',
            to: ['delivered@resend.dev'],
            subject: 'hello world',
            html: '<strong>it works!</strong>',
        })
    });

    if (res.ok) {
        const data = await res.json();

        return new Response(data, {
            status: 200,
            headers: {
                'Content-Type': 'application/json',
            },
        });
    }
};

serve(handler);
```

## 3. Deploy and send email

Click on `Save & Deploy` at the top of the screen.

<img alt="Deno Deploy - Playground" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/deno-deploy-playground.png" />

## 4. Try it yourself

<Card title="Deno Deploy Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-deno-deploy-example">
  See the full source code.
</Card>


# Django with SMTP

Learn how to integrate Django with Resend SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)
*   Install `virtualenv` by running `pip install virtualenv`

## 1. Setup your environment

Create and activate your new virtualenv.

```bash
virtualenv venv
source venv/bin/activate
```

Install dependencies.

```sh
pip install -r requirements.txt
```

Set your `RESEND_API_KEY` environment variable by running.

```sh
export RESEND_API_KEY="re_123456789"
```

## 2. Send email using Django's SMTP EmailMessage

Set the necessary attributes in your `settings.py` file.

```py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
RESEND_SMTP_PORT = 587
RESEND_SMTP_USERNAME = 'resend'
RESEND_SMTP_HOST = 'smtp.resend.com'
```

Use Django's `get_connection` and `EmailMessage`

```py
import os
from django.conf import settings
from django.http import JsonResponse
from django.core.mail import EmailMessage, get_connection

# Sample Django view
def index(request):

    subject = "Hello from Django SMTP"
    recipient_list = ["delivered@resend.dev"]
    from_email = "onboarding@resend.dev"
    message = "<strong>it works!</strong>"

    with get_connection(
        host=settings.RESEND_SMTP_HOST,
        port=settings.RESEND_SMTP_PORT,
        username=settings.RESEND_SMTP_USERNAME,
        password=os.environ["RESEND_API_KEY"],
        use_tls=True,
        ) as connection:
            r = EmailMessage(
                  subject=subject,
                  body=message,
                  to=recipient_list,
                  from_email=from_email,
                  connection=connection).send()
    return JsonResponse({"status": "ok"})
```

## 3. Try it yourself

<Card title="Django SMTP Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-django-smtp-example">
  See the full source code.
</Card>


# Introduction

Learn how to send your first email using the Resend Elixir SDK.

<Info>
  This guides utilizes an [open source
  library](https://github.com/elixir-saas/resend-elixir) contributed by a
  community member. It's not developed, maintained, or supported by Resend
  directly.
</Info>

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Install by adding `resend` to your list of dependencies in `mix.exs`:

<CodeGroup>
  ```elixir mix.exs
  def deps do
    [
      {:resend, "~> 0.4.0"}
    ]
  end
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```elixir send.exs
client = Resend.client(api_key: System.get_env("RESEND_API_KEY"))

Resend.Emails.send(client, %{
  from: "Acme <onboarding@resend.dev>",
  to: ["delivered@resend.dev"],
  subject: "hello world",
  html: "<strong>it works!</strong>"
})
```

## 3. Try it yourself

<Card title="Elixir Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-elixir-example">
  See the full source code.
</Card>


# Express

Learn how to send your first email using Express and the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```js server.ts
import express, { Request, Response } from "express";
import { Resend } from "resend";

const app = express();
const resend = new Resend("re_123456789");

app.get("/", async (req: Request, res: Response) => {
  const { data, error } = await resend.emails.send({
    from: "Acme <onboarding@resend.dev>",
    to: ["delivered@resend.dev"],
    subject: "hello world",
    html: "<strong>it works!</strong>",
  });

  if (error) {
    return res.status(400).json({ error });
  }

  res.status(200).json({ data });
});

app.listen(3000, () => {
  console.log("Listening on http://localhost:3000");
});
```

## 3. Try it yourself

<Card title="Express Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-express-example">
  See the full source code.
</Card>


# FastAPI

Learn how to send your first email using FastAPI and the Resend Python SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Python SDK.

<CodeGroup>
  ```bash Pip
  pip install resend
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```py main.py
import resend
from typing import Dict
from fastapi import FastAPI

resend.api_key = "re_123456789"

app = FastAPI()

@app.post("/")
def send_mail() -> Dict:
    params: resend.Emails.SendParams = {
        "from": "onboarding@resend.dev",
        "to": ["delivered@resend.dev"],
        "subject": "Hello World",
        "html": "<strong>it works!</strong>",
    }
    email: resend.Email = resend.Emails.send(params)
    return email
```

## 3. Try it yourself

<Card title="FastAPI Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-fastapi-example">
  See the full source code.
</Card>


# Flask

Learn how to send your first email using Flask and the Resend Python SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Python SDK.

<CodeGroup>
  ```bash Pip
  pip install resend
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```py index.py
import resend
import os
from flask import Flask, jsonify

resend.api_key = os.environ["RESEND_API_KEY"]

app = Flask(__name__)


@app.route("/")
def index():
    params: resend.Emails.SendParams = {
        "from": "Acme <onboarding@resend.dev>",
        "to": ["delivered@resend.dev"],
        "subject": "hello world",
        "html": "<strong>it works!</strong>",
    }

    r = resend.Emails.send(params)
    return jsonify(r)


if __name__ == "__main__":
    app.run()
```

## 3. Try it yourself

<Card title="Flask Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-flask-example">
  See the full source code.
</Card>


# Introduction

Learn how to send your first email using the Resend Go SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Go SDK.

<CodeGroup>
  ```bash bash
  go get github.com/resend/resend-go/v2
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```Go main.go
package main

import "github.com/resend/resend-go/v2"

func main() {
    apiKey := "re_123456789"

    client := resend.NewClient(apiKey)

    params := &resend.SendEmailRequest{
        From:    "Acme <onboarding@resend.dev>",
        To:      []string{"delivered@resend.dev"},
        Html:    "<strong>hello world</strong>",
        Subject: "Hello from Golang",
        Cc:      []string{"cc@example.com"},
        Bcc:     []string{"bcc@example.com"},
        ReplyTo: "replyto@example.com",
    }

    sent, err := client.Emails.Send(params)
    if err != nil {
        fmt.Println(err.Error())
        return
    }
    fmt.Println(sent.Id)
}
```

## 3. Try it yourself

<Card title="Golang Examples" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-go-example">
  See the full source code.
</Card>


# Hono

Learn how to send your first email using Hono and the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Create an email template

Start by creating your email template on `emails/email-template.tsx`.

```tsx emails/email-template.tsx
import * as React from 'react';

interface EmailTemplateProps {
  firstName: string;
}

export const EmailTemplate: React.FC<Readonly<EmailTemplateProps>> = ({
  firstName,
}) => (
  <div>
    <h1>Welcome, {firstName}!</h1>
  </div>
);
```

To use JSX/TSX with Hono, we need to modify the `tsconfig.json`.

```json tsconfig.json
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "react"
  }
}
```

## 3. Send email using React

Create a new file `index.tsx` and send your first email.

```ts index.tsx
import { Hono } from 'hono';
import { Resend } from 'resend';
import { EmailTemplate } from './emails/email-template';

const app = new Hono();
const resend = new Resend('re_123456789');

app.get('/', async (c) => {
  const { data, error } = await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    react: <EmailTemplate firstName="John" />,
  });

  if (error) {
    return c.json(error, 400);
  }

  return c.json(data);
});

export default app;
```

## 4. Try it yourself

<Card title="Hono Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-hono-example">
  See the full source code.
</Card>


# Introduction

Learn how to send your first email using the Resend Java SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

<CodeGroup>
  ```bash Gradle
  implementation 'com.resend:resend-java:3.1.0'
  ```

  ```xml Maven
  <dependency>
      <groupId>com.resend</groupId>
      <artifactId>resend-java</artifactId>
      <version>3.1.0</version>
  </dependency>
  ```
</CodeGroup>

## 2. Send emails using HTML

```java Main.java
import com.resend.*;

public class Main {
    public static void main(String[] args) {
        Resend resend = new Resend("re_123456789");

        CreateEmailOptions params = CreateEmailOptions.builder()
                .from("Acme <onboarding@resend.dev>")
                .to("delivered@resend.dev")
                .subject("it works!")
                .html("<strong>hello world</strong>")
                .build();

         try {
            CreateEmailResponse data = resend.emails().send(params);
            System.out.println(data.getId());
        } catch (ResendException e) {
            e.printStackTrace();
        }
    }
}
```

## 3. Try it yourself

<Card title="Java Examples" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-java-example">
  See the full source code.
</Card>


# Laravel

Learn how to send your first email using Laravel.

## Prerequisites

To get the most out of this guide, you will need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

First, install Resend for Laravel using the Composer package manager:

```bash Composer
composer require resend/resend-laravel
```

## 2. Configuration

### API key

Next, you should configure your Resend API key in your application's `.env` file:

```ini .env
RESEND_API_KEY=re_123456789
```

### Mail driver

To use Resend as your mail driver, first create a new mailer definition, in the `mailers` array within your application's `config/mail.php` configuration file:

```php mail.php
'resend' => [
    'transport' => 'resend',
],
```

Next, update your application's `.env` file to use the Resend mail driver:

```ini .env
MAIL_MAILER=resend
MAIL_FROM_ADDRESS=onboarding@resend.dev
MAIL_FROM_NAME=Acme
```

## 3. Send an email

Resend for Laravel provides two convenient ways to send emails, using Laravel's email service or the `Resend` API facade.

### Using the Mail Facade

```php OrderShipmentController.php
<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Mail\OrderShipped;
use App\Models\Order;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;

class OrderShipmentController extends Controller
{
    /**
     * Ship the given order.
     */
    public function store(Request $request): RedirectResponse
    {
        $order = Order::findOrFail($request->order_id);

        // Ship the order...

        Mail::to($request->user())->send(new OrderShipped($order));

        return redirect('/orders');
    }
}
```

### Using the Resend Facade

```php OrderShipmentController.php
<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Mail\OrderShipped;
use App\Models\Order;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Resend\Laravel\Facades\Resend;

class OrderShipmentController extends Controller
{
    /**
     * Ship the given order.
     */
    public function store(Request $request): RedirectResponse
    {
        $order = Order::findOrFail($request->order_id);

        // Ship the order...

        Resend::emails()->send([
            'from' => 'Acme <onboarding@resend.dev>',
            'to' => [$request->user()->email],
            'subject' => 'hello world',
            'html' => (new OrderShipped($order))->render(),
        ])

        return redirect('/orders');
    }
}
```

## 4. Receiving webhook requests

By default, Resend for Laravel includes a webhook controller to respond to the `/resend/webhook` URL path. The controller will dispatch a Laravel event that corresponds to a Resend event. For example, an `email.delivered` event type will send an `EmailDelivered` Laravel event.

### Register the webhook endpoint

Register your publicly accessible HTTPS URL in the Resend dashboard.

<Tip>
  For development, you can create a tunnel to your localhost server using a tool
  like [ngrok](https://ngrok.com/download). For example:
  `https://8733-191-204-177-89.sa.ngrok.io/resend/webhook`
</Tip>

<img alt="Add Webhook" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/laravel-create-webhook.png" />

### CSRF protection

Webhook requests from Resend need to bypass Laravel's CSRF protection. Be sure to list the URI as an exception in your application's `App\Http\Middleware\VerifyCsrfToken` middleware or list the route outside of the web middleware group:

```php
protected $except = [
    'resend/*',
];
```

### Verifying webhook signatures

To enable webhook verification, ensure that the `RESEND_WEBHOOK_SECRET` environment variable is set in your application's `.env` file. The **Signing secret** can be retrieved from your [Resend dashboard](https://resend.com/webhooks).

## 5. Try it yourself

<Card title="Laravel Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-laravel-example">
  See the full source code.
</Card>


# Laravel with SMTP

Learn how to send your first email using Laravel with SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Setup your environment

First, configure your Resend SMTP details in your application's `.env` file:

```ini .env
MAIL_MAILER=smtp
MAIL_HOST=smtp.resend.com
MAIL_PORT=587
MAIL_USERNAME=resend
MAIL_PASSWORD=re_123456789
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=onboarding@resend.dev
MAIL_FROM_NAME=Acme
```

## 2. Send an email

Now you're ready to send emails with Laravel's powerful email service. Here's an example of how you could send your first email using Resend SMTP:

```php OrderShipmentController.php
<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Mail\OrderShipped;
use App\Models\Order;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;

class OrderShipmentController extends Controller
{
    /**
     * Ship the given order.
     */
    public function store(Request $request): RedirectResponse
    {
        $order = Order::findOrFail($request->order_id);

        // Ship the order...

        Mail::to($request->user())->send(new OrderShipped($order));

        return redirect('/orders');
    }
}
```

## 3. Try it yourself

<Card title="Laravel Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-laravel-example">
  See the full source code.
</Card>


# Liferay with SMTP

Learn how to integrate Liferay with Resend SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Get the Resend SMTP credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

## 2. Integrate with Liferay

After logging into your Liferay instance as the admin user, you'll need to enable the SMTP integration.

1.  Navigate to **Control Panel** → **Server Administration** → **Mail**.

<img alt="Liferay - SMTP" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/liferay-smtp-1.jpg" />

2.  Copy-and-paste the SMTP credentials from Resend to Liferay.

*   **Outgoing SMTP Server**: `smtp.resend.com`
*   **Outgoing Port**: `465`
*   **Enable StartTLS**: `True`
*   **User Name**: `resend`
*   **Password**: `YOUR_API_KEY`

Make sure to replace `YOUR_API_KEY` with an existing key or create a new [API Key](https://resend.com/api-keys).

For the additional JavaMail properties, you can use:

```
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.starttls.required=true
```


# Metabse with SMTP

Learn how to integrate Metabase with Resend SMTP.

### Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Get the Resend SMTP credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

## 2. Integrate with Metabase SMTP

After logging into your [Metabase Cloud](https://www.metabase.com/cloud/login) account, you’ll need to enable the SMTP integration.

1.  From your Metabase Cloud Admin Panel, go to **Settings > Email** in the left menu. You should see the form below.

<img alt="Metabse Cloud SMTP" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/metabase-smtp-1.png" />

2.  Copy-and-paste the SMTP credentials from Resend to Metabase Cloud. Finally, click the **Save** button and all of your emails will be sent through Resend.

<img alt="Metabse Cloud SMTP" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/metabase-smtp-2.png" />


# NextAuth

Learn how to send your first email using NextAuth.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Install the [NextAuth](https://next-auth.js.org/getting-started/example#install-nextauth) package.

<CodeGroup>
  ```bash npm
  npm install next-auth
  ```

  ```bash yarn
  yarn add next-auth
  ```

  ```bash pnpm
  pnpm add next-auth
  ```
</CodeGroup>

Then, install the [Nodemailer](https://www.npmjs.com/package/nodemailer) package.

<CodeGroup>
  ```bash npm
  npm install nodemailer
  ```

  ```bash yarn
  yarn add nodemailer
  ```

  ```bash pnpm
  pnpm add nodemailer
  ```
</CodeGroup>

## 2. Configure SMTP credentials

Add your Resend SMTP crendentials in your application's `.env` file:

```ini .env
EMAIL_SERVER_USER=resend
EMAIL_SERVER_PASSWORD=YOUR_API_KEY
EMAIL_SERVER_HOST=smtp.resend.com
EMAIL_SERVER_PORT=465
EMAIL_FROM=onboarding@resend.dev
```

## 3. Configure Email Provider

Finally, in your \[...nextauth].js file (typically located in pages/api/auth), configure the Email provider with your SMTP settings:

```js index.ts
import NextAuth from 'next-auth';
import EmailProvider from 'next-auth/providers/email';
import nodemailer from 'nodemailer';

export default NextAuth({
  providers: [
    EmailProvider({
      server: {
        host: process.env.EMAIL_SERVER_HOST,
        port: process.env.EMAIL_SERVER_PORT,
        auth: {
          user: process.env.EMAIL_SERVER_USER,
          pass: process.env.EMAIL_SERVER_PASSWORD,
        },
      },
      from: process.env.EMAIL_FROM,
    }),
    // ... other providers as needed
  ],
  // ... any other NextAuth.js configs
});
```


# Next.js

Learn how to send your first email using Next.js and the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Create an email template

Start by creating your email template on `components/email-template.tsx`.

```tsx components/email-template.tsx
import * as React from 'react';

interface EmailTemplateProps {
  firstName: string;
}

export const EmailTemplate: React.FC<Readonly<EmailTemplateProps>> = ({
  firstName,
}) => (
  <div>
    <h1>Welcome, {firstName}!</h1>
  </div>
);
```

## 3. Send email using React

Create an API file under `pages/api/send.ts` if you're using the [Pages Router](https://nextjs.org/docs/pages/building-your-application/routing/api-routes) or create a route file under `app/api/send/route.ts` if you're using the [App Router](https://nextjs.org/docs/app/building-your-application/routing/router-handlers).

Import the React email template and send an email using the `react` parameter.

<CodeGroup>
  ```ts pages/api/send.ts
  import type { NextApiRequest, NextApiResponse } from 'next';
  import { EmailTemplate } from '../../components/EmailTemplate';
  import { Resend } from 'resend';

  const resend = new Resend(process.env.RESEND_API_KEY);

  export default async (req: NextApiRequest, res: NextApiResponse) => {
    const { data, error } = await resend.emails.send({
      from: 'Acme <onboarding@resend.dev>',
      to: ['delivered@resend.dev'],
      subject: 'Hello world',
      react: EmailTemplate({ firstName: 'John' }),
    });

    if (error) {
      return res.status(400).json(error);
    }

    res.status(200).json(data);
  };
  ```

  ```ts app/api/send/route.ts
  import { EmailTemplate } from '../../../components/EmailTemplate';
  import { Resend } from 'resend';

  const resend = new Resend(process.env.RESEND_API_KEY);

  export async function POST() {
    try {
      const { data, error } = await resend.emails.send({
        from: 'Acme <onboarding@resend.dev>',
        to: ['delivered@resend.dev'],
        subject: 'Hello world',
        react: EmailTemplate({ firstName: 'John' }),
      });

      if (error) {
        return Response.json({ error }, { status: 500 });
      }

      return Response.json(data);
    } catch (error) {
      return Response.json({ error }, { status: 500 });
    }
  }
  ```
</CodeGroup>

## 4. Try it yourself

<CardGroup>
  <Card title="Next.js Example (Pages Router)" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-nextjs-pages-router-example">
    See the full source code.
  </Card>

  <Card title="Next.js Example (App Router)" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-nextjs-app-router-example">
    See the full source code.
  </Card>
</CardGroup>


# Introduction

Learn how to send your first email using the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```js server.ts
import { Resend } from 'resend';

const resend = new Resend('re_123456789');

(async function () {
  const { data, error } = await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'Hello World',
    html: '<strong>It works!</strong>',
  });

  if (error) {
    return console.error({ error });
  }

  console.log({ data });
})();
```

## 3. Try it yourself

<Card title="Node.js Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-node-example">
  See the full source code.
</Card>


# Nodemailer with SMTP

Learn how to send your first email using Nodemailer with SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the [Nodemailer](https://www.npmjs.com/package/nodemailer) package.

<CodeGroup>
  ```bash npm
  npm install nodemailer
  ```

  ```bash yarn
  yarn add nodemailer
  ```

  ```bash pnpm
  pnpm add nodemailer
  ```
</CodeGroup>

## 2. Send email using SMTP

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

Then use these credentials to create a transport:

```js index.ts
import nodemailer from 'nodemailer';

async function main() {
  const transporter = nodemailer.createTransport({
    host: 'smtp.resend.com',
    secure: true,
    port: 465,
    auth: {
      user: 'resend',
      pass: 're_123456789',
    },
  });

  const info = await transporter.sendMail({
    from: 'onboarding@resend.dev',
    to: 'delivered@resend.dev',
    subject: 'Hello World',
    html: '<strong>It works!</strong>',
  });

  console.log('Message sent: %s', info.messageId);
}

main().catch(console.error);
```

## 3. Try it yourself

<Card title="Nodemailer SMTP Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-nodemailer-smtp-example">
  See the full source code.
</Card>


# Nuxt

Learn how to send your first email using Nuxt and the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Send email using HTML

Create a [Server Route](https://nuxt.com/docs/guide/directory-structure/server) under `server/api/send.ts`.

The easiest way to send an email is by using the `html` parameter.

<CodeGroup>
  ```ts server/api/send.ts
  import { Resend } from 'resend';

  const resend = new Resend(process.env.RESEND_API_KEY);

  export default defineEventHandler(async () => {
    try {
      const data = await resend.emails.send({
        from: 'Acme <onboarding@resend.dev>',
        to: ['delivered@resend.dev'],
        subject: 'Hello world',
        html: '<strong>It works!</strong>',
      });

      return data;
    } catch (error) {
      return { error };
    }
  });
  ```
</CodeGroup>

## 4. Try it yourself

<Card title="Nuxt Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-nuxt-example">
  See the full source code.
</Card>


# Phoenix

Learn how to send your first email using Phoenix and the Resend Elixir SDK.

<Info>
  This guides utilizes an [open source
  library](https://github.com/elixir-saas/resend-elixir) contributed by a
  community member. It's not developed, maintained, or supported by Resend
  directly.
</Info>

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Install by adding `resend` to your list of dependencies in `mix.exs`:

<CodeGroup>
  ```elixir mix.exs
  def deps do
    [
      {:resend, "~> 0.4.0"}
    ]
  end
  ```
</CodeGroup>

## 2. Send email using Swoosh

This library includes a Swoosh adapter to make using Resend with a new Phoenix project as easy as possible. All you have to do is configure your Mailer:

```elixir
config :my_app, MyApp.Mailer,
  adapter: Resend.Swoosh.Adapter,
  api_key: System.fetch_env!("RESEND_API_KEY")
```

If you're configuring your app for production, configure your adapter in `prod.exs`, and your API key from the environment in `runtime.exs`:

<CodeGroup>
  ```elixir prod.exs
  config :my_app, MyApp.Mailer, adapter: Resend.Swoosh.Adapter
  ```

  ```elixir runtime.exs
  config :my_app, MyApp.Mailer, api_key: "re_123456789"
  ```
</CodeGroup>

## 3. Try it yourself

<Card title="Phoenix Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-phoenix-example">
  See the full source code.
</Card>


# Introduction

Learn how to send your first email using the Resend PHP SDK.

## Prerequisites

To get the most out of this guide, you will need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend PHP SDK.

```bash Composer
composer require resend/resend-php
```

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```php index.php
<?php

require __DIR__ . '/vendor/autoload.php';

$resend = Resend::client('re_123456789');

$resend->emails->send([
  'from' => 'Acme <onboarding@resend.dev>',
  'to' => ['delivered@resend.dev'],
  'subject' => 'hello world',
  'html' => '<strong>it works!</strong>',
]);
```

## 3. Try it yourself

<Card title="PHP Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-php-example">
  See the full source code.
</Card>


# Introduction

Learn how to send your first email using the Resend Python SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Python SDK.

<CodeGroup>
  ```bash Pip
  pip install resend
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```py index.py
import os
import resend

resend.api_key = os.environ["RESEND_API_KEY"]

params: resend.Emails.SendParams = {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["delivered@resend.dev"],
    "subject": "hello world",
    "html": "<strong>it works!</strong>",
}

email = resend.Emails.send(params)
print(email)
```

## 3. Try it yourself

<Card title="Python Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-python-example">
  See the full source code.
</Card>


# Ruby and Rails

Learn how to send your first email using Rails and the Resend Ruby SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Ruby SDK.

<CodeGroup>
  ```bash RubyGems
  gem install resend
  ```

  ```bash Gemfile
  gem 'resend'
  ```
</CodeGroup>

## 2. Send email using Rails Action Mailer

This gem can be used as an Action Mailer delivery method.

First, let's update or create your mailer initializer file with your Resend API Key.

```rb config/initializers/mailer.rb
Resend.api_key = "re_123456789"
```

Add these lines of code into your environment config file.

```rb config/environments/environment.rb
config.action_mailer.delivery_method = :resend
```

Then create a `UserMailer` class definition.

```rb app/mailers/user_mailer.rb
class UserMailer < ApplicationMailer
  default from: 'Acme <onboarding@resend.dev>' # this domain must be verified with Resend
  def welcome_email
    @user = params[:user]
    @url = 'http://example.com/login'
    mail(to: ["delivered@resend.dev"], subject: 'hello world')
  end
end
```

And create your ERB email template.

```html app/views/user_mailer/welcome_email.html.erb
<!doctype html>
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  </head>
  <body>
    <h1>Welcome to example.com, <%= @user.name %></h1>
    <p>You have successfully signed up to example.com,</p>
    <p>To login to the site, just follow this link: <%= @url %>.</p>
    <p>Thanks for joining and have a great day!</p>
  </body>
</html>
```

Initialize your `UserMailer` class. This should return a `UserMailer` instance.

```rb
u = User.new name: "derich"
mailer = UserMailer.with(user: u).welcome_email

# => #<Mail::Message:153700, Multipart: false, Headers: <From: from@example.com>, <To: to@example.com>, <Subject: hello world>, <Mime-Version: 1.0>...
```

Finally, you can now send emails using the `deliver_now!` method:

```rb
mailer.deliver_now!

# => {:id=>"a193c81e-9ac5-4708-a569-5caf14220539", :from=>....}
```

## 3. Try it yourself

<Card title="Rails Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-rails-example">
  See the full source code.
</Card>


# Rails with SMTP

Learn how to integrate Rails with Resend SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Setup your environment

Add these lines of code into your environment config file.

```rb config/environments/environment.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address   => 'smtp.resend.com',
  :port      => 465,
  :user_name => 'resend',
  :password  => ENV['RESEND_API_KEY'],
  :tls => true
}
```

## 2. Send email using Rails Action Mailer

Then create a `UserMailer` class definition.

```rb app/mailers/user_mailer.rb
class UserMailer < ApplicationMailer
  default from: 'Acme <onboarding@resend.dev>' # this domain must be verified with Resend
  def welcome_email
    @user = params[:user]
    @url = 'http://example.com/login'
    mail(to: ["delivered@resend.dev"], subject: 'hello world')
  end
end
```

And create your ERB email template.

```html app/views/user_mailer/welcome_email.html.erb
<!doctype html>
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
  </head>
  <body>
    <h1>Welcome to example.com, <%= @user.name %></h1>
    <p>You have successfully signed up to example.com,</p>
    <p>To login to the site, just follow this link: <%= @url %>.</p>
    <p>Thanks for joining and have a great day!</p>
  </body>
</html>
```

Initialize your `UserMailer` class. This should return a `UserMailer` instance.

```rb
u = User.new name: "derich"
mailer = UserMailer.with(user: u).welcome_email

# => #<Mail::Message:153700, Multipart: false, Headers: <From: from@example.com>, <To: to@example.com>, <Subject: hello world>, <Mime-Version: 1.0>...
```

Finally, you can now send emails using the `deliver_now!` method:

```rb
mailer.deliver_now!

# => {:id=>"a193c81e-9ac5-4708-a569-5caf14220539", :from=>....}
```

## 3. Try it yourself

<Card title="Rails SMTP Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-rails-smtp-example">
  See the full source code.
</Card>


# RedwoodJS

Learn how to send your first email using Redwood.js and the Resend Node.js SDK.

### Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

### 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash yarn
  yarn workspace api add resend
  ```
</CodeGroup>

### 2. Send email using HTML

```bash
yarn rw g function send
```

The easiest way to send an email is by using the `html` parameter.

```ts api/src/functions/send/send.ts
import { Resend } from 'resend';
import type { APIGatewayEvent, Context } from 'aws-lambda';

const resend = new Resend('re_123456789');

export const handler = async (event: APIGatewayEvent, context: Context) => {
  const { data, error } = await resend.emails.send({
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    html: '<strong>it works!</strong>',
  });

  if (error) {
    return {
      statusCode: 500,
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ error }),
    };
  }

  return {
    statusCode: 200,
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ data }),
  };
};
```

### 3. Try it yourself

<Card title="Redwood.js Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-redwoodjs-example">
  See the full source code.
</Card>


# Remix

Learn how to send your first email using Remix and the Resend Node.js SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Node.js SDK.

<CodeGroup>
  ```bash npm
  npm install resend
  ```

  ```bash yarn
  yarn add resend
  ```

  ```bash pnpm
  pnpm add resend
  ```
</CodeGroup>

## 2. Send email using HTML

Create a [Resource Route](https://remix.run/docs/en/1.16.1/guides/resource-routes) under `app/routes/send.ts`.

The easiest way to send an email is by using the `html` parameter.

<CodeGroup>
  ```ts app/routes/send.ts
  import { json } from '@remix-run/node';
  import { Resend } from 'resend';

  const resend = new Resend(process.env.RESEND_API_KEY);

  export const loader = async () => {
    const { data, error } = await resend.emails.send({
      from: 'Acme <onboarding@resend.dev>',
      to: ['delivered@resend.dev'],
      subject: 'Hello world',
      html: '<strong>It works!</strong>',
    });

    if (error) {
      return json({ error }, 400);
    }

    return json(data, 200);
  };
  ```
</CodeGroup>

## 4. Try it yourself

<Card title="Remix Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-remix-example">
  See the full source code.
</Card>


# Retool with SMTP

Learn how to integrate Retool with Resend SMTP.

### Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Get the Resend SMTP credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

## 2. Integrate with Retool SMTP

Log into your [Retool](https://retool.com) account and create a new SMTP Resource.

1.  Go to **Resources** and click **Create New**

<img alt="Retool SMTP - Create new Resources" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/retool-smtp-1.png" />

2.  Search for **SMTP** and select it

<img alt="Retool SMTP - Search for SMTP" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/retool-smtp-2.png" />

3.  Add name and SMTP credentials

<img alt="Retool SMTP - Add SMTP credentials" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/retool-smtp-3.png" />


# Introduction

Learn how to send your first email using the Resend Ruby SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Ruby SDK.

<CodeGroup>
  ```bash RubyGems
  gem install resend
  ```

  ```bash Gemfile
  gem 'resend'
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```rb index.rb
require "resend"

Resend.api_key = "re_123456789"

params = {
  "from": "Acme <onboarding@resend.dev>",
  "to": ["delivered@resend.dev"],
  "subject": "hello world",
  "html": "<strong>it works!</strong>"
}

sent = Resend::Emails.send(params)
puts sent
```

## 3. Try it yourself

<Card title="Ruby Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-ruby-example">
  See the full source code.
</Card>


# Introduction

Learn how to send your first email using the Resend Rust SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)

## Install

First, create a rust project with cargo and `cd` into it.

```bash
cargo init resend-rust-example
cd resend-rust-example
```

Next, add add the Rust Resend SDK as well as [Tokio](https://tokio.rs):

```bash
cargo add resend-rs
cargo add tokio -F macros,rt-multi-thread
```

The Rust SDK is Async-first so Tokio is needed.

## Send email

```rust
use resend_rs::types::CreateEmailBaseOptions;
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_123456789");

  let from = "Acme <onboarding@resend.dev>";
  let to = ["delivered@resend.dev"];
  let subject = "Hello World";

  let email = CreateEmailBaseOptions::new(from, to, subject)
    .with_html("<strong>It works!</strong>");

  let _email = resend.emails.send(email).await?;

  Ok(())
}
```

## Reading the API key

Instead of using `Resend::new` and hardcoding the API key, the `RESEND_API_KEY` environment variable
can be used instead. The `Resend::default()` should be used in that scenario instead.

### Reading the API key from a `.env` file

Another popular option is to use a `.env` file for environment variables. You can use the
[dotenv](https://crates.io/crates/dotenv) crate for that:

```bash
cargo add dotenv
```

```rust
// main.rs
use dotenv::dotenv;
use resend_rs::types::CreateEmailBaseOptions;
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let _env = dotenv().unwrap();

  let resend = Resend::default();

  let from = "Acme <onboarding@resend.dev>";
  let to = ["delivered@resend.dev"];
  let subject = "Hello World";

  let email = CreateEmailBaseOptions::new(from, to, subject)
    .with_html("<strong>It works!</strong>");

  let _email = resend.emails.send(email).await?;

  Ok(())
}
```

```toml
# .env
RESEND_API_KEY=re_123456789
```


# Sinatra

Learn how to send your first email using Sinatra and the Resend Ruby SDK.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Ruby SDK.

<CodeGroup>
  ```bash RubyGems
  gem install resend
  ```

  ```bash Gemfile
  gem 'resend'
  ```
</CodeGroup>

## 2. Send email using HTML

The easiest way to send an email is by using the `html` parameter.

```rb index.rb
require "sinatra"
require "resend"

set :port, 5000
set :bind, "0.0.0.0"

Resend.api_key = ENV["RESEND_API_KEY"]

get "/" do

  content_type :json

  params = {
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    subject: 'hello world',
    html: '<strong>it works!</strong>',
  }

  Resend::Emails.send(params).to_hash.to_json
end
```

## 3. Try it yourself

<Card title="Sinatra Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-sinatra-example">
  See the full source code.
</Card>


# Introduction

Learn how to integrate Resend via SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## SMTP Credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `25`, `465`, `587`, `2465`, or `2587`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

Ports help to instruct the type of security you want to use in your SMTP connection.

| Type     | Port                | Security                                                                  |
| -------- | ------------------- | ------------------------------------------------------------------------- |
| SMTPS    | `465`, `2465`       | Implicit SSL/TLS (Immediately connects via SSL/TLS)                       |
| STARTTLS | `25`, `587`, `2587` | Explicit SSL/TLS (First connects via plaintext, then upgrades to SSL/TLS) |

## FAQ

Once configured, you should be able to start sending emails via SMTP. Below are some frequently asked questions:

<AccordionGroup>
  <Accordion title="What if I need logs from the server to debug?">
    We currently don't provide SMTP server logs for debugging. If you run into
    issues, please [reach out to support](https://resend.com/help).
  </Accordion>

  <Accordion title="Where do I see the emails sent with SMTP?">
    Emails sent with SMTP will show in your [emails
    table](https://resend.com/emails).
  </Accordion>

  <Accordion title="Does the rate limit apply when sending with SMTP?">
    Yes, the rate limit is the [same as the
    API](https://resend.com/docs/api-reference/introduction#rate-limit).
  </Accordion>
</AccordionGroup>


# Supabase Edge Functions

Learn how to send your first email using Supabase Edge Functions.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

Make sure you have the latest version of the [Supabase CLI](https://supabase.com/docs/guides/cli#installation) installed.

## 1. Create Supabase function

Create a new function locally:

```bash
supabase functions new resend
```

## 2. Edit the handler function

Paste the following code into the `index.ts` file:

```js index.ts
import { serve } from "https://deno.land/std@0.168.0/http/server.ts";

const RESEND_API_KEY = 're_123456789';

const handler = async (_request: Request): Promise<Response> => {
    const res = await fetch('https://api.resend.com/emails', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': `Bearer ${RESEND_API_KEY}`
        },
        body: JSON.stringify({
            from: 'Acme <onboarding@resend.dev>',
            to: ['delivered@resend.dev'],
            subject: 'hello world',
            html: '<strong>it works!</strong>',
        })
    });

    const data = await res.json();

    return new Response(JSON.stringify(data), {
        status: 200,
        headers: {
            'Content-Type': 'application/json',
        },
    });
};

serve(handler);
```

## 3. Deploy and send email

Run function locally:

```bash
supabase functions start
supabase functions serve resend --no-verify-jwt
```

Deploy function to Supabase:

```bash
supabase functions deploy resend
```

Open the endpoint URL to send an email:

<img alt="Supabase Edge Functions - Deploy Function" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/supabase-edge-functions-deploy-function.png" />

## 4. Try it yourself

<Card title="Supabase Edge Functions Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-supabase-edge-functions-example">
  See the full source code.
</Card>


# Supabase with SMTP

Learn how to integrate Supabase Auth with Resend SMTP.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Get the Resend SMTP credentials

When configuring your SMTP integration, you'll need to use the following credentials:

*   **Host**: `smtp.resend.com`
*   **Port**: `465`
*   **Username**: `resend`
*   **Password**: `YOUR_API_KEY`

## 2. Integrate with Supabase SMTP

After logging into your Supabase account, you'll need to enable the SMTP integration.

1.  Go to your Supabase project
2.  Click on **Project Settings** in the left sidebar
3.  Select the **Authentication** tab
4.  Find the SMTP section and toggle the **Enable Custom SMTP** option
5.  Add your Sender email and name (these are required fields). For example: `support@acme.com` and `ACME Support`.

<img alt="Supabase Auth - SMTP Sender email and name settings" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/supabase-auth-smtp-sender-email-name.png" />

6.  You can copy-and-paste the [SMTP credentials](https://resend.com/settings/smtp) from Resend to Supabase.

<img alt="Supabase Auth - SMTP Settings" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/supabase-auth-smtp-settings.png" />

After that, you can click the **Save** button and all of your emails will be sent through Resend.


# Symfony

Learn how to send your first email using the Symfony Resend Mailer Bridge.

## Prerequisites

To get the most out of this guide, you will need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install

Get the Resend Mailer Bridge package.

```bash Composer
composer require symfony/resend-mailer
```

If your application relies on Resend webhook events, you should also install the Symfony Webhook Component.

```bash Composer
composer require symfony/webhook
```

## 2. Configuring Mailer

In your `.env.local` file, which you can create if needed, add the following:

```sh
MAILER_DSN=resend+api://API_KEY@default
MAILER_RESEND_SECRET=SIGNING_SECRET
```

Replace `API_KEY` with your Resend API key, and `SIGNING_SECRET` with your webhook secret, which can be retrieved from the Resend dashboard after creating a new webhook endpoint (see below).

## 3. Send your first email

In a controller, inject the `Mailer`:

```php
public function __construct(
    private readonly MailerInterface $mailer,
) {
}
```

In a controller action, use the `$this->mailer` to send your email:

```php
$this->mailer->send(
    (new Email())
        ->from('Acme <onboarding@resend.dev>')
        ->to('delivered@resend.dev')
        ->subject('Hello world')
        ->html('<strong>it works!</strong>')
);
```

Learn more about sending emails with Mailer Component in [Symfony's documentation](https://symfony.com/doc/current/mailer.html#creating-sending-messages).

## 4. Receive and handle webhooks

Thanks to the Webhook Component, you can create a webhook listener.

```php src/Webhook/ResendWebhookListener.php
#[AsRemoteEventConsumer('mailer_resend')]
readonly class ResendWebhookListener implements ConsumerInterface
{
    public function __construct(
        #[Autowire(param: 'kernel.project_dir')] private string $projectDir,
    ) {
    }

    public function consume(RemoteEvent $event): void
    {
        if ($event instanceof MailerDeliveryEvent) {
            $this->handleMailDelivery($event);
        } elseif ($event instanceof MailerEngagementEvent) {
            $this->handleMailEngagement($event);
        } else {
            // This is not an email event
            return;
        }
    }

    private function handleMailDelivery(MailerDeliveryEvent $event): void
    {
        // Todo
    }

    private function handleMailEngagement(MailerEngagementEvent $event): void
    {
        // Todo
    }
}
```

Bind your listener to the Webhook routing config:

```yaml config/packages/webhook.yaml
framework:
  webhook:
    routing:
      mailer_resend:
        service: 'mailer.webhook.request_parser.resend'
        secret: '%env(MAILER_RESEND_SECRET)%'
```

Next, register your application's webhook endpoint URL (example: `https://{app_domain}/webhook/mailer_resend`) in the [Resend Dashboard](https://resend.com/webhooks):

## 5. Try it yourself

<Card title="Symfony Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-symfony-example">
  See the full source code.
</Card>


# Vercel Functions

Learn how to send your first email using Vercel Functions.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

Make sure you have the latest version of the [Vercel CLI](https://vercel.com/docs/cli#installing-vercel-cli) installed.

## 1. Create a Next.js function

Create a route file under `app/api/send/route.ts` if you're using the [App Router](https://nextjs.org/docs/app/building-your-application/routing/router-handlers).

```js route.ts
const RESEND_API_KEY = 're_123456789';

export async function POST() {
  const res = await fetch('https://api.resend.com/emails', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${RESEND_API_KEY}`,
    },
    body: JSON.stringify({
      from: 'Acme <onboarding@resend.dev>',
      to: ['delivered@resend.dev'],
      subject: 'hello world',
      html: '<strong>it works!</strong>',
    }),
  });

  if (res.ok) {
    const data = await res.json();
    return Response.json(data);
  }
}
```

## 2. Send email locally

Run function locally:

```bash
npx next dev
```

Open the endpoint URL to send an email: `http://localhost:3000/api/send`

## 3. Send email in production

Deploy function to Vercel:

```bash
vercel
```

Open the endpoint URL to send an email: `https://your-project.vercel.app/api/send`

## 4. Try it yourself

<Card title="Vercel Functions Example" icon="arrow-up-right-from-square" href="https://github.com/resend/resend-vercel-functions-example">
  See the full source code.
</Card>


# WordPress

Learn how to send your first email using Wordpress.

## Prerequisites

To get the most out of this guide, you'll need to:

*   [Create an API key](https://resend.com/api-keys)
*   [Verify your domain](https://resend.com/domains)

## 1. Install a plugin

First, you'll need to install and activate the [WP Mail SMTP](https://wordpress.org/plugins/wp-mail-smtp/) plugin. Once the plugin is activated you will see the setup wizard. You can skip this step as we'll guide you through how to configure the plugin for Resend. Just click on **Go to the Dashboard** at the bottom of the screen to exit the setup wizard.

<img alt="WP Mail SMTP - Setup Wizard" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/wordpress-setup-wizard.png" />

## 2. Configuration

From your admin dashboard, visit the **WP Mail SMTP > Settings** page to configure the plugin. Firstly, configure your **From Email**, **From Name**, and **Return Path**. Next, we'll configure the SMTP settings for Resend. Select **Other SMTP** in the **Mailer** section.

<img alt="WP Mail SMTP - Settings" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/wordpress-configure.png" />

In the **Other SMTP** section, configure the following settings:

*   **SMTP Host**: `smtp.resend.com`
*   **Encryption**: `SSL`
*   **SMTP Port**: `465`
*   **Auto TLS**: `ON`
*   **Authentication**: `ON`
*   **SMTP Username**: `resend`
*   **SMTP Password**: `YOUR_API_KEY`

Make sure to replace `YOUR_API_KEY` with an existing key or create a new [API Key](https://resend.com/api-keys).

## 3. Sending a test email

From your admin dashboard, visit the **WP Mail SMTP > Tools** page to send a test email.

<img alt="WP Mail SMTP - Send a Test Email" src="https://mintlify.s3-us-west-1.amazonaws.com/resend/images/wordpress-test-email.png" />