APIYard
Back to APIs
CommunicationBearer TokenFree tier

Resend

Resend is the easiest way to send transactional emails from your app using React Email templates or plain HTML.

Base URL

https://api.resend.com
emailReact Emailtransactionaldeveloper-firstwebhooks

Endpoints

POST/emails

Send a transactional email.

const response = await fetch("https://api.resend.com/emails", {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  },
  body: JSON.stringify({
  "from": "Acme <onboarding@resend.dev>",
  "to": [
    "user@example.com"
  ],
  "subject": "Welcome to Acme!",
  "html": "<p>Thanks for signing up!</p>"
})
});

const data = await response.json();
console.log(data);

Response Preview

{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}
GET/emails/{id}

Get the status and details of a sent email.

const response = await fetch("https://api.resend.com/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }
});

const data = await response.json();
console.log(data);

Response Preview

{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
  "from": "Acme <onboarding@resend.dev>",
  "to": ["user@example.com"],
  "subject": "Welcome to Acme!",
  "created_at": "2024-05-01T10:00:00.000Z",
  "last_event": "delivered"
}