# Overview

MailSlurp gives your team real inboxes, phone numbers, event hooks, testing tooling, monitoring, and governance controls in one platform. Use this page to choose the right docs path first, then jump into the workflow closest to your job.

<div data-component="DocsButtonRow" class="docs-button-row">
  <a data-component="DocsButton" class="docs-button docs-button-primary" href="https://app.mailslurp.com/sign-up/" target="_blank" rel="noopener noreferrer">Create account</a>
  <a data-component="DocsButton" class="docs-button docs-button-secondary" href="/docs/api/">API Reference</a>
</div>

## Choose the docs path that matches your job

- [Quick start](/docs/quick-start/) for the shortest hands-on path from API key to first inbox or phone number.
- [Features hub](/docs/features/) if you want to browse the platform by capability instead of by endpoint.
- [Guides hub](/docs/guides/) if you know the workflow you want but not the right MailSlurp page yet.
- [API reference](/docs/api/) and [SDK libraries](/docs/sdks/) if you are implementing directly in code.
- [Examples](/docs/examples/), [Postman](/docs/postman/), [Bruno](/docs/bruno/), and [Insomnia](/docs/insomnia/) if you want runnable clients and API collections.

## Start by team

<div data-component="DocsStartingPointCards" class="docs-card-grid">
<a class="docs-card" href="/docs/inboxes/"><span class="docs-card-title">Developers</span><span class="docs-card-description">Create inboxes, domains, and numbers in code so product workflows stop depending on shared mailboxes.</span></a>
<a class="docs-card" href="/docs/testing/"><span class="docs-card-title">QA and release</span><span class="docs-card-description">Test sign-up, OTP, notifications, and message quality using deterministic waits and delivery checks.</span></a>
<a class="docs-card" href="/docs/campaign-probe/"><span class="docs-card-title">Marketers</span><span class="docs-card-description">Preview campaigns, audit email quality, and monitor sender or campaign health before and after launch.</span></a>
<a class="docs-card" href="/docs/webhooks/"><span class="docs-card-title">Data and ops</span><span class="docs-card-description">Capture inbound messages, extract structured content, and route events into downstream systems.</span></a>
</div>

## Browse the platform by capability

<div data-component="DocsPlatformTrackCards" class="docs-card-grid">
<a class="docs-card" href="/docs/features/"><span class="docs-card-title">Messaging</span><span class="docs-card-description">Core inboxes, email, SMS, custom domains, attachments, and external mailbox connectors.</span><span class="docs-card-cta">Browse messaging</span></a>
<a class="docs-card" href="/docs/testing/"><span class="docs-card-title">Testing</span><span class="docs-card-description">End-to-end release confidence with waits, device previews, email audit, compatibility checks, and deliverability tests.</span><span class="docs-card-cta">Open testing guide</span></a>
<a class="docs-card" href="/docs/monitoring/"><span class="docs-card-title">Monitoring</span><span class="docs-card-description">Monitor domains, live campaigns, and sender health so issues are visible before customers notice them.</span><span class="docs-card-cta">Open monitoring</span></a>
<a class="docs-card" href="/docs/features/"><span class="docs-card-title">Automation</span><span class="docs-card-description">Use webhooks, forwarding, routing rules, alias proxy, and AI transformers to turn messages into events and data pipelines.</span><span class="docs-card-cta">Open automation</span></a>
<a class="docs-card" href="/docs/organizations/"><span class="docs-card-title">Governance</span><span class="docs-card-description">Share access safely with organizations, custom roles, environment isolation, SAML SSO, and storage controls.</span><span class="docs-card-cta">Open governance</span></a>
</div>

## Key docs in each pillar

### Messaging

- [Inboxes](/docs/inboxes/) for creating isolated email addresses for apps, tests, and automations.
- [Emails](/docs/emails/) for sending, receiving, previewing, and inspecting messages.
- [TXT/SMS](/docs/txt-sms/) for real phone numbers and OTP or notification flows.
- [Attachments](/docs/attachments/) for file upload, download, and processing.
- [Custom domains](/docs/custom-domains/) and [Plus addresses](/docs/plus-addresses/) for production-style address management.
- [External mailboxes](/docs/connectors/) and [IMAP / SMTP](/docs/imap-smtp/) for integrating with existing mailbox infrastructure.

### Testing and QA

