# REST API Documentation

The MailSlurp API gives you full control over all email entities. Send and receive emails and attachments from any programming language or environment.

TIP

This page contains the MailSlurp REST API documentation. For SDK Libraries see the docs page.

For interactive documentation see our Swagger UI page.

# Overview

# API Endpoint

Base URLhttps://api.mailslurp.com
Authentication Headerx-api-key

# Authentication

You must authenticate all API requests using an x-api-key header. For example:

curl -X POST https://api.mailslurp.com/inboxes -H 'x-api-key:{your-api-key-here}'

# Quick reference

MailSlurp has many features. Here are the most commonly used endpoints:

# Table of contents

#

# Alias Controller — createAlias

# Create an email alias

POST /aliases

# Description

Create an email alias belonging to a user ID. To create anonymous aliases use the createAnonymousAlias method.

# Parameters

Type Name Description Schema
Body createOwnedAliasOptions
required
createOwnedAliasOptions CreateOwnedAliasOptions

# Responses

HTTP Code Description Schema
201 Created No Content
202 Accepted Alias
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Alias Controller — getAliases

# Get all email aliases

GET /aliases

# Description

Get all email aliases in paginated form

# Parameters

Type Name Description Schema Default
Query page
optional
Optional page index in alias list pagination integer (int32) 0
Query size
optional
Optional page size in alias list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"

# Responses

HTTP Code Description Schema
200 OK Page<Alias>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Alias Controller — createAnonymousAlias

# Create an anonymous email alias

POST /aliases/anonymous

# Parameters

Type Name Description Schema
Body createAnonymousAliasOptions
required
createAnonymousAliasOptions CreateAnonymousAliasOptions

# Responses

HTTP Code Description Schema
201 Created Alias
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Alias Controller — getAlias

# Get an email alias

GET /aliases/{aliasId}

# Description

Get an email alias by ID

# Parameters

Type Name Description Schema
Path aliasId
required
aliasId string (uuid)

# Responses

HTTP Code Description Schema
200 OK Alias
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Alias Controller — updateAlias

# Update an owned alias

PUT /aliases/{aliasId}

# Parameters

Type Name Description Schema
Path aliasId
required
aliasId string (uuid)
Body createOwnedAliasOptions
required
createOwnedAliasOptions CreateOwnedAliasOptions

# Responses

HTTP Code Description Schema
201 Created No Content
202 Accepted Alias
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Alias Controller — deleteAlias

# Delete an owned alias

DELETE /aliases/{aliasId}

# Parameters

Type Name Description Schema
Path aliasId
required
aliasId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Attachment Controller — uploadAttachment

# Upload an attachment for sending

POST /attachments

# Description

When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.

# Parameters

Type Name Description Schema
Body uploadOptions
required
uploadOptions UploadAttachmentOptions

# Responses

HTTP Code Description Schema
201 Created < string > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Attachment Controller — uploadMultipartForm

# Upload an attachment for sending using Multipart Form

POST /attachments/multipart

# Description

When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.

# Parameters

Type Name Description Schema
Query contentType
optional
contentType string
Query filename
optional
filename string
Query x-filename
optional
x-filename string
FormData file
required
file file
Body contentTypeHeader
optional
contentTypeHeader string

# Responses

HTTP Code Description Schema
201 Created < string > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

# Consumes

  • multipart/form-data
# Security
Type Name
apiKey API_KEY

# Bulk Actions Controller — bulkCreateInboxes

# Bulk create Inboxes (email addresses)

POST /bulk/inboxes

# Parameters

Type Name Description Schema
Query count
required
Number of inboxes to be created in bulk integer (int32)

# Responses

HTTP Code Description Schema
201 Created < Inbox > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Bulk Actions Controller — bulkDeleteInboxes

# Bulk Delete Inboxes

DELETE /bulk/inboxes

# Parameters

Type Name Description Schema
Body ids
required
ids < string (uuid) > array

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Bulk Actions Controller — bulkSendEmails

# Bulk Send Emails

POST /bulk/send

# Parameters

Type Name Description Schema
Body bulkSendEmailOptions
required
bulkSendEmailOptions BulkSendEmailOptions

# Responses

HTTP Code Description Schema
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Contact Controller — createContact

# Create a contact

POST /contacts

# Parameters

Type Name Description Schema
Body createContactOptions
required
createContactOptions CreateContactOptions

# Responses

HTTP Code Description Schema
201 Created ContactDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Contact Controller — getContacts

# Get all contacts

GET /contacts

# Responses

HTTP Code Description Schema
200 OK < ContactProjection > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Contact Controller — getAllContacts

# Get all contacts

GET /contacts/paginated

# Parameters

Type Name Description Schema Default
Query page
optional
Optional page index in inbox list pagination integer (int32) 0
Query size
optional
Optional page size in inbox list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"

# Responses

HTTP Code Description Schema
200 OK Page<ContactProjection>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Contact Controller — getContact

# Get contact

GET /contacts/{contactId}

# Parameters

