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 |
selector | query | string | Optional HTML query selector for links |
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
Get a phone number by ID. Get a phone number by ID
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string |
Update a phone number. Set field for phone number
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string | ID of phone to set favourite state |
Delete a phone number. Remove phone number from account
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string |
Set phone favourited state. Set and return new favorite state for a phone
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string | ID of phone to set favourite state |
Test sending an SMS to a number. Test a phone number by sending an SMS to it
Request parameters
Name | Required | In | Type | Description |
x-test-id | header | string | ||
phoneNumberId | * | path | string |
Get emergency addresses. List emergency addresses
Create an emergency address. Add an emergency address to a phone number
Get consent status. Get the status of phone usage consent
Set consent status. Give or revoke consent for phone usage
Request parameters
Name | Required | In | Type | Description |
agree | * | query | boolean |
Get phone plans. Get phone number plans
Get phone plans availability.
Get phone numbers. List phone numbers for account
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 | |
favourite | query | boolean | Optionally filter results for favourites only |
Get an emergency address. Fetch an emergency address by ID
Request parameters
Name | Required | In | Type | Description |
addressId | * | path | string |
Delete an emergency address. Delete an emergency address
Request parameters
Name | Required | In | Type | Description |
addressId | * | path | string |
SmsController
Endpoints for managing SMS
.
Request parameters
Name | Required | In | Type | Description |
smsId | * | path | string | ID of SMS to set favourite state |
favourited | * | query | boolean |
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 | |
favourite | query | boolean | Optionally filter results for favourites only |
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 filename header of attachment | |
x-filename-raw | query | string | Optional raw filename header of attachment that will be converted to punycode | |
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 |
ContactController
Endpoints for managing contacts. Contacts can be used for sending emails to individuals and groups.
Get all contacts.
Create a contact.
Get contact.
Request parameters
Name | Required | In | Type | Description |
contactId | * | path | string |
Delete contact.
Request parameters
Name | Required | In | Type | Description |
contactId | * | path | string |
Get contact vCard vcf file.
Request parameters
Name | Required | In | Type | Description |
contactId | * | path | string |
Get all contacts.
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 | |
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 | Search terms |
DomainController
Endpoints for managing custom domains. Once you create a custom domain you must add the returned verification records to your hosting provider. See support or guides for more information.
Get a domain. Returns domain verification status and tokens for a given domain
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | |
checkForErrors | query | boolean |
Update a domain. Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Delete a domain. Delete a domain. This will disable any existing inboxes that use this domain.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get domains. List all custom domains you have created
Create Domain. 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.
Get catch all wild card inbox for domain. Get the catch all inbox for a domain for missed emails
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Add catch all wild card inbox to domain. Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get MailSlurp domains. List all MailSlurp domains used with non-custom email addresses
Request parameters
Name | Required | In | Type | Description |
inboxType | query | string |
Get domain issues. List domain issues for domains you have created
Get all usable domains. List all domains available for use with email address creation
Request parameters
Name | Required | In | Type | Description |
inboxType | query | string |
EmailVerificationController
Validate a list of email addresses. Per unit billing. See your plan for pricing.. Verify a list of email addresses is valid and can be contacted.
Validate a list of email addresses. Per unit billing. See your plan for pricing.. List email verification requests
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size for paginated result list. | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
isValid | query | boolean | Filter where email is valid is true or false |
Delete all validation requests. Remove validation requests
Delete a validation record. Delete a validation record
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
ExpiredController
View and manage expired inbox records. If an inbox has an expiration date when it is created it will expire at that time and an ExpiredInboxRecord will be created for it listing the email address and inbox ID. You can still view emails belonging to the inbox by using the inbox ID but the inbox can no longer send or receive emails once expired.
List records of expired inboxes. Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
Request parameters
Name | Required | In | Type | Description |
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 | |
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 | Optionally filter by inbox ID |
Get an expired inbox record. Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
Request parameters
Name | Required | In | Type | Description |
expiredId | * | path | string | ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId |
Get expired inbox record for a previously existing inbox. Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | ID of inbox you want to retrieve (not the inbox ID) |
Get default expiration settings. Return default times used for inbox expiration
ExportController
Endpoints for exporting user data to CSV, XML and other formats.
Export inboxes link callable via browser.
Request parameters
Name | Required | In | Type | Description |
exportType | * | query | string | |
apiKey | * | query | string | |
outputFormat | * | query | string | |
filter | query | string | ||
listSeparatorToken | query | string | ||
excludePreviouslyExported | query | boolean | ||
createdEarliestTime | query | string | ||
createdOldestTime | query | string |
Get export link.
Request parameters
Name | Required | In | Type | Description |
exportType | * | query | string | |
apiKey | query | string |
FormController
Form controller for submitting email-able forms
Submit a form to be parsed and sent as an email to an address determined by the form fields. 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 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 ```html <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 ```html <form action="https://api.mailslurp.com/forms?_to=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">`.
Request parameters
Name | Required | In | Type | Description |
_to | query | string | The email address that submitted form should be sent to. | |
_subject | query | string | Optional subject of the email that will be sent. | |
_redirectTo | query | string | Optional URL to redirect form submitter to after submission. If not present user will see a success message. | |
_emailAddress | query | string | Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. | |
_successMessage | query | string | Optional success message to display if no _redirectTo present. | |
_spamCheck | query | string | 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. | |
otherParameters | query | string | 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. |
GroupController
Endpoints for managing groups. Groups can be used for sending emails to individuals and groups.
Get group and contacts belonging to it.
Request parameters
Name | Required | In | Type | Description |
groupId | * | path | string |
Add contacts to a group.
Request parameters
Name | Required | In | Type | Description |
groupId | * | path | string |
Remove contacts from a group.
Request parameters
Name | Required | In | Type | Description |
groupId | * | path | string |
Get all groups.
Create a group.
Get group.
Request parameters
Name | Required | In | Type | Description |
groupId | * | path | string |
Delete group.
Request parameters
Name | Required | In | Type | Description |
groupId | * | path | string |
. Get group and paginated contacts belonging to it
Request parameters
Name | Required | In | Type | Description |
groupId | * | path | string | |
page | query | integer | Optional page index in group contact pagination | |
size | query | integer | Optional page size in group contact 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 all Contact Groups in paginated format.
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 | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
GuestPortalController
"Endpoints for managing guest portals and customer access to shareable email accounts. Use portals to grant your customers access to unique email accounts with a separate login and viewing endpoint.
Get guest portals. Get portals
Create a portal page for your customers or clients to log into email accounts and view emails.. Create a guest login page for customers or clients to access assigned email addresses
Get all guest users for portal. Get customers for a portal
Request parameters
Name | Required | In | Type | Description |
portalId | * | path | string | |
search | query | string | Optional search term | |
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 | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Create a portal guest user. Add customer to portal
Request parameters
Name | Required | In | Type | Description |
portalId | * | path | string |
Get a client email portal. Fetch a customer guest portal
Request parameters
Name | Required | In | Type | Description |
portalId | * | path | string |
Get guest user for portal. Get customer for portal
Request parameters
Name | Required | In | Type | Description |
portalId | * | path | string | |
guestId | * | path | string |
Get all guest users for portal. Get all customers for a portal
Request parameters
Name | Required | In | Type | Description |
portalId | query | string | Optional portal ID | |
search | query | string | Optional search term | |
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 | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get guest user. Get customer by ID
Request parameters
Name | Required | In | Type | Description |
guestId | * | path | string |
ImapController
Endpoints for performing IMAP like commands on inboxes
. Update message flags
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string |
Get status for mailbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID to list |
Search messages in an inbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID to search |
Create a new mailbox if possible.
Request parameters
Name | Required | In | Type | Description |
name | * | query | string | Inbox email address to create |
List messages in an inbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID to list |
Get a message by email ID.
Request parameters
Name | Required | In | Type | Description |
emailId | * | query | string | Email ID to get |
inboxId | query | string | Inbox ID to search |
Fetch message in an inbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox ID to search | |
seqNum | * | query | integer |
InboxForwarderController
Endpoints for creating and managing inbox forwarders. Automatically forward emails received by inboxes using rules.
List inbox forwarders. List all forwarders attached to an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox id to get forwarders from | |
page | query | integer | Optional page index in inbox forwarder list pagination | |
size | query | integer | Optional page size in inbox forwarder list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Test inbox forwarders for inbox. Test inbox forwarders for inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of inbox |
Create an inbox forwarder. Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Inbox id to attach forwarder to |
Delete inbox forwarders. Delete inbox forwarders. Accepts optional inboxId filter.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox id to attach forwarder to |
Test new inbox forwarder. Test new inbox forwarder
Get an inbox forwarder. Get inbox forwarder
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox forwarder |
Update an inbox forwarder. Update inbox forwarder
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox forwarder |
Delete an inbox forwarder. Delete inbox forwarder
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox forwarder |
Test an inbox forwarder. Test an inbox forwarder
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox forwarder |
Get an inbox forwarder event list. Get inbox forwarder events
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox forwarder |
page | query | integer | Optional page index in inbox forwarder event list pagination | |
size | query | integer | Optional page size in inbox forwarder event list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC |
Get an inbox forwarder event. Get inbox forwarder event
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox forwarder |
eventId | * | path | string | ID of inbox forwarder event |
Get all inbox forwarder events. Get all inbox forwarder events
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in inbox forwarder event list pagination | |
size | query | integer | Optional page size in inbox forwarder event list pagination | |
inboxId | query | string | Optional inbox ID to filter for | |
emailId | query | string | Optional email ID to filter for | |
sentId | query | string | Optional sent ID to filter for | |
sort | query | string | Optional createdAt sort direction ASC or DESC |
Get a forwarder event. Get forwarder event
Request parameters
Name | Required | In | Type | Description |
eventId | * | path | string | ID of inbox forwarder event |
InboxReplierController
Endpoints for creating and managing inbox repliers. Repliers can automatically reply to emails received by inboxes using rules.
Get an inbox replier. Get inbox ruleset
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox replier |
Update an inbox replier. Update inbox ruleset
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox replier |
Delete an inbox replier. Delete inbox replier
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox replier |
List inbox repliers. List all repliers attached to an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox id to get repliers from | |
page | query | integer | Optional page index in inbox replier list pagination | |
size | query | integer | Optional page size in inbox replier 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 replier. Create a new inbox rule for reply toing, blocking, and allowing emails when sending and receiving
Delete inbox repliers. Delete inbox repliers. Accepts optional inboxId filter.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox id to attach replier to |
Get an inbox replier event list. Get inbox ruleset events
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox replier |
page | query | integer | Optional page index in inbox replier event list pagination | |
size | query | integer | Optional page size in inbox replier event list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC |
Get inbox replier event list. Get all inbox ruleset events
Request parameters
Name | Required | In | Type | Description |
inboxReplierId | query | string | ID of inbox replier | |
inboxId | query | string | ID of inbox | |
emailId | query | string | ID of email | |
sentId | query | string | ID of sent | |
page | query | integer | Optional page index in inbox replier event list pagination | |
size | query | integer | Optional page size in inbox replier event list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC |
InboxRulesetController
Endpoints for creating and managing inbox rulesets. Inbox rulesets are sets of rules that can be automatically applied to inbound and outbound emails for an inbox. Rulesets can have a scope, action, and target. The scope is receiving or sending emails. The action is to block, allow, or forward an email. The target is pattern or email address depending on the action. The handler can be used to handle rules silently or trigger an exception when they occur. See inbox controller for similar methods.
List inbox rulesets. List all rulesets attached to an inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox id to get rulesets from | |
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 | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Test inbox rulesets for inbox. Test inbox rulesets for inbox
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | ID of inbox |
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 | query | string | Inbox id to attach ruleset to |
Delete inbox rulesets. Delete inbox rulesets. Accepts optional inboxId filter.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox id to attach ruleset to |
Test new inbox ruleset. Test new inbox ruleset
Test an inbox ruleset. Test an inbox ruleset
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox ruleset |
Test sending with inbox rulesets. Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets
Test receiving with inbox rulesets. Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets
Get an inbox ruleset. Get inbox ruleset
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox ruleset |
Delete an inbox ruleset. Delete inbox ruleset
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | ID of inbox ruleset |
MailServerController
Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server..
Get IP address for a domain.
Request parameters
Name | Required | In | Type | Description |
name | * | query | string |
Get DNS Mail Server records for a domain.
Lookup DNS records for multiple domains.
Lookup DNS records for a domain.
MissedEmailController
Endpoints for managing MissedEmails. Missed emails are saved whenever your account cannot persist a received email because your plan had exceeded a given usage at the time. Missed emails can be restored with the assistance of the support team.
Restore missed emails. If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method.
Get all MissedEmails in paginated format.
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 | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
inboxId | query | string | Optional inbox ID filter |
Get MissedEmail. List emails that were missed due to plan limits.
Request parameters
Name | Required | In | Type | Description |
missedEmailId | * | path | string |
Wait for Nth missed email. Wait for 0 based index missed email
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inbox ID filter | |
timeout | query | integer | Optional timeout milliseconds | |
index | * | query | integer | Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get all unknown missed emails in paginated format. Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox.
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 | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
inboxId | query | string | Optional inbox ID filter |
SentEmailsController
Endpoints for viewing sent email receipts. These can be used to verify that an email has been sent or for historical records. Email content and attachments are stored. For legacy reasons the default send endpoint does not return a sent email. Use the sendEmailAndConfirm
methods to receive a sent email receipt after sending.
Get all sent emails in paginated form.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inboxId to filter sender of sent emails by | |
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 search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Delete all sent email receipts.
. Get all sent email delivery statuses
Request parameters
Name | Required | In | Type | Description |
sentId | * | path | string | ID of the sent email that you want to get the delivery status of. Sent email object is returned when sending an email |
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 sent email receipt.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Delete sent email receipt.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get sent email URL for viewing in browser or downloading. Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
. Get all tracking pixels for a sent email in paginated form
Request parameters
Name | Required | In | Type | Description |
id | * | path | string | |
page | query | integer | Optional page index in sent email tracking pixel list pagination | |
size | query | integer | Optional page size in sent email tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get sent email HTML content.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
Get raw sent email string. Returns unparsed raw SMTP message with headers and body.. Returns a raw, unparsed, and unprocessed sent 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 getRawSentEmailJson endpoint
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.. Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response
Request parameters
Name | Required | In | Type | Description |
emailId | * | path | string | ID of email |
. Get all sent email tracking pixels in paginated form
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in sent email tracking pixel list pagination | |
size | query | integer | Optional page size in sent email tracking pixel list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Get results of email sent with queues in paginated form.
Request parameters
Name | Required | In | Type | Description |
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 | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
. Get all sent organization emails in paginated form
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Optional inboxId to filter sender of sent emails by | |
page | query | integer | Optional page index in sent email list pagination | |
size | query | integer | Optional page size in sent email list pagination | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
. Get all sent email delivery statuses
Request parameters
Name | Required | In | Type | Description |
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 a sent email delivery status
Request parameters
Name | Required | In | Type | Description |
deliveryId | * | path | string |
. Wait for delivery statuses
Request parameters
Name | Required | In | Type | Description |
sentId | query | string | Optional sent email ID filter | |
inboxId | query | string | Optional inbox ID filter | |
timeout | query | integer | Optional timeout milliseconds | |
index | query | integer | Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
TemplateController
Endpoints for managing Templates. Templates can be used when sending emails and support moustache syntax template variables. Variables can be passed with send email options or implicitly available if Contact Groups are used.
Get template. Get email template
Request parameters
Name | Required | In | Type | Description |
templateId | * | path | string | Template ID |
Update template. Update email template
Request parameters
Name | Required | In | Type | Description |
templateId | * | path | string | Template ID |
Delete email template. Delete template
Request parameters
Name | Required | In | Type | Description |
templateId | * | path | string | Template ID |
List templates. Get all templates
Create a Template. Create an email template with variables for use with templated transactional emails.
Get template preview Json. Get email template preview with passed template variables in JSON format. Pass template variables as query params.
Request parameters
Name | Required | In | Type | Description |
templateId | * | path | string | Template ID |
Get template preview HTML. Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.
Request parameters
Name | Required | In | Type | Description |
templateId | * | path | string | Template ID |
List templates. Get all templates in paginated format
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 | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
ToolsController
Endpoints for miscellaneous tools.
Lookup a TLS reporting domain policy.
Lookup a MTA-STS domain policy.
Lookup a DMARC record policy.
Lookup a BIMI record policy.
Create a TLS reporting record policy.
Create a TLS reporting record policy.
Create a DMARC record policy.
Create a BIMI record policy.
Get a fake email by its ID. Get a fake email by its ID
Request parameters
Name | Required | In | Type | Description |
id | * | query | string |
Create a new email address using the fake email domains.
Delete a fake email address using the fake email domains. Delete a fake email address using the fake email domains
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string |
Check email client support for email HTML and CSS features.
Get fake emails for an address. Get fake emails for an address
Request parameters
Name | Required | In | Type | Description |
page | query | integer | ||
emailAddress | * | query | string |
Get raw fake email content. Retrieve the raw content of a fake email by its ID
Request parameters
Name | Required | In | Type | Description |
id | * | query | string |
.
Request parameters
Name | Required | In | Type | Description |
emailAddress | * | query | string |
TrackingController
Endpoints for managing tracking entities such as email open and read tracking pixels.
Get tracking pixels. List tracking pixels in paginated form
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 | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp |
Create tracking pixel. Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel.
Get pixel.
Request parameters
Name | Required | In | Type | Description |
id | * | path | string |
UserController
. Utility function to extract properties from JSON objects in language where this is cumbersome.
Request parameters
Name | Required | In | Type | Description |
property | * | query | string | JSON property name or dot separated path selector such as `a.b.c` |
. Get account information for your user
WaitForController
Endpoints for receiving emails using waitFor methods. The endpoints are perfect for synchronous blocking calls, long-polling, or tests (see webhooks if you need to respond to email events as they happen using HTTP notification). These wait endpoints are all built around a common idea - that you ask for an expected number of emails from an inbox and MailSlurp will either: A) Return the matching emails if they are present; B) Hold a connection open until the matching emails are are received or until a timeout occurs. For test suites we recommend that you create a new inbox for each test run and use the waitForLatestEmail to hold the connection until the email you expect arrives. Note if your inbox is not already empty waitFor methods may return immediately depending on their implementation. See each endpoint for more details.
Wait for an email to match the provided filter conditions such as subject contains keyword.. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
Wait for an SMS message to match the provided filter conditions such as body contains keyword.. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
Wait for or return the first email that matches provided MatchOptions array. Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is 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. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | Id of the inbox we are matching an email for |
timeout | query | integer | Max milliseconds to wait | |
unreadOnly | query | boolean | Optional filter for unread only | |
since | query | string | Filter for emails that were received after the given timestamp | |
before | query | string | Filter for emails that were received before the given timestamp | |
sort | query | string | Sort direction | |
delay | query | integer | Max milliseconds delay between calls |
Wait or return list of emails that match simple matching patterns. 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. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | Id of the inbox we are fetching emails from |
count | * | query | integer | Number of emails to wait for. Must be greater or equal to 1 |
before | query | string | Filter for emails that were received before the given timestamp | |
since | query | string | Filter for emails that were received after the given timestamp | |
sort | query | string | Sort direction | |
delay | query | integer | Max milliseconds delay between calls | |
timeout | query | integer | Max milliseconds to wait | |
unreadOnly | query | boolean | Optional filter for unread only |
Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.. Wait until a phone number meets given conditions or return immediately if already met
Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur.. 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.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Id of the inbox you are fetching emails from | |
index | query | integer | 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 | |
timeout | query | integer | Max milliseconds to wait for the nth email if not already present | |
unreadOnly | query | boolean | Optional filter for unread only | |
since | query | string | Filter for emails that were received after the given timestamp | |
before | query | string | Filter for emails that were received before the given timestamp | |
sort | query | string | Sort direction | |
delay | query | integer | Max milliseconds delay between calls |
Fetch inbox's latest email or if empty wait for an email to arrive. 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 set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
Request parameters
Name | Required | In | Type | Description |
inboxId | query | string | Id of the inbox we are fetching emails from | |
timeout | query | integer | Max milliseconds to wait | |
unreadOnly | query | boolean | Optional filter for unread only. | |
before | query | string | Filter for emails that were before after the given timestamp | |
since | query | string | Filter for emails that were received after the given timestamp | |
sort | query | string | Sort direction | |
delay | query | integer | Max milliseconds delay between calls |
Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs. 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.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | query | string | Id of the inbox we are fetching emails from |
count | * | query | integer | Number of emails to wait for. Must be greater that 1 |
timeout | query | integer | Max milliseconds to wait | |
unreadOnly | query | boolean | Optional filter for unread only | |
before | query | string | Filter for emails that were received before the given timestamp | |
since | query | string | Filter for emails that were received after the given timestamp | |
sort | query | string | Sort direction | |
delay | query | integer | Max milliseconds delay between calls |
WebhookController
Endpoint for interacting with webhooks. Webhooks have a URL that points to your server. Useful for email forwarding, email API processing and more. They can be added to inboxes and when an inbox receives an email the email ID and inbox ID will be posted to the URL endpoint at your server. The schema of the webhook payload is available at https://api.mailslurp.com/schemas/webhook-payload or by calling https://api.mailslurp.com/webhooks/test. Use webhooks to react in real-time to inbound emails. Use the webhook payload posted to your server to fetch the full emails or attachments if you need them. Use the event ID as an idempotent record. The ID identifies the webhook payload uniquely. MailSlurp tracks webhook processing. It will try not to send the same event twice but it can happen. If you receive the same event more than once you can ignore it and assume it is the same. It is recommended that you use a store or database to track webhooks you have processed to avoid processing events more than once.
Update a webhook request headers.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string |
Attach a WebHook URL to an inbox. Get notified of account level events such as bounce and bounce recipient.
Delete all webhooks.
Request parameters
Name | Required | In | Type | Description |
before | query | string | before |
Send webhook test data.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string |
. Get JSON Schema definition for webhook payload
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string |
. Get example payload for webhook
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string |
Verify a webhook payload signature. Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
. Get JSON Schema definition for webhook payload by event
Request parameters
Name | Required | In | Type | Description |
event | * | query | string |
Get a webhook result and try to resend the original webhook payload. Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.
Request parameters
Name | Required | In | Type | Description |
webhookResultId | * | path | string | Webhook Result ID |
Redrive all webhook results that have failed status. Allows you to resend webhook payloads for any recorded webhook result that failed to deliver the payload.
Attach a WebHook URL to a phone number. Get notified whenever a phone number receives an SMS via a WebHook URL.
Request parameters
Name | Required | In | Type | Description |
phoneNumberId | * | path | string |
Get all webhooks for an Inbox.
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 | |
inboxId | * | path | string |
Attach a WebHook URL to an inbox. 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.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string |
Get a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string |
Delete a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string |
Update a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string | |
inboxId | query | string | ||
phoneNumberId | query | string | ||
overrideAuth | query | boolean |
Wait for webhook results for a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string | ID of webhook to get results for |
expectedCount | * | query | integer | Expected result count |
timeout | * | query | integer | Max time to wait in milliseconds |
Get a webhook results for a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string | ID of webhook to get results for |
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 | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
unseenOnly | query | boolean | Filter for unseen exceptions only | |
resultType | query | string | Filter by result type | |
eventName | query | string | Filter by event name | |
minStatusCode | query | integer | Minimum response status | |
maxStatusCode | query | integer | Maximum response status | |
inboxId | query | string | Inbox ID | |
smsId | query | string | Sms ID | |
attachmentId | query | string | Attachment ID | |
emailId | query | string | Email ID | |
phoneId | query | string | Phone ID |
Get a webhook results count for a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookId | * | path | string | ID of webhook to get results for |
. Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
Request parameters
Name | Required | In | Type | Description |
eventName | query | string |
Get webhook test payload for new sms event.
Get webhook test payload for new email event.
Get webhook test payload for new contact event.
Get webhook test payload for new attachment event.
. Get webhook test payload for email opened event
. Get webhook test payload for email opened event
. Get webhook test payload for bounce recipient
. Get webhook test payload for bounce
Get webhook test payload for delivery status event.
Get results for all webhooks.
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 | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
unseenOnly | query | boolean | Filter for unseen exceptions only | |
resultType | query | string | Filter by result type | |
eventName | query | string | Filter by event name | |
minStatusCode | query | integer | Minimum response status | |
maxStatusCode | query | integer | Maximum response status | |
inboxId | query | string | Inbox ID | |
smsId | query | string | Sms ID | |
attachmentId | query | string | Attachment ID | |
emailId | query | string | Email ID | |
phoneId | query | string | Phone ID |
Get a webhook result for a webhook.
Request parameters
Name | Required | In | Type | Description |
webhookResultId | * | path | string | Webhook Result ID |
Get count of unseen webhook results with error status.
List Webhooks Paginated. List webhooks in paginated form. Allows for page index, page size, and sort direction.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size for paginated result list. | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
inboxId | query | string | Filter by inboxId | |
phoneId | query | string | Filter by phoneId | |
before | query | string | Filter by created at before the given timestamp | |
health | query | string | Filter by webhook health | |
eventType | query | string | Optional event type | |
url | query | string | Optional url endpoint filter |
List Webhooks endpoints Paginated. List webhooks URL in paginated form. Allows for page index, page size, and sort direction.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size for paginated result list. | |
sort | query | string | Optional createdAt sort direction ASC or DESC | |
searchFilter | query | string | Optional search filter | |
since | query | string | Filter by created at after the given timestamp | |
inboxId | query | string | Filter by inboxId | |
phoneId | query | string | Filter by phoneId | |
before | query | string | Filter by created at before the given timestamp | |
health | query | string | Filter by webhook health | |
eventType | query | string | Optional event type |
List account webhooks Paginated. List account webhooks in paginated form. Allows for page index, page size, and sort direction.
Request parameters
Name | Required | In | Type | Description |
page | query | integer | Optional page index in list pagination | |
size | query | integer | Optional page size for paginated result list. | |
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 | Optional event type | |
health | query | string | Filter by webhook health | |
searchFilter | query | string | Optional search filter |
Get paginated webhooks for a phone number.
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 | |
phoneId | * | path | string | |
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 | Optional event type | |
searchFilter | query | string | Optional search filter | |
health | query | string | Filter by webhook health |
Get paginated webhooks for an Inbox.
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 | |
inboxId | * | path | string | |
since | query | string | Filter by created at after the given timestamp | |
before | query | string | Filter by created at before the given timestamp | |
health | query | string | Filter by webhook health | |
eventType | query | string | Optional event type |
Delete and disable a Webhook for an Inbox.
Request parameters
Name | Required | In | Type | Description |
inboxId | * | path | string | |
webhookId | * | path | string |
sse-controller
.
Request parameters
Name | Required | In | Type | Description |
x-api-key | * | header | string |
Webhooks
- See the webhooks documentation for webhook payload schemas.
BOUNCE
This payload is sent via HTTP POST to your webhook URL when an email bounces. This means the recipient you emailed rejected your message. You must avoid emailing the recipient again to protect your account reputation.
Loading...
BOUNCE_RECIPIENT
This payload is sent via HTTP POST to your webhook URL for each new recipient bounce. This means the recipient you emailed rejected your message. You must avoid emailing the recipient again to protect your account reputation.
Loading...
DELIVERY_STATUS
This payload is sent via HTTP POST to your webhook URL when an email is sent and a delivery status is obtained. A delivery status can be a successful send or a failure.
Loading...
EMAIL_OPENED
This payload is sent via HTTP POST to your webhook URL when an email containing a tracking pixel is opened. Triggered for pixels in emails sent from the inbox that the webhook is attached to
Loading...
EMAIL_READ
This payload is sent via HTTP POST to your webhook URL when an email is read. This is when the email is requested from the API in full format or is viewed in the dashboard
Loading...
EMAIL_RECEIVED
Legacy webhook payload for EMAIL_RECEIVED
webhooks or webhooks with no defined event type. Use the NEW_EMAIL
webhook instead as it sends you a full EmailDto.
Loading...
NEW_ATTACHMENT
When a new email is received by MailSlurp the attachments are parsed and saved to storage. If a NEW_ATTACHMENT
webhook is enabled for the receiving inbox this payload will be sent via HTTP POST to the webhooks URL. An attachment ID, name, and meta data are included. Use the attachmentId
with the AttachmentController
to access the file content as byte stream or base64 encoded string to download the file.
Loading...
NEW_CONTACT
Triggered when a new contact is found. If the addNewContacts
setting is enabled for your account MailSlurp will parse any new recipients or senders for a received email and save them to your contacts. Saved contacts are sent via HTTP POST to your webhook URL using this payload.
Loading...
NEW_EMAIL
This payload is sent via HTTP POST to your webhook URL when a new email is received by MailSlurp that matches optional filters. You can provide filters when creating the webhook. Use the EmailController
with the emailId
to fetch the body of the email or headers. To receive attachments or use the NEW_ATTACHMENT
webhook.
Loading...
NEW_GUEST_USER
Triggered when a new customer or client is added to a email portal
Loading...
NEW_SMS
This payload is sent via HTTP POST to your webhook URL when a new SMS message is received by one of your phone numbers.
Loading...