- [Testing](/docs/testing/) for integration and end-to-end message workflows.
- [Wait for methods](/docs/wait-for/) for deterministic email and SMS assertions without sleeps.
- [Device previews](/docs/device-renders/), [Email audit](/docs/email-audit/), and [Email compatibility](/docs/email-feature-check/) for release confidence.
- [Deliverability tests](/docs/deliverability-test/) for pass/fail checks across inbox or phone cohorts.
- [Test interface](/docs/test-interface/) and framework guides such as [Playwright](/docs/playwright/) and [Selenium](/docs/selenium/) for concrete test implementations.
- [MFA/TOTP devices](/docs/totp/) when authentication flows include one-time codes.

### Monitoring

- [Monitoring](/docs/monitoring/) for the overall post-launch monitoring surface.
- [Domain Monitor](/docs/domain-monitor/) for DNS posture and sender-health drift.
- [Campaign Probe](/docs/campaign-probe/) for live campaign capture and review.
- [Reputation](/docs/reputation/) for bounce, complaint, and suppression-aware sender protection.

### Automation

- [Webhooks](/docs/webhooks/) for event-driven integrations.
- [Routing rules](/docs/routing-rulesets/) for allow or block logic on inbound traffic.
- [Forwarding](/docs/forwarding/) and [Auto reply](/docs/repliers/) for operational mailbox workflows.
- [Alias proxy](/docs/alias-proxy/) for masked address routing.
- [AI transformers](/docs/ai-transformers/) and [AI results](/docs/ai-results/) for turning messages and attachments into structured data.

### Team and governance

- [Organizations](/docs/organizations/) for shared team accounts.
- [Roles and permissions](/docs/team-permissions/) for custom roles and per-user access control.
- [Environments](/docs/environments/) for staging and production separation.
- [SAML SSO](/docs/saml-sso/) for identity-provider based sign-in.
- [Storage](/docs/storage/) for retention and lifecycle expectations.
- [Guest portals](/docs/guest-portals/) when external users need controlled access.

### Developer tooling