Type Name Description Schema
Path contactId
required
contactId string (uuid)

# Responses

HTTP Code Description Schema
200 OK ContactDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Contact Controller — deleteContact

# Delete contact

DELETE /contacts/{contactId}

# Parameters

Type Name Description Schema
Path contactId
required
contactId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Domain Controller — createDomain

# Create Domain

POST /domains

# Description

Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain.

# Parameters

Type Name Description Schema
Body domainOptions
required
domainOptions CreateDomainOptions

# Responses

HTTP Code Description Schema
201 Created DomainDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Domain Controller — getDomains

# Get domains

GET /domains

# Description

List all custom domains you have created

# Responses

HTTP Code Description Schema
200 OK < DomainPreview > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Domain Controller — getDomain

# Get a domain

GET /domains/{id}

# Description

Returns domain verification status and tokens for a given domain

# Parameters

Type Name Description Schema
Path id
required
id string (uuid)

# Responses

HTTP Code Description Schema
200 OK DomainDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Domain Controller — deleteDomain

# Delete a domain

DELETE /domains/{id}

# Description

Delete a domain. This will disable any existing inboxes that use this domain.

# Parameters

Type Name Description Schema
Path id
required
id string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
410 Gone No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — getEmailsPaginated

# Get all emails

GET /emails

# Description

By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages

# Parameters

Type Name Description Schema Default
Query inboxId
optional
Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. < string (uuid) > array(multi)
Query page
optional
Optional page index in email list pagination integer (int32) 0
Query size
optional
Optional page size in email list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"
Query unreadOnly
optional
Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly boolean "false"

# Responses

HTTP Code Description Schema
200 OK Page<EmailProjection>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — deleteAllEmails

# Delete all emails

DELETE /emails

# Description

Deletes all emails in your account. Be careful as emails cannot be recovered

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — getUnreadEmailCount

# Get unread email count

GET /emails/unreadCount

# Description

Get number of emails unread

# Responses

HTTP Code Description Schema
200 OK UnreadCount
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — getEmail

# Get email content

GET /emails/{emailId}

# Description

Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints

# Parameters

Type Name Description Schema Default
Path emailId
required
emailId string (uuid)
Query decode
optional
Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance =D7). This can be a pain for testing boolean "false"

# Responses

HTTP Code Description Schema
200 OK Email
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — deleteEmail

# Delete an email

DELETE /emails/{emailId}

# Description

Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.

# Parameters

Type Name Description Schema
Path emailId
required
emailId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — getAttachments

# Get all email attachment metadata

GET /emails/{emailId}/attachments

# Description

Returns an array of attachment metadata such as name and content-type for a given email if present.

# Parameters

Type Name Description Schema
Path emailId
required
emailId string (uuid)

# Responses

HTTP Code Description Schema
200 OK < AttachmentMetaData > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — downloadAttachment

# Get email attachment bytes

GET /emails/{emailId}/attachments/{attachmentId}

# Description

Returns the specified attachment for a given email as a byte stream (file download). You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.

# Parameters

Type Name Description Schema
Path attachmentId
required
attachmentId string
Path emailId
required
emailId string (uuid)
Query apiKey
optional
Can pass apiKey in url for this request if you wish to download the file in a browser string

# Responses

HTTP Code Description Schema
200 OK string (byte)
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

# Produces

  • application/octet-stream
# Security
Type Name
apiKey API_KEY

# Email Controller — getAttachmentMetaData

# Get email attachment metadata

GET /emails/{emailId}/attachments/{attachmentId}/metadata

# Description

Returns the metadata such as name and content-type for a given attachment and email.

# Parameters

Type Name Description Schema
Path attachmentId
required
attachmentId string
Path emailId
required
emailId string (uuid)

# Responses

HTTP Code Description Schema
200 OK AttachmentMetaData
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — forwardEmail

# Forward email

POST /emails/{emailId}/forward

# Description

Forward an existing email to new recipients.

# Parameters

Type Name Description Schema
Path emailId
required
emailId string (uuid)
Body forwardEmailOptions
required
forwardEmailOptions ForwardEmailOptions

# Responses

HTTP Code Description Schema
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — getEmailHTML

# Get email content as HTML

GET /emails/{emailId}/html

# Description

Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: ?apiKey=xxx

# Parameters

Type Name Description Schema Default
Path emailId
required
emailId string (uuid)
Query decode
optional
decode boolean "false"

# Responses

HTTP Code Description Schema
200 OK string
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

# Produces

  • text/html
# Security
Type Name
apiKey API_KEY

# Email Controller — getRawEmailContents

# Get raw email string

GET /emails/{emailId}/raw

# Description

Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint

# Parameters

Type Name Description Schema
Path emailId
required
emailId string (uuid)

# Responses

HTTP Code Description Schema
200 text/plain raw email string
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

# Produces

  • text/plain
# Security
Type Name
apiKey API_KEY

# Email Controller — getRawEmailJson

# Get raw email in JSON

GET /emails/{emailId}/raw/json

# Description

Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response

