Vanta
Docs Blog
Text Size 100%

Getting Started

Learn how to integrate our API into your application in minutes.

1 MIN READ

Introduction

Welcome to the documentation. This guide will help you get up and running with our API. We designed it to be simple, valid, and easy to use.

Prerequisites

Before you begin, make sure you have the following:

  • Node.js 14+ installed
  • An API Key (get one from the dashboard)

Installation

Install the package via npm or yarn:

1npm install resend

Sending your first email

Here is a simple example of how to send an email using our SDK.

 1import { Resend } from 'resend';
 2
 3const resend = new Resend('re_123456789');
 4
 5resend.emails.send({
 6  from: 'onboarding@resend.com',
 7  to: 'user@gmail.com',
 8  subject: 'Hello World',
 9  html: '<p>Congrats on sending your first email!</p>'
10});

Error Handling

We use standard HTTP response codes.

| Code | Description |

DataDescription
200OK
400Bad Request
401Unauthorized

Next Steps

Now that you’ve sent your first email, check out our advanced guides to learn more.