- [Authentication](/docs/authentication/) for API key setup and safe auth patterns.
- [API reference](/docs/api/) for endpoint groups and request models.
- [SDK libraries](/docs/sdks/) and language docs such as [JavaScript](/docs/js/), [Python](/docs/python/), [Java](/docs/java/), [C#](/docs/csharp/), and [Go](/docs/go/).
- [Pagination](/docs/pagination/) for safe list and sync loops.
- [Postman](/docs/postman/), [Bruno](/docs/bruno/), and [Insomnia](/docs/insomnia/) for API collection workflows.
- [Examples](/docs/examples/) for end-to-end reference implementations.

## How MailSlurp fits together

Most teams follow the same flow:

1. Provision a fresh inbox, phone number, or mailbox connection.
2. Run the workflow that should send or receive a real message.
3. Inspect the message synchronously with wait methods or asynchronously with webhooks.
4. Add monitoring, access controls, and environment separation as the workflow moves toward production.

![Programmatic access](/mermaid-gen/programmatic-access.mmd.svg)

## Get an SDK running

Start with an SDK setup snippet in your language. The same workflows are also available over the REST API.

```javascript
// create mailslurp client
const { MailSlurp } = require('mailslurp-client');
const mailslurp = new MailSlurp({ apiKey: process.env.API_KEY });

// create inboxes
const inbox1 = await mailslurp.createInbox();
const inbox2 = await mailslurp.createInbox();

// send email
await mailslurp.sendEmail(inbox1.id, {
  to: [inbox2.emailAddress],
  subject: "Test",
  body: "<span>Hello 👋",
  isHTML: true
})

// receive email using wait methods
const email = await mailslurp.waitForLatestEmail(inbox2.id, 60000, true)
expect(email.body).toContain("Hello")

// list emails in inbox
const emails = await mailslurp.inboxController.getInboxEmailsPaginated({inboxId: inbox2.id})
expect(emails.numberOfElements).toEqual(1)
```

```csharp
// create client
var config = new Configuration();
config.ApiKey.Add("x-api-key", ApiKey);

// create inboxes
var inboxControllerApi = new InboxControllerApi(config);
var inbox1 = inboxControllerApi.CreateInbox();
var inbox2 = inboxControllerApi.CreateInbox();

// send email
inboxControllerApi.SendEmail(inbox1.Id, new SendEmailOptions(
    to: new List<string> { inbox2.EmailAddress },
    subject: "Test CSharp",
    body: "<span>Hello",
    isHTML: true
));

// receive email with wait controller
var email = new WaitForControllerApi(config).WaitForLatestEmail(inbox2.Id, 60000, true);
StringAssert.Contains(email.Body, "Hello");

// list emails in inbox
var emails = inboxControllerApi.GetInboxEmailsPaginated(inbox2.Id);
Assert.AreEqual(emails.TotalElements, 1);
```

```go
// create a context with your api key
ctx := context.WithValue(context.Background(), mailslurp.ContextAPIKey, mailslurp.APIKey{Key: apiKey})

// create mailslurp client
client := mailslurp.NewAPIClient(mailslurp.NewConfiguration())

// create inboxes
inbox1, _, err := client.InboxControllerApi.CreateInbox(ctx, &mailslurp.CreateInboxOpts{})
inbox2, _, err := client.InboxControllerApi.CreateInbox(ctx, &mailslurp.CreateInboxOpts{})
assert.Nil(t, err)

// send email from inbox 1 to inbox 2
_, err = client.InboxControllerApi.SendEmail(ctx, inbox1.Id, mailslurp.SendEmailOptions{
	To:      []string{inbox2.EmailAddress},
	Subject: "Test",
	Body:    "<span>Hello",
	IsHTML:  true,
})
assert.Nil(t, err)

// now receive the email at inbox 2
email, _, err := client.WaitForControllerApi.WaitForLatestEmail(ctx, &mailslurp.WaitForLatestEmailOpts{
	InboxId:    optional.NewInterface(inbox2.Id),
	Timeout:    optional.NewInt64(60000),
	UnreadOnly: optional.NewBool(true),
})
assert.Nil(t, err)
assert.Contains(t, email.Body, "Hello")

// list emails
emails, _, err := client.InboxControllerApi.GetInboxEmailsPaginated(ctx, inbox2.Id, nil)
assert.Nil(t, err)
assert.Equal(t, emails.TotalElements, int64(1))
```

```java
// create client
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey(apiKey);
client.setHttpClient(httpClient);

// create inboxes
InboxControllerApi inboxControllerApi = new InboxControllerApi(client);
InboxDto inbox1 = inboxControllerApi.createInboxWithDefaults().execute();
InboxDto inbox2 = inboxControllerApi.createInboxWithDefaults().execute();

// send email
SendEmailOptions sendOptions = new SendEmailOptions();
sendOptions.setTo(Collections.singletonList(inbox2.getEmailAddress()));
sendOptions.setSubject("Test");
sendOptions.setBody("<span>Hello");
sendOptions.setIsHTML(true);
inboxControllerApi.sendEmail(inbox1.getId(), sendOptions);

// receive email with wait for controller
Email email = new WaitForControllerApi(client).waitForLatestEmail().inboxId(inbox2.getId()).timeout(60000L).unreadOnly(true).execute();
assertEquals(email.getBody().contains("Hello"), true);

// list emails in inbox
PageEmailPreview emails = inboxControllerApi.getInboxEmailsPaginated(inbox2.getId()).execute();
```

```php
// configure client with api key
$config = MailSlurp\Configuration::getDefaultConfiguration()
    ->setApiKey('x-api-key', getenv('API_KEY'));

// create an inbox controller with config
$inboxController = new MailSlurp\Apis\InboxControllerApi(null, $config);

// create inboxes
$inbox1 = $inboxController->createInbox();
$inbox2 = $inboxController->createInbox();

// send an email
$inboxController->sendEmail($inbox1->getId(), new \MailSlurp\Models\SendEmailOptions(array(
    'to' => array($inbox2->getEmailAddress()),
    'subject' => 'Test email',
    'body' => '<span>Hello 👋',
    'is_html' => true
)));

// wait for email
$waitForController = new MailSlurp\Apis\WaitForControllerApi(null, $config);
$email = $waitForController->waitForLatestEmail($inbox2->getId(), 60_000, true);
PHPUnit\Framework\Assert::assertStringContainsString("Hello", $email->getBody());

// list emails in inbox
$emails = $inboxController->getInboxEmailsPaginated($inbox2->getId());
PHPUnit\Framework\Assert::assertEquals(1, $emails->getTotalElements());
```

```python
import mailslurp_client
# create a mailslurp configuration
configuration = mailslurp_client.Configuration()
configuration.api_key['x-api-key'] = api_key
with mailslurp_client.ApiClient(configuration) as api_client:
    # create an inbox
    inbox_controller = mailslurp_client.InboxControllerApi(api_client)
    inbox_1 = inbox_controller.create_inbox()
    inbox_2 = inbox_controller.create_inbox()

    # send email
    opts = mailslurp_client.SendEmailOptions()
    opts.to = [inbox_2.email_address]
    opts.subject = "Hello"
    opts.body = "Email content <strong>supports HTML</strong>"
    opts.is_html = True
    inbox_controller.send_email(inbox_1.id, send_email_options=opts)

    # receive email with wait controller
    wait_controller = mailslurp_client.WaitForControllerApi(api_client)
    email = wait_controller.wait_for_latest_email(inbox_id=inbox_2.id, timeout=60000, unread_only=True)

    # assert that the message was received
    assert email.inbox_id == inbox_2.id
    assert email.subject == "Hello"
    assert "Email content" in email.body

    # list emails in inbox
    emails = inbox_controller.get_inbox_emails_paginated(inbox_2.id)
    assert len(emails.content) >= 1
```

```ruby
# configure mailslurp client
MailSlurpClient.configure do |config|
  config.api_key['x-api-key'] = API_KEY
end

# create inboxes
inbox_controller = MailSlurpClient::InboxControllerApi.new
inbox_1 = inbox_controller.create_inbox
inbox_2 = inbox_controller.create_inbox

# send an email
inbox_controller.send_email(inbox_1.id,{
  to: [inbox_2.email_address],
  subject: 'Test',
  isHTML: true,
  body: '<h1>Hello!</h1>'
})

# receive email with wait controller
wait_controller = MailSlurpClient::WaitForControllerApi.new
email = wait_controller.wait_for_latest_email({ inbox_id: inbox_2.id, timeout: 60000 })
expect(email.body).to include("Hello")

# list inbox emails
emails = inbox_controller.get_emails(inbox_2.id)
expect(emails.length).to be(1)
```

<div data-component="DocsButtonRow" class="docs-button-row">
<a data-component="DocsButton" class="docs-button docs-button-secondary" href="/docs/sdks/">SDK documentation</a>
</div>

## Representative code samples

Examples below use JavaScript because the snippets are shortest there. The same flows exist across the SDKs and direct HTTP API.

### Create an inbox

```javascript
// create an inbox
const inbox = await mailslurp.inboxController.createInboxWithDefaults();
expect(inbox.emailAddress).toMatch(/.+@.+/);
```

### Wait for a real email

```typescript
// send an email
await mailslurp.inboxController.sendEmailAndConfirm({
    inboxId: inbox.id,
    sendEmailOptions: {
        to: [inbox.emailAddress],
        subject: "First email",
    }
})
// wait for the first unread email to arrive
const email = await mailslurp.waitController.waitForLatestEmail({
    timeout: 120_000,
    inboxId: inbox.id,
    unreadOnly: true
})
expect(email.subject).toContain('First email')
```

### Push events to your server

```typescript
const inbox = await mailslurp.createInbox();
const webhook = await mailslurp.webhookController.createWebhook({
  inboxId: inbox.id!,
  createWebhookOptions: {
    eventName: CreateWebhookOptionsEventNameEnum.NEW_EMAIL,
    url: testEndpoint.url!!,
  },
});
```

### Add SMS coverage

```javascript
const phone = await mailslurp.phoneController.createPhoneNumber({
  createPhoneNumberOptions: {
    name: 'Sales inbound',
    phoneCountry: CreatePhoneNumberOptionsPhoneCountryEnum.US,
  }
})
expect(phone.phoneNumber).toContain('+1')
```

## What to read next

- Building product messaging flows: [Inboxes](/docs/inboxes/), [Emails](/docs/emails/), [Custom domains](/docs/custom-domains/), and [Verification](/docs/verification/).
- Shipping release checks: [Testing](/docs/testing/), [Wait for methods](/docs/wait-for/), [Device previews](/docs/device-renders/), and [Deliverability tests](/docs/deliverability-test/).
- Automating downstream actions: [Webhooks](/docs/webhooks/), [Forwarding](/docs/forwarding/), [Routing rules](/docs/routing-rulesets/), and [AI transformers](/docs/ai-transformers/).
- Rolling out to teams safely: [Organizations](/docs/organizations/), [Roles and permissions](/docs/team-permissions/), [Environments](/docs/environments/), and [Storage](/docs/storage/).