# Parameters

Type Name Description Schema
Path emailId
required
emailId string (uuid)

# Responses

HTTP Code Description Schema
200 OK RawEmailJson
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Email Controller — validateEmail

# Validate email

POST /emails/{emailId}/validate

# Description

Validate the HTML content of email if HTML is found. Considered valid if no HTML.

# Parameters

Type Name Description Schema
Path emailId
required
emailId string (uuid)

# Responses

HTTP Code Description Schema
201 Created ValidationDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Common Actions Controller — emptyInbox

# Delete all emails in an inbox

DELETE /emptyInbox

# Description

Deletes all emails

# Parameters

Type Name Description Schema
Query inboxId
required
inboxId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Form Controller — submitForm

# Submit a form to be parsed and sent as an email to an address determined by the form fields

POST /forms

# Description

This endpoint allows you to submit HTML forms and receive the field values and files via email.

# Parameters

The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email.

You must provide at-least a _to email address or a _toAlias email alias ID to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding name attributes or as URL query parameters such as ?_to=test@example.com

The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments.

# Submitting

This endpoint accepts form submission via POST method. It accepts application/x-www-form-urlencoded, and multipart/form-data content-types.

# HTML Example

<form action="https://api.mailslurp.com/forms" method="post">
  <input name="_to" type="hidden" value="test@example.com" />
  <textarea name="feedback"></textarea>
  <button type="submit">Submit</button>
</form>

# URL Example

<form
  action="https://api.mailslurp.com/forms?_toAlias=test@example.com"
  method="post"
>
  <textarea name="feedback"></textarea>
  <button type="submit">Submit</button>
</form>

The email address is specified by a _to field OR is extracted from an email alias specified by a _toAlias field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the enctype attribute, for instance: <form enctype="multipart/form-data">.

# Parameters

Type Name Description Schema
FormData _emailAddress
optional
Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. string
FormData _redirectTo
optional
Optional URL to redirect form submitter to after submission. If not present user will see a success message. string
FormData _spamCheck
optional
Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. string
FormData _subject
optional
Optional subject of the email that will be sent. string
FormData _successMessage
optional
Optional success message to display if no _redirectTo present. string
FormData _to
optional
The email address that submitted form should be sent to. Either this or _toAlias must be present for a form to be successfully submitted.. string
FormData _toAlias
optional
ID of an email alias to that form should be sent to. Aliases must be created before submission and can be used to hide an email address and reduce spam. string
FormData otherParameters
optional
All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. string

# Responses

HTTP Code Description Schema
200 OK string
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content

# Consumes

  • multipart/form-data
  • application/x-www-form-urlencoded
# Security
Type Name
apiKey API_KEY

# Group Controller — createGroup

# Create a group

POST /groups

# Parameters

Type Name Description Schema
Body createGroupOptions
required
createGroupOptions CreateGroupOptions

# Responses

HTTP Code Description Schema
201 Created GroupDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — getGroups

# Get all groups

GET /groups

# Responses

HTTP Code Description Schema
200 OK < GroupProjection > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — getAllGroups

# Get all Contact Groups in paginated format

GET /groups/paginated

# Parameters

Type Name Description Schema Default
Query page
optional
Optional page index in inbox list pagination integer (int32) 0
Query size
optional
Optional page size in inbox list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"

# Responses

HTTP Code Description Schema
200 OK Page<GroupProjection>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — getGroup

# Get group

GET /groups/{groupId}

# Parameters

Type Name Description Schema
Path groupId
required
groupId string (uuid)

# Responses

HTTP Code Description Schema
200 OK GroupDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — deleteGroup

# Delete group

DELETE /groups/{groupId}

# Parameters

Type Name Description Schema
Path groupId
required
groupId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — getGroupWithContacts

# Get group and contacts belonging to it

GET /groups/{groupId}/contacts

# Parameters

Type Name Description Schema
Path groupId
required
groupId string (uuid)

# Responses

HTTP Code Description Schema
200 OK GroupContactsDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — addContactsToGroup

# Add contacts to a group

PUT /groups/{groupId}/contacts

# Parameters

Type Name Description Schema
Path groupId
required
groupId string (uuid)
Body updateGroupContactsOption
required
updateGroupContactsOption UpdateGroupContacts

# Responses

HTTP Code Description Schema
200 OK GroupContactsDto
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Group Controller — removeContactsFromGroup

# Remove contacts from a group

DELETE /groups/{groupId}/contacts

# Parameters

Type Name Description Schema
Path groupId
required
groupId string (uuid)
Body updateGroupContactsOption
required
updateGroupContactsOption UpdateGroupContacts

# Responses

HTTP Code Description Schema
200 OK GroupContactsDto
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — createInbox

# Create an Inbox (email address)

POST /inboxes

# Description

Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.

# Parameters

Type Name Description Schema
Query description
optional
Optional description for an inbox. string
Query emailAddress
optional
Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or createDomain method. string
Query expiresAt
optional
Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates string (date-time)
Query favourite
optional
Is inbox favourited. boolean
Query name
optional
Optional name for an inbox. string
Query tags
optional
Optional tags for an inbox. Can be used for searching and filtering inboxes. < string > array(multi)

