# Introduction

MailSlurp is an email API built for developers and QA testers. It let's you create real email addresses on demand then send and receive emails from code, tests, or an online dashboard.


This is a technical guide with Javascript examples. If you are looking for help with the MailSlurp dashboard see the dashboard guides. For REST API and SDKs in Java, PHP, Python, Go and more see API documentation

# Authentication

You must have an API Key to use MailSlurp. Get a free API Key by signing up for MailSlurp.

# Install

MailSlurp has an official Javascript client on NPM that includes Typescript types. (For REST API and SDKs in other languages see the documentation page.)

To install MailSlurp:

npm install --save mailslurp-client

# Import

In a NodeJS environment:

const MailSlurp = require("mailslurp-client").default;

Or with ES6 style imports:

import { MailSlurp } from "mailslurp-client";

# Configure

To configure MailSlurp you must supply an instance with you API Key.

const mailSlurp = new MailSlurp({ apiKey: "your_key_here" });

You now have a MailSlurp instance ready to use. Let's create an inbox.