MailSlurp REST API
MailSlurp REST API documentation for managing email accounts, phone numbers, and automations.
About
Description | Value |
---|---|
Base URL | https://api.mailslurp.com |
Authentication header | x-api-key: your-api-key |
If you wish to restrict SSL to TLS 1.3 use secure-api.mailslurp.com.
Quicklinks
- Swagger UI
- Postman
- Get an API Key to authenticate.
- Examples repository
- Webhooks
Authentication
You must authenticate your requests using an API key. Pass the key in the:
- a)
x-api-key=YOUR_API_KEY
header. - b)
?apiKey=YOUR_API_KEY
query parameter.
Usage example
- Bash Curl
- Powershell
Loading...
Loading...
Endpoints
Common
EmailController
Endpoints for managing email entities. Send and read email using the email API. You can fetch emails and attachments, reply to emails, and send new emails with this controller. Emails belong to inboxes.
Each inbox can contain unlimited emails that are either permanent or temporary depending on your setup. Because emails can be quite large when attachments and content are fetched most responses only include a preview of the email and its most important features, like subject, recipients etc and an ID. Many list results are in a paginated form using an index (zero based) and a page size. To receive email decide on either waitFor
methods (such as waitForLatestEmail
on the WaitForController
) to wait for emails to arrive. Use getEmails
on EmailController
or getInboxEmails
on the InboxController
to list existing emails. To access the body or attachments of an email you need to use the getEmail
and getAttachment
endpoints with specific inbox and email IDs. The body is returned on full email entities and contains the parsed body of the email. The email headers (such as recipients, subject etc.) are stored on the email object. You can access the RAW SMTP message via various raw
methods. Attachments are treated as separate entities that have an ID and belong to the email. To fetch email attachments first fetch the full email then use a downloadAttachment
method for each attachmentID
. Attachments are transferred in a number of ways as either application/octect-stream
byte arrays or as base64 encoded strings with meta data. You may prefer either depending on the environment you are in but the base64 implementations are typically safer. See the AttachmentController
, InboxController
, and WaitForController
for similar methods.
Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.. Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Reply to an email. Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of the email that should be replied to |
Delete an email. Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to delete |
Set email favourited state. Set and return new favorite state for an email
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to set favourite state |
favourited | * | query | boolean |
Get all emails in all inboxes in paginated form. Email API list all.. 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
Request parameters
Name | Required | In | Type | Description |
inboxId | query | array | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | |
page | query | integer | Optional page index in email list pagination | |
size | query | integer | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
unreadOnly | query | boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | |
searchFilter | query | string | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body | |
since | query | string | Optional filter emails received after given date time. If unset will use time 24hours prior to now. | |
before | query | string | Optional filter emails received before given date time | |
syncConnectors | query | boolean | Sync connectors | |
plusAddressId | query | string | Optional plus address ID filter | |
favourited | query | boolean | Optional filter emails that are favourited |
Send email. Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | ID of the inbox you want to send the email from | |
useDomainPool | query | boolean | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. | |
virtualSend | query | boolean | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses |
Delete all emails in all inboxes.. Deletes all emails in your account. Be careful as emails cannot be recovered
Validate email HTML contents. Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Take a screenshot of an email in a browser. Returns binary octet-stream of screenshot of the given email
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Take a screenshot of an email in a browser and return base64 encoded string. Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Set IMAP flags associated with a message. Only supports '\Seen' flag.. Apply RFC3501 section-2.3.2 IMAP flag operations on an email
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Forward email to recipients. Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Get email content regex pattern match results. Runs regex against email body and returns match groups.. Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to match against |
Detect broken links, spelling, and images in email content. Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Show which mail clients support the HTML and CSS features used in an email body.. Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Get all emails by search criteria. Return in paginated form.. Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
Request parameters
Name | Required | In | Type | Description |
syncConnectors | query | boolean | Sync connectors | |
favourited | query | boolean | Search only favourited emails | |
plusAddressId | query | string | Optional plus address ID filter |
Show which email programs and devices support the features used in an email body.. Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
Check if email can be sent and options are valid.. Can user send email to given recipient or is the recipient blocked
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of the inbox you want to send the email from |
Mark an email as read or unread. Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | |
read | query | boolean | What value to assign to email read property. Default true. |
Mark all emails as read or unread. Marks all emails as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
Request parameters
Name | Required | In | Type | Description |
read | query | boolean | What value to assign to email read property. Default true. | |
inboxId | query | string | Optional inbox ID filter |
Get email URLs for viewing in browser or downloading. Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string |
Parse and return text from an email, stripping HTML and decoding encoded characters. Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to fetch text for |
decodeHtmlEntities | query | boolean | Decode HTML entities | |
lineSeparator | query | string | Line separator character |
Get email data including headers but not body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.. Returns a email summary object with headers. To retrieve the body see getEmail and to get raw unparsed email use the getRawEmail endpoints
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | |
decode | query | boolean |
Get raw email string. Returns unparsed raw SMTP message with headers and body.. 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
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.. Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Parse and return list of links found in an email (only works for HTML content). HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to fetch text for |
Get email content as HTML. For displaying emails in browser context.. 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`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | |
replaceCidImages | query | boolean |
Parse and return text from an email, stripping HTML and decoding encoded characters. Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to perform HTML query on |
htmlSelector | * | query | string | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. |
Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content. Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | |
replaceCidImages | query | boolean |
Get email content part by content type. Get email body content parts from a multipart email message for a given content type
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to match against |
contentType | * | query | string | Content type |
strict | query | boolean | Strict content type match | |
index | query | integer | Index of content type part if multiple |
Get email content part by content type raw response. Get email body content parts from a multipart email message for a given content type and return as response
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email to match against |
contentType | * | query | string | Content type |
strict | query | boolean | Strict content type match | |
index | query | integer | Index of content type part if multiple. Starts from 0 and applies to the result list after selecting for your content type. Content type parts are sorted by order found in original MIME message. |
Get email body as string. Returned as `plain/text` with content type header.. Returns the specified email body for a given email as a string
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Get email body in bytes. Returned as `octet-stream` with content type header.. Returns the specified email body for a given email as a stream / array of bytes.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Get all email attachment metadata. Metadata includes name and size of attachments.. Returns an array of attachment metadata such as name and content-type for a given email if present.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
attachmentId | * | path | string | ID of attachment |
apiKey | query | string | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. |
Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.. Returns the metadata such as name and content-type for a given attachment and email.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
attachmentId | * | path | string | ID of attachment |
Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
attachmentId | * | path | string | ID of attachment |
Get unread email count. Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox ID filter |
Return email threads in paginated form. Return email message chains built from Message-ID, In-Reply-To, and References header.
Request parameters
Name | Required | In | Type | Description |
htmlSelector | query | string | Optional inbox filter | |
page | query | integer | Optional page index in email thread pagination | |
size | query | integer | Optional page size in email thread pagination. Maximum size is 100. Use page index and sort to page through larger results | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter search filter for email threads. | |
since | query | string | Optional filter email threads created since time | |
before | query | string | Optional filter emails threads created before given date time |
Return email thread information. Use items endpoints to get messages for thread.. Return email message thread summary from Message-ID, In-Reply-To, and References header. Get messages using items endpoint
Request parameters
Name | Required | In | Type | Description |
threadId | * | path | string |
Return email thread items.. Return email thread messages based on Message-ID, In-Reply-To, and References header
Request parameters
Name | Required | In | Type | Description |
threadId | * | path | string | |
sort | query | string | Optional createdAt sort direction ASC or DESC |
Get all organization emails. List team or shared test email accounts. By default returns all emails across all team 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
Request parameters
Name | Required | In | Type | Description |
inboxId | query | array | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | |
page | query | integer | Optional page index in email list pagination | |
size | query | integer | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
unreadOnly | query | boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | |
searchFilter | query | string | Optional search filter search filter for emails. | |
since | query | string | Optional filter emails received after given date time. If unset will use time 24hours prior to now. | |
before | query | string | Optional filter emails received before given date time | |
syncConnectors | query | boolean | Sync connectors | |
favourited | query | boolean | Search only favorited emails | |
plusAddressId | query | string | Optional plus address ID filter |
Get all emails in all inboxes in paginated form. Email API list all.. 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
Request parameters
Name | Required | In | Type | Description |
inboxId | query | array | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | |
page | query | integer | Optional page index in email list pagination | |
size | query | integer | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
unreadOnly | query | boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | |
searchFilter | query | string | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body | |
since | query | string | Optional filter emails received after given date time | |
before | query | string | Optional filter emails received before given date time | |
favourited | query | boolean | Optional filter emails that are favourited | |
syncConnectors | query | boolean | Sync connectors | |
plusAddressId | query | string | Optional plus address ID filter |
Get latest email in all inboxes. Most recently received.. Get the newest email in all inboxes or in a passed set of inbox IDs
Request parameters
Name | Required | In | Type | Description |
inboxIds | query | array | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes |
Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.. Get the newest email in all inboxes or in a passed set of inbox IDs
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of the inbox you want to get the latest email from |
. Get gravatar url for email address
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string | |
size | query | string |
Get email count.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string |
InboxController
Endpoints for creating and managing inboxes. Also includes endpoints for listing emails within inboxes.
Inboxes are a core feature of MailSlurp. Each inbox has a unique ID and emailAddress. Inboxes can be either HTTP
or SMTP
inboxes. Both are email inboxes but HTTP
mailboxes are processed using AWS SES while SMTP
inboxes use a custom mail server listening at mxslurp.click
. Use HTTP
inboxes for testing and SMTP
inboxes for public facing inboxes. If your plan allows custom domains you can create inboxes with custom addresses that end in your domain.
By default inboxes are assigned a random email address ending in @mailslurp.com
. Use the domainPool options to use a randomly selected domain from a pool of available domains. Whenever you create an inbox MailSlurp will register the address and store any emails sent to the address within your inbox.
You can use the InboxController
endpoints to list the emails in an inbox. To get the contents or attachments of an email use the ID returned from InboxController
methods to call the EmailController
endpoints."
Set inbox favourited state. Set and return new favorite state for an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of inbox to set favourite state |
List Inboxes and email addresses. List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter.
Request parameters
Name | Required | In | Type | Description |
size | query | integer | Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Optional filter by created after given date time | |
excludeCatchAllInboxes | query | boolean | Optional exclude catch all inboxes | |
before | query | string | Optional filter by created before given date time | |
include | query | array | Optional inboxIds to include in result |
Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes.. 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.
Request parameters
Name | Required | In | Type | Description |
emailAddress | query | string | A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. 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 with the inbox ID. | |
tags | query | array | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | |
name | query | string | Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. | |
description | query | string | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with | |
useDomainPool | query | boolean | Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. | |
favourite | query | boolean | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | |
expiresAt | query | string | Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. | |
expiresIn | query | integer | Number of milliseconds that inbox should exist for | |
allowTeamAccess | query | boolean | DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. | |
inboxType | query | string | HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mxslurp.click`. | |
virtualInbox | query | boolean | Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. | |
useShortAddress | query | boolean | Use a shorter email address under 31 characters | |
domainId | query | string | ID of custom domain to use for email address. | |
domainName | query | string | FQDN domain name for the domain you have verified. Will be appended with a randomly assigned recipient name. Use the `emailAddress` option instead to specify the full custom inbox. | |
prefix | query | string | Prefix to add before the email address for easier labelling or identification. |
Delete all inboxes. 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.
Get Inbox. Returns properties of an inbox.. Returns an inbox's properties, including its email address and ID.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string |
Send Email. 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. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of the inbox you want to send the email from |
Delete inbox. Permanently delete an inbox and associated email address as well 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.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string |
Update Inbox. Change name and description. Email address is not editable.. Update editable fields on an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string |
Send email with with delay or schedule. Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of the inbox you want to send the email from |
sendAtTimestamp | query | string | Sending timestamp | |
sendAtNowPlusSeconds | query | integer | Send after n seconds | |
validateBeforeEnqueue | query | boolean | Validate before adding to queue |
Send email with queue. Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of the inbox you want to send the email from |
validateBeforeEnqueue | * | query | boolean | Validate before adding to queue |
Send email using an SMTP mail envelope and message body and return sent confirmation. Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of the inbox you want to send the email from |
Send a test email to inbox. Send an inbox a test email to test email receiving is working
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string |
List inbox rulesets. List all rulesets attached to an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | |
page | query | integer | Optional page index in inbox ruleset list pagination | |
size | query | integer | Optional page size in inbox ruleset list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time |
Create an inbox ruleset. Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | inboxId |
Send email and return sent confirmation. Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of the inbox you want to send the email from |
Create an inbox with options. Extended options for inbox creation.. Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
Create an inbox with default options. Uses MailSlurp domain pool address and is private..
Search all inboxes and return matching inboxes. Search inboxes and return in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
Is email address available. Returns whether an email address is available
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string |
. Get SMTP access usernames and passwords
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID |
. Update SMTP access usernames and passwords
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID |
. Get IMAP access usernames and passwords
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID |
. Update IMAP access usernames and passwords
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID |
List inbox tracking pixels. List all tracking pixels sent from an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | |
page | query | integer | Optional page index in inbox tracking pixel list pagination | |
size | query | integer | Optional page size in inbox tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time |
Get Inbox Sent Emails. Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | |
page | query | integer | Optional page index in inbox sent email list pagination | |
size | query | integer | Optional page size in inbox sent email list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional sent email search | |
since | query | string | Optional filter by sent after given date time | |
before | query | string | Optional filter by sent before given date time |
Get sent email count in inbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | Id of inbox that emails were sent from |
Get all scheduled email sending jobs for the inbox. Schedule sending of emails using scheduled jobs.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | |
page | query | integer | Optional page index in scheduled job list pagination | |
size | query | integer | Optional page size in scheduled job list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get sub address plus address aliases for an inbox. Returns paginated list of all plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in inbox tracking pixel list pagination | |
size | query | integer | Optional page size in inbox tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
inboxId | * | path | string | ID of the inbox you want to send the email from |
Get sub address plus address for an inbox. Returns a plus address object based on emails that used the inbox address with a +xyz alias.
Request parameters
Name | Required | In | Type | Description |
plusAddressId | * | path | string | ID of the plus address you want to fetch |
inboxId | * | path | string | ID of the inbox you want to fetch |
Get emails for a given inbox plus address. Returns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.
Request parameters
Name | Required | In | Type | Description |
plusAddressId | * | path | string | The plus address ID to fetch emails for. |
page | query | integer | Optional page index in inbox tracking pixel list pagination | |
size | query | integer | Optional page size in inbox tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
inboxId | * | path | string | ID of the inbox you want to send the email from |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time |
Get emails for a given inbox plus address. Returns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.
Request parameters
Name | Required | In | Type | Description |
plusAddress | * | query | string | The plus address to fetch emails for. If your inbox address is `123@test.com` and the email was sent to `123+abc@test.com` then the plus address is `abc` |
page | query | integer | Optional page index in inbox tracking pixel list pagination | |
size | query | integer | Optional page size in inbox tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
inboxId | * | path | string | ID of the inbox you want to send the email from |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time |
Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.. 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
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | Id of inbox that emails belongs to |
size | query | integer | Alias for limit. Assessed first before assessing any passed limit. | |
limit | query | integer | Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller | |
sort | query | string | Sort the results by received date and direction ASC or DESC | |
retryTimeout | query | integer | Maximum milliseconds to spend retrying inbox database until minCount emails are returned | |
delayTimeout | query | integer | ||
minCount | query | integer | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. | |
unreadOnly | query | boolean | ||
before | query | string | Exclude emails received after this ISO 8601 date time | |
since | query | string | Exclude emails received before this ISO 8601 date time |
Get inbox emails paginated. Get a paginated list of emails in an inbox. Does not hold connections open.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in inbox emails list pagination | |
size | query | integer | Optional page size in inbox emails list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Optional filter by received after given date time | |
before | query | string | Optional filter by received before given date time | |
inboxId | * | path | string | Id of inbox that emails belongs to |
syncConnectors | query | boolean | Sync connectors before fetching emails |
Get email count in inbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | Id of inbox that emails belongs to |
. Get all email delivery statuses for an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | |
page | query | integer | Optional page index in delivery status list pagination | |
size | query | integer | Optional page size in delivery status list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get inbox tags. Get all inbox tags
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter |
Get inbox tags paginated. Get all inbox tags paginated
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter |
Get inboxes for a tag. Get all inboxes for a given inbox tag
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
tag | * | query | string | Tag to filter by |
Get all scheduled email sending jobs for account. Schedule sending of emails using scheduled jobs. These can be inbox or account level.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in scheduled job list pagination | |
size | query | integer | Optional page size in scheduled job list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
inboxId | query | string |
Get a scheduled email job. Get a scheduled email job details.
Request parameters
Name | Required | In | Type | Description |
jobId | * | path | string |
Cancel a scheduled email job. Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.
Request parameters
Name | Required | In | Type | Description |
jobId | * | path | string |
Get all sub address plus address aliases for an inbox. Returns paginated list of all plus alias addresses found for in account based on received emails that used the inbox address with a +xyz alias.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in inbox tracking pixel list pagination | |
size | query | integer | Optional page size in inbox tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
inboxId | query | string | Optional inboxId filter |
Get sub address plus address by ID. Returns a plus address object based on emails that used the inbox address with a +xyz alias.
Request parameters
Name | Required | In | Type | Description |
plusAddressId | * | path | string | ID of the plus address you want to fetch |
inboxId | query | string | ID of the inbox you want to filter for |
List All Inboxes Paginated. List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
favourite | query | boolean | Optionally filter results for favourites only | |
search | query | string | Optionally filter by search words partial matching ID, tags, name, and email address | |
tag | query | string | Optionally filter by tags. Will return inboxes that include given tags | |
teamAccess | query | boolean | DEPRECATED. Optionally filter by team access. | |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time | |
inboxType | query | string | Optional filter by inbox type | |
inboxFunction | query | string | Optional filter by inbox function | |
domainId | query | string | Optional domain ID filter |
List all inboxes with sent emails. List inboxes that have sent emails
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC |
List Organization Inboxes Paginated. List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time |
List All Inboxes Offset Paginated. List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size in list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
favourite | query | boolean | Optionally filter results for favourites only | |
search | query | string | Optionally filter by search words partial matching ID, tags, name, and email address | |
tag | query | string | Optionally filter by tags. Will return inboxes that include given tags | |
teamAccess | query | boolean | DEPRECATED. Optionally filter by team access. | |
since | query | string | Optional filter by created after given date time | |
before | query | string | Optional filter by created before given date time | |
inboxType | query | string | Optional filter by inbox type | |
inboxFunction | query | string | Optional filter by inbox function | |
domainId | query | string | Optional domain ID filter |
. Get IMAP and SMTP access usernames and passwords
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID |
. Get IMAP and SMTP server hosts
. Get IMAP and SMTP access details in .env format
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID |
Get all inbox IDs. Get list of inbox IDs
Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.. Get the newest email in an inbox or wait for one to arrive
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of the inbox you want to get the latest email from |
timeoutMillis | * | query | integer | Timeout milliseconds to wait for latest email |
Does inbox exist. Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string | Email address |
allowCatchAll | query | boolean |
Get total inbox count.
Search for an inbox with the given name. Get a inbox result by name
Request parameters
Name | Required | In | Type | Description |
name | * | query | string |
Search for an inbox with the provided email address. Get a inbox result by email address
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string |
Delete all emails in a given inboxes.. Deletes all emails in an inbox. Be careful as emails cannot be recovered
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string |
Remove expired inboxes. Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
Request parameters
Name | Required | In | Type | Description |
before | query | string | Optional expired at before flag to flush expired inboxes that have expired before the given time |
Delete inboxes by tag. Permanently delete all inboxes by tag
Request parameters
Name | Required | In | Type | Description |
tag | * | query | string |
Delete inboxes by name. Permanently delete all inboxes by name
Request parameters
Name | Required | In | Type | Description |
name | * | query | string |
Delete inboxes by description. Permanently delete all inboxes by description
Request parameters
Name | Required | In | Type | Description |
description | * | query | string |
PhoneController
Endpoints for managing phone numbers and addresses
.
Request parameters
Name | Required | In | Type | Description |
x-test-id | header | string | ||
phoneNumberId | * | path | string |
.
.
.
.
.
Request parameters
Name | Required | In | Type | Description |
phoneCountry | query | string | Optional phone country | |
page | query | integer | Optional page index for list pagination | |
size | query | integer | Optional page size for list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
search | query | string | Optional search filter | |
include | query | array | Optional phoneIds to include in result |
.
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string |
.
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string |
.
Request parameters
Name | Required | In | Type | Description |
addressId | * | path | string |
.
Request parameters
Name | Required | In | Type | Description |
addressId | * | path | string |
SmsController
Endpoints for managing SMS
Get reply for an SMS message. Get reply for an SMS message.
Request parameters
Name | Required | In | Type | Description |
smsId | * | path | string |
Send a reply to a received SMS message. Replies are sent from the receiving number.. Reply to an SMS message.
Request parameters
Name | Required | In | Type | Description |
smsId | * | path | string |
Get all SMS messages in all phone numbers in paginated form. .. By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
Request parameters
Name | Required | In | Type | Description |
phoneNumber | query | string | Optional receiving phone number to filter SMS messages for | |
page | query | integer | Optional page index in SMS list pagination | |
size | query | integer | Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
unreadOnly | query | boolean | Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly | |
since | query | string | Optional filter SMSs received after given date time | |
before | query | string | Optional filter SMSs received before given date time | |
search | query | string | Optional search filter |
Delete all SMS messages. Delete all SMS messages or all messages for a given phone number
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | query | string |
Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController.. Returns a SMS summary object with content.
Request parameters
Name | Required | In | Type | Description |
smsId | * | path | string |
Delete SMS message.. Delete an SMS message
Request parameters
Name | Required | In | Type | Description |
smsId | * | path | string |
Get unread SMS count. Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response
Get SMS count. Get number of SMS
Other
AliasController
"Endpoints for creating, listing, and deleting email aliases. Aliases must be validated. Email aliases can be used to hide real email addresses behind an alias. If you wish to receive emails with an alias attach an inbox to the alias.
Whenever the inbox receives an email the email will be forwarded to the alias email address. See related threads
. Threads can be used with aliases to enable replying to a proxied email. This means that when threads are enabled an email alias will
create a new email thread for the message and set the replyTo and from headers on the subsequently proxied email to point to the threads unique email address.
By replying to this address the thread will forward it to the original emails sender or replyTo and use the same subject and bcc and cc contacts as the email you are replying to. For more advanced email operations using aliases use the inboxId for the given alias.
Get an email alias. Get an email alias by ID
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string |
Update an email alias.
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string |
Delete an email alias.
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string |
Reply to an email. Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string | ID of the alias that email belongs to |
emailId | * | path | string | ID of the email that should be replied to |
Get all email aliases you have created. Get all email aliases in paginated form
Request parameters
Name | Required | In | Type | Description |
search | query | string | Optional search term | |
page | query | integer | Optional page index in alias list pagination | |
size | query | integer | Optional page size in alias list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
Get emails for an alias. Get paginated emails for an alias by ID
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string | |
page | query | integer | Optional page index alias email list pagination | |
size | query | integer | Optional page size alias email list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Optional filter by sent after given date time | |
before | query | string | Optional filter by sent before given date time |
Send an email from an alias inbox. Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string |
Get threads created for an alias. Returns threads created for an email alias in paginated form
Request parameters
Name | Required | In | Type | Description |
aliasId | * | path | string | |
page | query | integer | Optional page index in thread list pagination | |
size | query | integer | Optional page size in thread list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Optional filter by sent after given date time | |
before | query | string | Optional filter by sent before given date time |
Get all threads. Returns threads created for all aliases in paginated form
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in thread list pagination | |
size | query | integer | Optional page size in thread list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Optional filter by sent after given date time | |
before | query | string | Optional filter by sent before given date time |
Get a thread. Return a thread associated with an alias
Request parameters
Name | Required | In | Type | Description |
threadId | * | path | string |
AttachmentController
Endpoints for uploading attachments. Attachments can be uploaded in a number of ways: as base64 encoded strings, as byte array octet streams, and as multipart form requests. Each upload method returns an array whose first element is the ID of the attachment. Use this Id to send the attachment with emails. See the EmailController download
endpoints for downloading attachments. Attachment downloads are based on the email ID they belong to and can be downloaded using the email controller.
Get email attachments. Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index for list pagination | |
size | query | integer | Optional page size for list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
fileNameFilter | query | string | Optional file name and content type search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
inboxId | query | string | Optional inboxId to filter attachments by |
Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment..
Delete all attachments. Delete all attachments
Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment..
Request parameters
Name | Required | In | Type | Description |
contentId | query | string | Optional content ID of attachment | |
contentType | query | string | Optional content type of attachment | |
filename | query | string | Optional name of file | |
contentTypeHeader | query | string | Optional content type header of attachment | |
x-filename | query | string | Optional content type header of attachment | |
x-filesize | query | integer | Optional content size of attachment |
Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment..
Request parameters
Name | Required | In | Type | Description |
contentType | header | string | ||
contentType | query | string | Optional contentType for file. For instance `application/pdf` | |
contentId | query | string | Optional content ID (CID) to save upload with | |
filename | query | string | Optional filename to save upload with | |
fileSize | query | integer | Optional byte length to save upload with | |
filename | header | string |
Get an attachment entity.
Request parameters
Name | Required | In | Type | Description |
attachmentId | * | path | string | ID of attachment |
Delete an attachment. Delete an attachment
Request parameters
Name | Required | In | Type | Description |
attachmentId | * | path | string | ID of attachment |
Get email attachment metadata information. Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment.
Request parameters
Name | Required | In | Type | Description |
attachmentId | * | path | string | ID of attachment |
Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
Request parameters
Name | Required | In | Type | Description |
attachmentId | * | path | string | ID of attachment |
Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents.. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
Request parameters
Name | Required | In | Type | Description |
attachmentId | * | path | string | ID of attachment |
BounceController
Endpoints for access to bounced emails and bounced recipients
Filter a list of email recipients and remove those who have bounced. Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints
Get paginated list of bounced recipients.. Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index | |
size | query | integer | Optional page size | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get a bounced email.. Bounced emails are email you have sent that were rejected by a recipient
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of the bounced recipient |
Get paginated list of unsubscribed recipients.. Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index | |
size | query | integer | Optional page size | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
domainId | query | string | Filter by domainId |
Get paginated list of bounced emails.. Bounced emails are email you have sent that were rejected by a recipient
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index | |
size | query | integer | Optional page size | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get a bounced email.. Bounced emails are email you have sent that were rejected by a recipient
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of the bounced email to fetch |
Get paginated list of complaints.. SMTP complaints made against your account
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index | |
size | query | integer | Optional page size | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get complaint. Get complaint
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of the complaint |
Can account send email. Check if account block status prevents sending
BulkActionsController
Other endpoints including advanced receive options
Bulk Send Emails.
Bulk create Inboxes (email addresses).
Request parameters
Name | Required | In | Type | Description |
count | * | query | integer | Number of inboxes to be created in bulk |
Bulk Delete Inboxes.
CommonActionsController
A collection of common actions. Groups together several controllers behind a facade with convenience methods. Not recommended. It is better in most cases to call the individual controllers directly as they are where many new features are added. The controllers are better documented too. This controller is maintained for backwards compatibility.
Send an email. If no senderId or inboxId provided a random email address will be used to send from.
Send an email using query parameters. If no senderId or inboxId provided a random email address will be used to send from. Ensure your parameters are URL encoded.
Request parameters
Name | Required | In | Type | Description |
senderId | query | string | ID of inbox to send from. If null an inbox will be created for sending | |
to | * | query | string | Email address to send to |
body | query | string | Body of the email message. Supports HTML | |
subject | query | string | Subject line of the email |
Create new random inbox. Returns an Inbox with an `id` and an `emailAddress`
Request parameters
Name | Required | In | Type | Description |
allowTeamAccess | query | boolean | ||
useDomainPool | query | boolean | ||
expiresAt | query | string | ||
expiresIn | query | integer | ||
emailAddress | query | string | ||
inboxType | query | string | ||
description | query | string | ||
name | query | string | ||
tags | query | array | ||
favourite | query | boolean | ||
virtualInbox | query | boolean | ||
useShortAddress | query | boolean | ||
domainName | query | string | ||
domainId | query | string | ||
prefix | query | string |
Create new random inbox. Returns an Inbox with an `id` and an `emailAddress`
Request parameters
Name | Required | In | Type | Description |
allowTeamAccess | query | boolean | ||
useDomainPool | query | boolean | ||
expiresAt | query | string | ||
expiresIn | query | integer | ||
emailAddress | query | string | ||
inboxType | query | string | ||
description | query | string | ||
name | query | string | ||
tags | query | array | ||
favourite | query | boolean | ||
virtualInbox | query | boolean | ||
useShortAddress | query | boolean | ||
domainName | query | string | ||
domainId | query | string | ||
prefix | query | string |
Delete all emails in an inbox. Deletes all emails
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of inbox to empty |
Delete inbox email address by inbox id. Deletes inbox email address
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of inbox to delete |
ConnectorController
Endpoints for managing inbox connectors that can sync external emails in MailSlurp inboxes
Get an inbox connector.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Update an inbox connector.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Delete an inbox connector.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get inbox connectors. List inbox connectors that sync external emails to MailSlurp inboxes
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in connector list pagination | |
size | query | integer | Optional page size in connector list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Create an inbox connector. Sync emails between external mailboxes and MailSlurp inboxes
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox ID to associate with the connector |
Delete all inbox connectors.
Sync an inbox connector.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | |
since | query | string | Date to request emails since | |
folder | query | string | Which folder to sync emails with | |
logging | query | boolean | Enable or disable logging for the sync operation |
Get an inbox connector sync settings. Get sync settings for connection with external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Create an inbox connector sync settings. Configure automatic pull or emails from external inboxes using an interval or schedule
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Create an inbox connector sync settings. Configure automatic pull or emails from external inboxes using an interval or schedule
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get an inbox connector SMTP connection. Get SMTP connection for external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Create an inbox connector SMTP connection. Allows sending via connector and email is routed to connected inbox and sent via SMTP
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Delete an inbox connector SMTP connection. Delete SMTP connection for external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Update an inbox connector SMTP connection. Update SMTP connection for external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Test an inbox connector SMTP connection. Test the SMTP connection for a connector
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Send from an inbox connector.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | |
useFallback | query | boolean |
Get an inbox connector IMAP connection. Get IMAP connection for external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Create an inbox connector IMAP connection. Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Delete an inbox connector IMAP connection. Delete IMAP connection for external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Update an inbox connector IMAP connection. Update IMAP connection for external inbox
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Test an inbox connector IMAP connection. Test the IMAP connection for a connector
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Create an inbox connector with options. Sync emails between external mailboxes and MailSlurp inboxes
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox ID to associate with the connector |
Test an inbox connector SMTP connection options. Test the SMTP connection options for a connector
Test an inbox connector IMAP connection options. Test the IMAP connection options for a connector
Get an inbox connector events.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | |
page | query | integer | Optional page index in connector list pagination | |
size | query | integer | Optional page size in connector list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
eventType | query | string | Filter by event type |
Get SMTP and IMAP connection settings for common mail providers. Get common mail provider SMTP and IMAP connection settings
Get all inbox connector events.
Request parameters
Name | Required | In | Type | Description |
id | query | string | Optional connector ID | |
page | query | integer | Optional page index in connector list pagination | |
size | query | integer | Optional page size in connector list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
eventType | query | string | Filter by event type |
Get an inbox connector event.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get connector by name. Find an inbox connector by name
Request parameters
Name | Required | In | Type | Description |
name | * | query | string | Name to search for connector by |
Get connector by inbox ID. Find an inbox connector by inbox ID
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | Inbox ID to search for connector by |
Get connector by email address. Find an inbox connector by email address
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string | Email address to search for connector by |