# Responses

HTTP Code Description Schema
201 Created Inbox
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — getInboxes

# List Inboxes / Email Addresses

GET /inboxes

# Description

List the inboxes you have created

# Responses

HTTP Code Description Schema
200 OK < Inbox > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — deleteAllInboxes

# Delete all inboxes

DELETE /inboxes

# Description

Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — getAllInboxes

# List Inboxes Paginated

GET /inboxes/paginated

# Description

List inboxes in paginated form. Allows for page index, page size, and sort direction. Can also filter by favourited or email address like pattern.

# Parameters

Type Name Description Schema Default
Query favourite
optional
Optionally filter results for favourites only boolean "false"
Query page
optional
Optional page index in inbox list pagination integer (int32) 0
Query search
optional
Optionally filter by search words partial matching ID, tags, name, and email address string
Query size
optional
Optional page size in inbox list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"
Query tag
optional
Optionally filter by tags string

# Responses

HTTP Code Description Schema
200 OK Page<InboxProjection>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — getInboxTags

# Get inbox tags

GET /inboxes/tags

# Description

Get all inbox tags

# Responses

HTTP Code Description Schema
200 OK < string > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — sendEmail

# Send Email

POST /inboxes/{inboxId}

# Description

Send an email from an inbox's email address. The request body should contain the SendEmailOptions that include recipients, attachments, body etc. See SendEmailOptions for all available properties. Note the inboxId refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails.

# Parameters

Type Name Description Schema
Path inboxId
optional
ID of the inbox you want to send the email from string (uuid)
Body sendEmailOptions
optional
Options for the email SendEmailOptions

# Responses

HTTP Code Description Schema
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — getInbox

# Get Inbox

GET /inboxes/{inboxId}

# Description

Returns an inbox's properties, including its email address and ID.

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)

# Responses

HTTP Code Description Schema
200 OK Inbox
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — deleteInbox

# Delete inbox

DELETE /inboxes/{inboxId}

# Description

Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — updateInbox

# Update Inbox

PATCH /inboxes/{inboxId}

# Description

Update editable fields on an inbox

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)
Body updateInboxOptions
required
updateInboxOptions UpdateInboxOptions

# Responses

HTTP Code Description Schema
200 OK Inbox
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — getEmails

# Get emails in an Inbox

GET /inboxes/{inboxId}/emails

# Description

List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the minCount parameter. The server will retry the inbox database until the minCount is satisfied or the retryTimeout is reached

# Parameters

Type Name Description Schema
Path inboxId
optional
Id of inbox that emails belongs to string (uuid)
Query limit
optional
Limit the result set, ordered by received date time sort direction integer (int32)
Query minCount
optional
Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. integer (int64)
Query retryTimeout
optional
Maximum milliseconds to spend retrying inbox database until minCount emails are returned integer (int64)
Query since
optional
Exclude emails received before this ISO 8601 date time string (date-time)
Query sort
optional
Sort the results by received date and direction ASC or DESC enum (ASC, DESC)

# Responses

HTTP Code Description Schema
200 OK < EmailPreview > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — getInboxEmailsPaginated

# Get inbox emails paginated

GET /inboxes/{inboxId}/emails/paginated

# Description

Get a paginated list of emails in an inbox. Does not hold connections open.

# Parameters

Type Name Description Schema Default
Path inboxId
optional
Id of inbox that emails belongs to string (uuid)
Query page
optional
Optional page index in inbox emails list pagination integer (int32) 0
Query size
optional
Optional page size in inbox emails list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"

# Responses

HTTP Code Description Schema
200 OK Page<EmailPreview>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Inbox Controller — setInboxFavourited

# Set inbox favourited state

PUT /inboxes/{inboxId}/favourite

# Description

Set and return new favourite state for an inbox

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)
Body setInboxFavouritedOptions
required
setInboxFavouritedOptions SetInboxFavouritedOptions

# Responses

HTTP Code Description Schema
200 OK Inbox
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Webhook Controller — createWebhook

# Attach a WebHook URL to an inbox

POST /inboxes/{inboxId}/webhooks

# Description

Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)
Body webhookOptions
required
webhookOptions CreateWebhookOptions

# Responses

HTTP Code Description Schema
201 Created WebhookDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Webhook Controller — getWebhooks

# Get all Webhooks for an Inbox

GET /inboxes/{inboxId}/webhooks

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)

# Responses

HTTP Code Description Schema
200 OK < WebhookDto > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Webhook Controller — deleteWebhook

# Delete and disable a Webhook for an Inbox

DELETE /inboxes/{inboxId}/webhooks/{webhookId}

# Parameters

Type Name Description Schema
Path inboxId
required
inboxId string (uuid)
Path webhookId
required
webhookId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# Common Actions Controller — createNewEmailAddress

# Create new random inbox

POST /newEmailAddress

# Description

Returns an Inbox with an id and an emailAddress

# Responses

HTTP Code Description Schema
201 Created Inbox
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Common Actions Controller — sendEmailSimple

# Send an email from a random email address

POST /sendEmail

# Description

To specify an email address first create an inbox and use that with the other send email methods

# Parameters

Type Name Description Schema
Body sendEmailOptions
required
sendEmailOptions SendEmailOptions

# Responses

HTTP Code Description Schema
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Template Controller — createTemplate

# Create a Template

POST /templates

# Parameters

Type Name Description Schema
Body createTemplateOptions
required
createTemplateOptions CreateTemplateOptions

# Responses

HTTP Code Description Schema
201 Created TemplateDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Template Controller — getTemplates

# Get all Templates

GET /templates

# Responses

HTTP Code Description Schema
200 OK < TemplateProjection > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Template Controller — getAllTemplates

# Get all Templates in paginated format

GET /templates/paginated

# Parameters

Type Name Description Schema Default
Query page
optional
Optional page index in inbox list pagination integer (int32) 0
Query size
optional
Optional page size in inbox list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"

# Responses

HTTP Code Description Schema
200 OK Page<TemplateProjection>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Template Controller — getTemplate

# Get Template

GET /templates/{TemplateId}

# Parameters

Type Name Description Schema
Path TemplateId
required
TemplateId string (uuid)

# Responses

HTTP Code Description Schema
200 OK TemplateDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Template Controller — deleteTemplate

# Delete Template

DELETE /templates/{TemplateId}

# Parameters

Type Name Description Schema
Path TemplateId
required
TemplateId string (uuid)

# Responses

HTTP Code Description Schema
204 No Content No Content
401 Unauthorized No Content
403 Forbidden No Content
# Security
Type Name
apiKey API_KEY

# WaitFor Controller — waitFor

# Wait for conditions to be met

POST /waitFor

# Description

Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

# Parameters

Type Name Description Schema
Body waitForConditions
optional
Conditions to wait for WaitForConditions

# Responses

HTTP Code Description Schema
200 OK < EmailPreview > array
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# WaitFor Controller — waitForEmailCount

# Wait for and return count number of emails

GET /waitForEmailCount

# Description

If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

# Parameters

Type Name Description Schema Default
Query count
optional
Number of emails to wait for. Must be greater that 1 integer (int32)
Query inboxId
optional
Id of the inbox we are fetching emails from string (uuid)
Query timeout
optional
Max milliseconds to wait integer (int64)
Query unreadOnly
optional
Optional filter for unread only boolean "false"

# Responses

HTTP Code Description Schema
200 OK < EmailPreview > array
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# WaitFor Controller — waitForLatestEmail

# Fetch inbox's latest email or if empty wait for an email to arrive

GET /waitForLatestEmail

# Description

Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods such as waitForNthEmail or waitForEmailCount.

# Parameters

Type Name Description Schema Default
Query inboxId
optional
Id of the inbox we are fetching emails from string (uuid)
Query timeout
optional
Max milliseconds to wait integer (int64)
Query unreadOnly
optional
Optional filter for unread only boolean "false"

# Responses

HTTP Code Description Schema
200 OK Email
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# WaitFor Controller — waitForMatchingEmail

# Wait or return list of emails that match simple matching patterns

POST /waitForMatchingEmails

# Description

Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options.

# Parameters

Type Name Description Schema Default
Query count
optional
Number of emails to wait for. Must be greater that 1 integer (int32)
Query inboxId
optional
Id of the inbox we are fetching emails from string (uuid)
Query timeout
optional
Max milliseconds to wait integer (int64)
Query unreadOnly
optional
Optional filter for unread only boolean "false"
Body matchOptions
required
matchOptions MatchOptions

# Responses

HTTP Code Description Schema
200 OK < EmailPreview > array
201 Created No Content
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# WaitFor Controller — waitForNthEmail

# Wait for or fetch the email with a given index in the inbox specified

GET /waitForNthEmail

# Description

If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

# Parameters

Type Name Description Schema Default
Query inboxId
optional
Id of the inbox you are fetching emails from string (uuid)
Query index
optional
Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 integer (int32)
Query timeout
optional
Max milliseconds to wait for the nth email if not already present integer (int64)
Query unreadOnly
optional
Optional filter for unread only boolean "false"

# Responses

HTTP Code Description Schema
200 OK Email
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Webhook Controller — getAllWebhooks

# List Webhooks Paginated

GET /webhooks/paginated

# Description

List webhooks in paginated form. Allows for page index, page size, and sort direction.

# Parameters

Type Name Description Schema Default
Query page
optional
Optional page index in inbox list pagination integer (int32) 0
Query size
optional
Optional page size in inbox list pagination integer (int32) 20
Query sort
optional
Optional createdAt sort direction ASC or DESC enum (ASC, DESC) "ASC"

# Responses

HTTP Code Description Schema
200 OK Page<WebhookProjection>
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Webhook Controller — getWebhook

# Get a webhook for an Inbox

GET /webhooks/{webhookId}

# Parameters

Type Name Description Schema
Path webhookId
required
webhookId string (uuid)

# Responses

HTTP Code Description Schema
200 OK WebhookDto
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Webhook Controller — sendTestData

# Send webhook test data

POST /webhooks/{webhookId}/test

# Parameters

Type Name Description Schema
Path webhookId
required
webhookId string (uuid)

# Responses

HTTP Code Description Schema
201 Created WebhookTestResult
401 Unauthorized No Content
403 Forbidden No Content
404 Not Found No Content
# Security
Type Name
apiKey API_KEY

# Definitions

# Alias

Name Schema
createdAt
required
string (date-time)
emailAddress
required
string
id
optional
string (uuid)
inboxId
optional
string (uuid)
name
optional
string
updatedAt
required
string (date-time)
userId
optional
string (uuid)

# AttachmentMetaData

Name Schema
contentLength
required
integer (int64)
contentType
required
string
id
required
string
name
required
string

# BasicAuthOptions

Basic Authentication options for webhooks. Will be used is present when calling webhook endpoints.

Name Schema
password
required
string
username
required
string

# BulkSendEmailOptions

Options for bulk sending an email from multiple addresses

Name Description Schema
inboxIds
optional
Inboxes to send the email from < string (uuid) > array
sendEmailOptions
required
SendEmailOptions

# ContactDto

Name Schema
company
optional
string
emailAddresses
required
< string > array
firstName
optional
string
id
required
string (uuid)
lastName
optional
string
metaData
optional
JsonNode
optOut
optional
boolean
tags
required
< string > array

# ContactProjection

Name Schema
company
optional
string
createdAt
required
string (date-time)
firstName
optional
string
id
required
string (uuid)
lastName
optional
string
optOut
optional
boolean

# CreateAnonymousAliasOptions

Create anonymous email alias options. Email aliases can be used to mask real email addresses behind an ID

Name Schema
emailAddress
required
string

# CreateContactOptions

Name Description Schema
company
optional
string
emailAddresses
optional
Set of email addresses belonging to the contact < string > array
firstName
optional
string
groupId
optional
Group IDs that contact belongs to string (uuid)
lastName
optional
string
metaData
optional
User metadata key value pairs to save for this contact. Can be any values you like. JsonNode
optOut
optional
Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. boolean
tags
optional
Tags that can be used to search and group contacts < string > array

# CreateDomainOptions

Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it.

Name Description Schema
domain
optional
The top level domain you wish to use with MailSlurp string

# CreateGroupOptions

Name Schema
description
optional
string
name
required
string

# CreateOwnedAliasOptions

Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address.

Name Schema
emailAddress
required
string
inboxId
optional
string (uuid)
name
optional
string

# CreateTemplateOptions

Name Schema
content
required
string
name
required
string

# CreateWebhookOptions

Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the inbox receives an email. Webhooks are great for processing many inbound emails.

Name Description Schema
basicAuth
optional
Optional basic authentication that MailSlurp should use when calling the URL. For instance if your URL is https://example.com then basic auth will call a URL like https://{username}@{password}:example.com BasicAuthOptions
name
optional
Optional name for the webhook string
url
optional
Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received. The payload of the submitted JSON is described by https://api.mailslurp.com/schemas/webhook-payload string

# DomainDto

Domain plus verification records and status

Name Schema
createdAt
required
string (date-time)
domain
required
string
id
required
string (uuid)
isVerified
required
boolean
updatedAt
required
string (date-time)
userId
required
string (uuid)
verificationToken
required
string

# DomainPreview

Preview object for domain entity

Name Schema
createdAt
required
string (date-time)
domain
required
string
id
required
string (uuid)

# Email

Representation of an email received by an inbox. Use the ID to access more properties of an email using the EmailController endpoints.

Name Description Schema
analysis
optional
Smart analysis of email content including spam ratings" EmailAnalysis
attachments
optional
List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. < string > array
bcc
optional
List of BCC recipients email was addressed to < string > array
body
optional
The body of the email message string
cc
optional
List of CC recipients email was addressed to < string > array
charset
optional
Detected character set of the email body such as UTF-8 string
createdAt
optional
When was the email received by MailSlurp string (date-time)
from
optional
Who the email was sent from string
headers
optional
< string, string > map
id
optional
ID of the email string (uuid)
inboxId
optional
ID of the inbox that received the email string (uuid)
isHTML
optional
Was HTML sent in the email body boolean
read
optional
Has the email been viewed ever boolean
subject
optional
The subject line of the email message string
to
optional
List of To recipients email was addressed to < string > array
updatedAt
optional
When was the email last updated string (date-time)
userId
optional
ID of user that email belongs string (uuid)

# EmailAnalysis

Analysis of email

Name Schema
dkimVerdict
optional
string
dmarcVerdict
optional
string
spamVerdict
optional
string
spfVerdict
optional
string
virusVerdict
optional
string

# EmailPreview

Preview of an email message. For full message call the email endpoints with the provided email id.

Name Description Schema
attachments
optional
List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. < string > array
bcc
optional
List of BCC recipients email was addressed to < string > array
cc
optional
List of CC recipients email was addressed to < string > array
createdAt
optional
When was the email received by MailSlurp string (date-time)
id
optional
ID of the email string (uuid)
read
optional
Has the email been viewed ever boolean
subject
optional
The subject line of the email message string
to
optional
List of To recipients email was addressed to < string > array

# EmailProjection

Name Schema
attachments
optional
< string > array
bcc
optional
< string > array
cc
optional
< string > array
createdAt
required
string (date-time)
id
required
string (uuid)
inboxId
required
string (uuid)
read
optional
boolean
subject
optional
string
to
required
< string > array

# ForwardEmailOptions

Options for forwarding an email

Name Schema
bcc
optional
< string > array
cc
optional
< string > array
subject
optional
string
to
required
< string > array

# GroupContactsDto

Name Schema
contacts
required
< ContactDto > array
group
required
GroupDto

# GroupDto

Name Schema
createdAt
required
string (date-time)
description
optional
string
id
required
string (uuid)
name
required
string

# GroupProjection

Name Schema
createdAt
required
string (date-time)
description
optional
string
id
required
string (uuid)
name
required
string

# HTMLValidationResult

Name Schema
errors
required
< ValidationMessage > array
isValid
required
boolean
warnings
required
< ValidationMessage > array

# Inbox

Representation of an inbox with an email address. Emails can be sent to or from this email address.

Name Description Schema
createdAt
optional
When was the inbox created string (date-time)
description
optional
Optional description of an inbox for labelling purposes string
emailAddress
optional
The inbox's email address. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints. string
expiresAt
optional
When, if ever, will the inbox expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. string (date-time)
favourite
optional
Is the inbox favourited boolean
id
optional
ID of the inbox string (uuid)
name
optional
Optional name of the inbox. Displayed in the dashboard for easier search string
tags
optional
Tags that inbox has been tagged with < string > array
userId
optional
ID of user that inbox belongs to string (uuid)

# InboxProjection

Name Schema
createdAt
required
string (date-time)
emailAddress
optional
string
expiresAt
optional
string (date-time)
favourite
optional
boolean
id
required
string (uuid)
name
optional
string
tags
optional
< string > array

# JsonNode

Name Schema
array
optional
boolean
bigDecimal
optional
boolean
bigInteger
optional
boolean
binary
optional
boolean
boolean
optional
boolean
containerNode
optional
boolean
double
optional
boolean
empty
optional
boolean
float
optional
boolean
floatingPointNumber
optional
boolean
int
optional
boolean
integralNumber
optional
boolean
long
optional
boolean
missingNode
optional
boolean
nodeType
optional
enum (ARRAY, BINARY, BOOLEAN, MISSING, NULL, NUMBER, OBJECT, POJO, STRING)
null
optional
boolean
number
optional
boolean
object
optional
boolean
pojo
optional
boolean
short
optional
boolean
textual
optional
boolean
valueNode
optional
boolean

# MatchOption

Options for matching emails in an inbox. Each match option object contains a field, should and value property. Together they form logical conditions such as SUBJECT should CONTAIN value.

Name Description Schema
field
optional
The email property to match on. One of SUBJECT, TO, BCC, CC or FROM enum (SUBJECT, TO, BCC, CC, FROM)
should
optional
What criteria to apply. CONTAIN or EQUAL. Note CONTAIN is recommended due to some SMTP servers adding new lines to fields and body content. enum (CONTAIN, EQUAL)
value
optional
The value you wish to compare with the value of the field specified using the should value passed. For example BODY should CONTAIN a value passed. string

# MatchOptions

Optional filter for matching emails based on fields

Name Description Schema
matches
optional
1 or more match options. Options are additive so if one does not match the email is excluded from results < MatchOption > array

# Pageable

Name Schema
offset
optional
integer (int64)
pageNumber
optional
integer (int32)
pageSize
optional
integer (int32)
paged
optional
boolean
sort
optional
Sort
unpaged
optional
boolean

# Page<Alias>

Name Schema
content
optional
< Alias > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<ContactProjection>

Name Schema
content
optional
< ContactProjection > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<EmailPreview>

Name Schema
content
optional
< EmailPreview > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<EmailProjection>

Name Schema
content
optional
< EmailProjection > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<GroupProjection>

Name Schema
content
optional
< GroupProjection > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<InboxProjection>

Name Schema
content
optional
< InboxProjection > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<TemplateProjection>

Name Schema
content
optional
< TemplateProjection > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# Page<WebhookProjection>

Name Schema
content
optional
< WebhookProjection > array
empty
optional
boolean
first
optional
boolean
last
optional
boolean
number
optional
integer (int32)
numberOfElements
optional
integer (int32)
pageable
optional
Pageable
size
optional
integer (int32)
sort
optional
Sort
totalElements
optional
integer (int64)
totalPages
optional
integer (int32)

# RawEmailJson

Name Schema
content
required
string

# SendEmailOptions

Options for sending an email message from an inbox. You must provide one of: to, toGroup, or toContacts to send an email. All other parameters are optional.

Name Description Schema
attachments
optional
Optional list of attachment IDs to send with this email. You must first upload each attachment separately in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. < string > array
bcc
optional
Optional list of bcc destination email addresses < string > array
body
optional
Optional contents of email. If body contains HTML then set isHTML to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with toGroup contact variables or templateVariables data. If you need more templating control consider creating a template and using the template property instead of the body. string
cc
optional
Optional list of cc destination email addresses < string > array
charset
optional
Optional charset string
from
optional
Optional from address. If not set the source inbox address will be used for this field. Beware of potential spam penalties when setting this field to an address not used by the inbox. For custom email addresses use a custom domain. string
isHTML
optional
Optional HTML flag. If true the content-type of the email will be text/html. Set to true when sending HTML to ensure proper rending on email clients boolean
replyTo
optional
Optional replyTo header string
sendStrategy
optional
Optional strategy to use when sending the email enum (SINGLE_MESSAGE)
subject
optional
Optional email subject line string
template
optional
Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of templateVariables. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. string (uuid)
templateVariables
optional
Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. object
to
optional
List of destination email addresses. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). < string > array
toContacts
optional
Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. < string (uuid) > array
toGroup
optional
Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients string (uuid)

# SetInboxFavouritedOptions

Options for setting inbox favourite state

Name Description Schema
state
optional
Should the inbox be favourited? boolean

# Sort

Name Schema
empty
optional
boolean
sorted
optional
boolean
unsorted
optional
boolean

# TemplateDto

Name Schema
content
required
string
createdAt
required
string (date-time)
id
required
string (uuid)
name
required
string
variables
required
< TemplateVariable > array

# TemplateProjection

Name Schema
createdAt
required
string (date-time)
id
required
string (uuid)
name
required
string
updatedAt
required
string (date-time)
variables
required
< string > array

# TemplateVariable

Name Schema
name
required
string
variableType
required
enum (STRING)

# UnreadCount

Name Schema
count
required
integer (int64)

# UpdateGroupContacts

Name Schema
contactIds
required
< string (uuid) > array

# UpdateInboxOptions

Options for updating inbox properties

Name Description Schema
description
optional
Optional description of an inbox for labelling purposes string
expiresAt
optional
When, if ever, will the inbox expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. string (date-time)
favourite
optional
Is the inbox favourited boolean
name
optional
Optional name of the inbox. Displayed in the dashboard for easier search string
tags
optional
Tags that inbox has been tagged with < string > array

# UploadAttachmentOptions

Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your SendEmailOptions when sending an email. This way you can use attachments multiple times once they have been uploaded.

Name Description Schema
base64Contents
optional
Base64 encoded string of file contents string
contentType
optional
Optional contentType for file. For instance application/pdf string
filename
optional
Optional filename to save upload with string

# ValidationDto

Name Schema
emailId
required
string (uuid)
html
required
HTMLValidationResult

# ValidationMessage

Name Schema
lineNumber
required
integer (int32)
message
optional
string

# WaitForConditions

Name Description Schema
count
optional
Number of results that should match conditions integer (int32)
countType
optional
Should exactly count number of results be returned or at least that many. enum (EXACTLY, ATLEAST)
inboxId
optional
Inbox to search within string (uuid)
matches
optional
Conditions that should be matched < MatchOption > array
sortDirection
optional
Direction to sort matching emails by created time enum (ASC, DESC)
timeout
optional
Max time in milliseconds to wait until conditions are met integer (int64)
unreadOnly
optional
Apply only to unread emails boolean

# WebhookDto

Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox.

Name Description Schema
basicAuth
optional
Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. boolean
createdAt
optional
When the webhook was created string (date-time)
id
optional
ID of the Webhook string (uuid)
inboxId
optional
The inbox that the Webhook will be triggered by string (uuid)
method
optional
HTTP method that your server endpoint must listen for enum (GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE)
name
optional
Name of the webhook string
payloadJsonSchema
optional
JSON Schema for the payload that will be sent to your URL via the HTTP method described. string
updatedAt
required
string (date-time)
url
optional
URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. string

# WebhookProjection

Representation of a webhook

Name Schema
createdAt
required
string (date-time)
id
required
string (uuid)
inboxId
required
string (uuid)
name
optional
string
updatedAt
required
string (date-time)
url
required
string

# WebhookTestRequest

Name Schema
headers
required
< string, string > map
method
required
enum (GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE)
payload
optional
string
url
required
string

# WebhookTestResponse

Name Schema
message
optional
string
statusCode
optional
integer (int32)

# WebhookTestResult

Results of testing a webhook

Name Schema
message
optional
string
request
required
WebhookTestRequest
response
required
WebhookTestResponse

# Security

# API_KEY

Type : apiKey
Name : x-api-key
In : HEADER