Skip to main content

MailSlurp REST API

REST API documentation. See also Swagger UI and Postman. Get an API Key for use.

  • Base URL: https://api.mailslurp.com
  • Authentication header: x-api-key: your-api-key
Loading...

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.

getEmail
get/emails/{emailId}

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

NameRequiredInTypeDescription
emailId*pathstring
decodequerybooleanDecode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing
Loading...
replyToEmail
put/emails/{emailId}

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

NameRequiredInTypeDescription
emailId*pathstringID of the email that should be replied to
Loading...Loading...
deleteEmail
delete/emails/{emailId}

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

Request parameters

NameRequiredInTypeDescription
emailId*pathstringID of email to delete
getEmailsPaginated
get/emails

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

NameRequiredInTypeDescription
inboxIdqueryarrayOptional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
pagequeryintegerOptional page index in email list pagination
sizequeryintegerOptional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
sortquerystringOptional createdAt sort direction ASC or DESC
unreadOnlyquerybooleanOptional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
searchFilterquerystringOptional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
sincequerystringOptional filter emails received after given date time. If unset will use time 24hours prior to now.
beforequerystringOptional filter emails received before given date time
Loading...
sendEmailSourceOptional
post/emails

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

NameRequiredInTypeDescription
inboxIdquerystringID of the inbox you want to send the email from
useDomainPoolquerybooleanUse domain pool. Optionally create inbox to send from using the mailslurp domain pool.
virtualSendquerybooleanOptionally create inbox to send from that is a virtual inbox and won't send to external addresses
Loading...
deleteAllEmails
delete/emails

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

validateEmail
post/emails/{emailId}/validate

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

Request parameters

NameRequiredInTypeDescription
emailId*pathstringID of email
Loading...
applyImapFlagOperation
post/emails/{emailId}/imap-flag-operation

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

NameRequiredInTypeDescription
emailId*pathstring
Loading...Loading...
forwardEmail
post/emails/{emailId}/forward

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

NameRequiredInTypeDescription
emailId*pathstringID of email
Loading...Loading...
getEmailContentMatch
post/emails/{emailId}/contentMatch

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

NameRequiredInTypeDescription
emailId*pathstringID of email to match against
Loading...Loading...
checkEmailBodyFeatureSupport
post/emails/{emailId}/check-email-body-feature-support

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

NameRequiredInTypeDescription
emailId*pathstring
Loading...
searchEmails
post/emails/search

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

Loading...Loading...
checkEmailClientSupport
post/emails/check-email-client-support

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.

Loading...Loading...
canSend
post/emails/can-send

Check if email can be sent and options are valid.. Can user send email to given recipient or is the recipient blocked

Request parameters

NameRequiredInTypeDescription
inboxId*querystringID of the inbox you want to send the email from
Loading...Loading...
markAsRead
patch/emails/{emailId}/read

Mark an email as read on 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

NameRequiredInTypeDescription
emailId*pathstring
readquerybooleanWhat value to assign to email read property. Default true.
Loading...
getEmailPreviewURLs
get/emails/{emailId}/urls

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

NameRequiredInTypeDescription
emailId*pathstring
Loading...
getEmailTextLines
get/emails/{emailId}/textLines

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

NameRequiredInTypeDescription
emailId*pathstringID of email to fetch text for
decodeHtmlEntitiesquerybooleanDecode HTML entities
lineSeparatorquerystringLine separator character
Loading...
getRawEmailContents
get/emails/{emailId}/raw

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

NameRequiredInTypeDescription
emailId*pathstringID of email
getRawEmailJson
get/emails/{emailId}/raw/json

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

NameRequiredInTypeDescription
emailId*pathstringID of email
Loading...
get/emails/{emailId}/links

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

NameRequiredInTypeDescription
emailId*pathstringID of email to fetch text for
Loading...
getEmailHTML
get/emails/{emailId}/html

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

NameRequiredInTypeDescription
emailId*pathstring
decodequeryboolean
replaceCidImagesqueryboolean
getEmailHTMLQuery
get/emails/{emailId}/htmlQuery

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

NameRequiredInTypeDescription
emailId*pathstringID of email to perform HTML query on
htmlSelector*querystringHTML 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.
Loading...
getEmailHTMLJson
get/emails/{emailId}/html/json

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

NameRequiredInTypeDescription
emailId*pathstring
decodequeryboolean
replaceCidImagesqueryboolean
Loading...
getEmailContentPart
get/emails/{emailId}/contentPart

Get email content part by content type. Get email body content parts from a multipart email message for a given content type

Request parameters

NameRequiredInTypeDescription
emailId*pathstringID of email to match against
contentType*querystringContent type
Loading...
downloadBody
get/emails/{emailId}/body

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

NameRequiredInTypeDescription
emailId*pathstringID of email
downloadBodyBytes
get/emails/{emailId}/body-bytes

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

NameRequiredInTypeDescription
emailId*pathstringID of email
getEmailAttachments
get/emails/{emailId}/attachments

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

NameRequiredInTypeDescription
emailId*pathstringID of email
downloadAttachment
get/emails/{emailId}/attachments/{attachmentId}

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

NameRequiredInTypeDescription
emailId*pathstringID of email
attachmentId*pathstringID of attachment
apiKeyquerystringCan 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.
getAttachmentMetaData
get/emails/{emailId}/attachments/{attachmentId}/metadata

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

NameRequiredInTypeDescription
emailId*pathstringID of email
attachmentId*pathstringID of attachment
Loading...
downloadAttachmentBase64
get/emails/{emailId}/attachments/{attachmentId}/base64

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

NameRequiredInTypeDescription
emailId*pathstringID of email
attachmentId*pathstringID of attachment
Loading...
getUnreadEmailCount
get/emails/unreadCount

Get unread email count. Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response

Loading...
getOrganizationEmailsPaginated
get/emails/organization

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

NameRequiredInTypeDescription
inboxIdqueryarrayOptional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
pagequeryintegerOptional page index in email list pagination
sizequeryintegerOptional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
sortquerystringOptional createdAt sort direction ASC or DESC
unreadOnlyquerybooleanOptional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
searchFilterquerystringOptional search filter search filter for emails.
sincequerystringOptional filter emails received after given date time. If unset will use time 24hours prior to now.
beforequerystringOptional filter emails received before given date time
Loading...
getEmailsOffsetPaginated
get/emails/offset-paginated

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

NameRequiredInTypeDescription
inboxIdqueryarrayOptional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
pagequeryintegerOptional page index in email list pagination
sizequeryintegerOptional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
sortquerystringOptional createdAt sort direction ASC or DESC
unreadOnlyquerybooleanOptional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
searchFilterquerystringOptional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
sincequerystringOptional filter emails received after given date time
beforequerystringOptional filter emails received before given date time
Loading...
getLatestEmail
get/emails/latest

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

NameRequiredInTypeDescription
inboxIdsqueryarrayOptional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes
Loading...
getLatestEmailInInbox_1
get/emails/latestIn

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

NameRequiredInTypeDescription
inboxId*querystringID of the inbox you want to get the latest email from
Loading...
getGravatarUrlForEmailAddress
get/emails/gravatarFor

. Get gravatar url for email address

Request parameters

NameRequiredInTypeDescription
emailAddress*querystring
sizequerystring
Loading...
getEmailCount
get/emails/emails/count

Get email count.

Loading...

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 mx.mailslurp.com. 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."

setInboxFavourited
put/inboxes/{inboxId}/favourite

Set inbox favourited state. Set and return new favourite state for an inbox

Request parameters

NameRequiredInTypeDescription
inboxId*pathstringID of inbox to set favourite state
Loading...Loading...
getInboxes
get/inboxes

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

NameRequiredInTypeDescription
sizequeryintegerOptional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries.
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringOptional filter by created after given date time
excludeCatchAllInboxesquerybooleanOptional exclude catch all inboxes
beforequerystringOptional filter by created before given date time
createInbox
post/inboxes

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

NameRequiredInTypeDescription
emailAddressquerystringA 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.
tagsqueryarrayTags 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.
namequerystringOptional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
descriptionquerystringOptional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
useDomainPoolquerybooleanUse 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.
favouritequerybooleanIs the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
expiresAtquerystringOptional 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.
expiresInqueryintegerNumber of milliseconds that inbox should exist for
allowTeamAccessquerybooleanDEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.
inboxTypequerystringHTTP (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 `mx.mailslurp.com`.
virtualInboxquerybooleanVirtual 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.
useShortAddressquerybooleanUse a shorter email address under 31 characters
domainIdquerystringID of custom domain to use for email address.
domainNamequerystringFQDN 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.
prefixquerystringPrefix to add before the email address for easier labelling or identification.
Loading...
deleteAllInboxes
delete/inboxes

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.

getInbox
get/inboxes/{inboxId}

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

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
Loading...
sendEmail
post/inboxes/{inboxId}

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

NameRequiredInTypeDescription
inboxId*pathstringID of the inbox you want to send the email from
Loading...
deleteInbox
delete/inboxes/{inboxId}

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

NameRequiredInTypeDescription
inboxId*pathstring
updateInbox
patch/inboxes/{inboxId}

Update Inbox. Change name and description. Email address is not editable.. Update editable fields on an inbox

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
Loading...Loading...
sendWithSchedule
post/inboxes/{inboxId}/with-schedule

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

NameRequiredInTypeDescription
inboxId*pathstringID of the inbox you want to send the email from
sendAtTimestampquerystringSending timestamp
sendAtNowPlusSecondsqueryintegerSend after n seconds
validateBeforeEnqueuequerybooleanValidate before adding to queue
Loading...Loading...
sendEmailWithQueue
post/inboxes/{inboxId}/with-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

NameRequiredInTypeDescription
inboxId*pathstringID of the inbox you want to send the email from
validateBeforeEnqueue*querybooleanValidate before adding to queue
Loading...
sendSmtpEnvelope
post/inboxes/{inboxId}/smtp-envelope

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

NameRequiredInTypeDescription
inboxId*pathstringID of the inbox you want to send the email from
Loading...Loading...
sendTestEmail
post/inboxes/{inboxId}/send-test-email

Send a test email to inbox. Send an inbox a test email to test email receiving is working

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
listInboxRulesets
get/inboxes/{inboxId}/rulesets

List inbox rulesets. List all rulesets attached to an inbox

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
pagequeryintegerOptional page index in inbox ruleset list pagination
sizequeryintegerOptional page size in inbox ruleset list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringOptional filter by created after given date time
beforequerystringOptional filter by created before given date time
Loading...
createInboxRuleset
post/inboxes/{inboxId}/rulesets

Create an inbox ruleset. Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Request parameters

NameRequiredInTypeDescription
inboxId*pathstringinboxId
Loading...Loading...
sendEmailAndConfirm
post/inboxes/{inboxId}/confirm

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

NameRequiredInTypeDescription
inboxId*pathstringID of the inbox you want to send the email from
Loading...Loading...
createInboxWithOptions
post/inboxes/withOptions

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.

Loading...Loading...
createInboxWithDefaults
post/inboxes/withDefaults

Create an inbox with default options. Uses MailSlurp domain pool address and is private..

Loading...
searchInboxes
post/inboxes/search

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.

Loading...Loading...
listInboxTrackingPixels
get/inboxes/{inboxId}/tracking-pixels

List inbox tracking pixels. List all tracking pixels sent from an inbox

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
pagequeryintegerOptional page index in inbox tracking pixel list pagination
sizequeryintegerOptional page size in inbox tracking pixel list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringOptional filter by created after given date time
beforequerystringOptional filter by created before given date time
Loading...
getInboxSentEmails
get/inboxes/{inboxId}/sent

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

NameRequiredInTypeDescription
inboxId*pathstring
pagequeryintegerOptional page index in inbox sent email list pagination
sizequeryintegerOptional page size in inbox sent email list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional sent email search
sincequerystringOptional filter by sent after given date time
beforequerystringOptional filter by sent before given date time
Loading...
getScheduledJobsByInboxId
get/inboxes/{inboxId}/scheduled-jobs

Get all scheduled email sending jobs for the inbox. Schedule sending of emails using scheduled jobs.

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
pagequeryintegerOptional page index in scheduled job list pagination
sizequeryintegerOptional page size in scheduled job list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getEmails
get/inboxes/{inboxId}/emails

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

NameRequiredInTypeDescription
inboxId*pathstringId of inbox that emails belongs to
sizequeryintegerAlias for limit. Assessed first before assessing any passed limit.
limitqueryintegerLimit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller
sortquerystringSort the results by received date and direction ASC or DESC
retryTimeoutqueryintegerMaximum milliseconds to spend retrying inbox database until minCount emails are returned
delayTimeoutqueryinteger
minCountqueryintegerMinimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
unreadOnlyqueryboolean
beforequerystringExclude emails received after this ISO 8601 date time
sincequerystringExclude emails received before this ISO 8601 date time
getInboxEmailsPaginated
get/inboxes/{inboxId}/emails/paginated

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

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in inbox emails list pagination
sizequeryintegerOptional page size in inbox emails list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringOptional filter by received after given date time
beforequerystringOptional filter by received before given date time
inboxId*pathstringId of inbox that emails belongs to
Loading...
getInboxEmailCount
get/inboxes/{inboxId}/emails/count

Get email count in inbox.

Request parameters

NameRequiredInTypeDescription
inboxId*pathstringId of inbox that emails belongs to
Loading...
getDeliveryStatusesByInboxId
get/inboxes/{inboxId}/delivery-status

. Get all email delivery statuses for an inbox

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
pagequeryintegerOptional page index in delivery status list pagination
sizequeryintegerOptional page size in delivery status list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getInboxTags
get/inboxes/tags

Get inbox tags. Get all inbox tags

getAllScheduledJobs
get/inboxes/scheduled-jobs

Get all scheduled email sending jobs for account. Schedule sending of emails using scheduled jobs. These can be inbox or account level.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in scheduled job list pagination
sizequeryintegerOptional page size in scheduled job list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getScheduledJob
get/inboxes/scheduled-jobs/{jobId}

Get a scheduled email job. Get a scheduled email job details.

Request parameters

NameRequiredInTypeDescription
jobId*pathstring
Loading...
cancelScheduledJob
delete/inboxes/scheduled-jobs/{jobId}

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

NameRequiredInTypeDescription
jobId*pathstring
Loading...
getAllInboxes
get/inboxes/paginated

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
favouritequerybooleanOptionally filter results for favourites only
searchquerystringOptionally filter by search words partial matching ID, tags, name, and email address
tagquerystringOptionally filter by tags. Will return inboxes that include given tags
teamAccessquerybooleanDEPRECATED. Optionally filter by team access.
sincequerystringOptional filter by created after given date time
beforequerystringOptional filter by created before given date time
inboxTypequerystringOptional filter by inbox type
inboxFunctionquerystringOptional filter by inbox function
domainIdquerystringOptional domain ID filter
Loading...
getOrganizationInboxes
get/inboxes/organization

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringOptional filter by created after given date time
beforequerystringOptional filter by created before given date time
Loading...
getAllInboxesOffsetPaginated
get/inboxes/offset-paginated

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
favouritequerybooleanOptionally filter results for favourites only
searchquerystringOptionally filter by search words partial matching ID, tags, name, and email address
tagquerystringOptionally filter by tags. Will return inboxes that include given tags
teamAccessquerybooleanDEPRECATED. Optionally filter by team access.
sincequerystringOptional filter by created after given date time
beforequerystringOptional filter by created before given date time
inboxTypequerystringOptional filter by inbox type
inboxFunctionquerystringOptional filter by inbox function
domainIdquerystringOptional domain ID filter
Loading...
getImapSmtpAccess
get/inboxes/imap-smtp-access

. Get IMAP and SMTP access usernames and passwords

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringInbox ID
Loading...
getInboxIds
get/inboxes/ids

Get all inbox IDs. Get list of inbox IDs

Loading...
getLatestEmailInInbox
get/inboxes/getLatestEmail

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

NameRequiredInTypeDescription
inboxId*querystringID of the inbox you want to get the latest email from
timeoutMillis*queryintegerTimeout milliseconds to wait for latest email
Loading...
doesInboxExist
get/inboxes/exists

Does inbox exist. Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses

Request parameters

NameRequiredInTypeDescription
emailAddress*querystringEmail address
allowCatchAllqueryboolean
Loading...
getInboxCount
get/inboxes/count

Get total inbox count.

Loading...
getInboxByName
get/inboxes/byName

Search for an inbox with the given name. Get a inbox result by name

Request parameters

NameRequiredInTypeDescription
name*querystring
Loading...
getInboxByEmailAddress
get/inboxes/byEmailAddress

Search for an inbox with the provided email address. Get a inbox result by email address

Request parameters

NameRequiredInTypeDescription
emailAddress*querystring
Loading...
deleteAllInboxEmails
delete/inboxes/{inboxId}/deleteAllInboxEmails

Delete all emails in a given inboxes.. Deletes all emails in an inbox. Be careful as emails cannot be recovered

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
flushExpired
delete/inboxes/expired

Remove expired inboxes. Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)

Request parameters

NameRequiredInTypeDescription
beforequerystringOptional expired at before flag to flush expired inboxes that have expired before the given time
Loading...
deleteAllInboxesByTag
delete/inboxes/by-tag

Delete inboxes by tag. Permanently delete all inboxes by tag

Request parameters

NameRequiredInTypeDescription
tag*querystring
deleteAllInboxesByName
delete/inboxes/by-name

Delete inboxes by name. Permanently delete all inboxes by name

Request parameters

NameRequiredInTypeDescription
name*querystring
deleteAllInboxesByDescription
delete/inboxes/by-description

Delete inboxes by description. Permanently delete all inboxes by description

Request parameters

NameRequiredInTypeDescription
description*querystring

PhoneController

Endpoints for managing phone numbers and addresses

testPhoneNumberSendSms
post/phone/numbers/{phoneNumberId}/test

.

Request parameters

NameRequiredInTypeDescription
x-test-idheaderstring
phoneNumberId*pathstring
Loading...
getEmergencyAddresses
get/phone/emergency-addresses

.

createEmergencyAddress
post/phone/emergency-addresses

.

Loading...Loading...
getPhonePlans
get/phone/plans

.

getPhoneNumbers
get/phone/numbers

.

Request parameters

NameRequiredInTypeDescription
phoneCountryquerystringOptional phone country
pagequeryintegerOptional page index for list pagination
sizequeryintegerOptional page size for list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getPhoneNumber
get/phone/numbers/{phoneNumberId}

.

Request parameters

NameRequiredInTypeDescription
phoneNumberId*pathstring
Loading...
deletePhoneNumber
delete/phone/numbers/{phoneNumberId}

.

Request parameters

NameRequiredInTypeDescription
phoneNumberId*pathstring
getEmergencyAddress
get/phone/emergency-addresses/{addressId}

.

Request parameters

NameRequiredInTypeDescription
addressId*pathstring
Loading...
deleteEmergencyAddress
delete/phone/emergency-addresses/{addressId}

.

Request parameters

NameRequiredInTypeDescription
addressId*pathstring
Loading...

SmsController

Endpoints for managing SMS

getReplyForSmsMessage
get/sms/{smsId}/reply

Get reply for an SMS message. Get reply for an SMS message.

Request parameters

NameRequiredInTypeDescription
smsId*pathstring
Loading...
replyToSmsMessage
post/sms/{smsId}/reply

Send a reply to a received SMS message. Replies are sent from the receiving number.. Reply to an SMS message.

Request parameters

NameRequiredInTypeDescription
smsId*pathstring
Loading...Loading...
getSmsMessagesPaginated
get/sms

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

NameRequiredInTypeDescription
phoneNumberquerystringOptional receiving phone number to filter SMS messages for
pagequeryintegerOptional page index in SMS list pagination
sizequeryintegerOptional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results
sortquerystringOptional createdAt sort direction ASC or DESC
unreadOnlyquerybooleanOptional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly
sincequerystringOptional filter SMSs received after given date time
beforequerystringOptional filter SMSs received before given date time
Loading...
deleteSmsMessages
delete/sms

Delete all SMS messages. Delete all SMS messages or all messages for a given phone number

Request parameters

NameRequiredInTypeDescription
phoneNumberIdquerystring
getSmsMessage
get/sms/{smsId}

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

NameRequiredInTypeDescription
smsId*pathstring
Loading...
deleteSmsMessage
delete/sms/{smsId}

Delete SMS message.. Delete an SMS message

Request parameters

NameRequiredInTypeDescription
smsId*pathstring
getUnreadSmsCount
get/sms/unreadCount

Get unread SMS count. Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response

Loading...
getSmsCount
get/sms/count

Get SMS count. Get number of SMS

Loading...

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.

getAlias
get/aliases/{aliasId}

Get an email alias. Get an email alias by ID

Request parameters

NameRequiredInTypeDescription
aliasId*pathstring
Loading...
updateAlias
put/aliases/{aliasId}

Update an email alias.

Request parameters

NameRequiredInTypeDescription
aliasId*pathstring
Loading...
deleteAlias
delete/aliases/{aliasId}

Delete an email alias.

Request parameters

NameRequiredInTypeDescription
aliasId*pathstring
replyToAliasEmail
put/aliases/{aliasId}/emails/{emailId}

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

NameRequiredInTypeDescription
aliasId*pathstringID of the alias that email belongs to
emailId*pathstringID of the email that should be replied to
Loading...Loading...
getAliases
get/aliases

Get all email aliases you have created. Get all email aliases in paginated form

Request parameters

NameRequiredInTypeDescription
searchquerystringOptional search term
pagequeryintegerOptional page index in alias list pagination
sizequeryintegerOptional page size in alias list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
createAlias
post/aliases

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

Loading...Loading...
getAliasEmails
get/aliases/{aliasId}/emails

Get emails for an alias. Get paginated emails for an alias by ID

Request parameters

NameRequiredInTypeDescription
aliasId*pathstring
pagequeryintegerOptional page index alias email list pagination
sizequeryintegerOptional page size alias email list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringOptional filter by sent after given date time
beforequerystringOptional filter by sent before given date time
Loading...
sendAliasEmail
post/aliases/{aliasId}/emails

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

NameRequiredInTypeDescription
aliasId*pathstring
Loading...Loading...
getAliasThreads
get/aliases/{aliasId}/threads

Get threads created for an alias. Returns threads created for an email alias in paginated form

Request parameters

NameRequiredInTypeDescription
aliasId*pathstring
pagequeryintegerOptional page index in thread list pagination
sizequeryintegerOptional page size in thread list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringOptional filter by sent after given date time
beforequerystringOptional filter by sent before given date time
Loading...
getThreadsPaginated
get/aliases/threads

Get all threads. Returns threads created for all aliases in paginated form

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in thread list pagination
sizequeryintegerOptional page size in thread list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringOptional filter by sent after given date time
beforequerystringOptional filter by sent before given date time
Loading...
getThread
get/aliases/threads/{threadId}

Get a thread. Return a thread associated with an alias

Request parameters

NameRequiredInTypeDescription
threadId*pathstring
Loading...

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.

getAttachments
get/attachments

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index for list pagination
sizequeryintegerOptional page size for list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
fileNameFilterquerystringOptional file name and content type search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
inboxIdquerystringOptional inboxId to filter attachments by
Loading...
uploadAttachment
post/attachments

Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment..

Loading...
deleteAllAttachments
delete/attachments

Delete all attachments.

uploadMultipartForm
post/attachments/multipart

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

NameRequiredInTypeDescription
contentIdquerystringOptional content ID of attachment
contentTypequerystringOptional content type of attachment
filenamequerystringOptional name of file
x-filenamequerystringOptional content type header of attachment
uploadAttachmentBytes
post/attachments/bytes

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

NameRequiredInTypeDescription
contentTypeheaderstring
contentTypequerystringOptional contentType for file. For instance `application/pdf`
contentIdquerystringOptional content ID (CID) to save upload with
filenamequerystringOptional filename to save upload with
filenameheaderstring
getAttachment
get/attachments/{attachmentId}

Get an attachment entity.

Request parameters

NameRequiredInTypeDescription
attachmentId*pathstringID of attachment
Loading...
deleteAttachment
delete/attachments/{attachmentId}

Delete an attachment.

Request parameters

NameRequiredInTypeDescription
attachmentId*pathstringID of attachment
getAttachmentInfo
get/attachments/{attachmentId}/metadata

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

NameRequiredInTypeDescription
attachmentId*pathstringID of attachment
Loading...
downloadAttachmentAsBytes
get/attachments/{attachmentId}/bytes

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

NameRequiredInTypeDescription
attachmentId*pathstringID of attachment
downloadAttachmentAsBase64Encoded
get/attachments/{attachmentId}/base64

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

NameRequiredInTypeDescription
attachmentId*pathstringID of attachment
Loading...

BounceController

Endpoints for access to bounced emails and bounced recipients

filterBouncedRecipient
post/bounce/filter-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

Loading...Loading...
getBouncedRecipients
get/bounce/recipients

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index
sizequeryintegerOptional page size
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getBouncedRecipient
get/bounce/recipients/{id}

Get a bounced email.. Bounced emails are email you have sent that were rejected by a recipient

Request parameters

NameRequiredInTypeDescription
id*pathstringID of the bounced recipient
Loading...
getListUnsubscribeRecipients
get/bounce/list-unsubscribe-recipients

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index
sizequeryintegerOptional page size
sortquerystringOptional createdAt sort direction ASC or DESC
domainIdquerystringFilter by domainId
Loading...
getBouncedEmails
get/bounce/emails

Get paginated list of bounced emails.. Bounced emails are email you have sent that were rejected by a recipient

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index
sizequeryintegerOptional page size
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getBouncedEmail
get/bounce/emails/{id}

Get a bounced email.. Bounced emails are email you have sent that were rejected by a recipient

Request parameters

NameRequiredInTypeDescription
id*pathstringID of the bounced email to fetch
Loading...
getComplaints
get/bounce/complaints

Get paginated list of complaints.. SMTP complaints made against your account

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index
sizequeryintegerOptional page size
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getComplaint
get/bounce/complaints/{id}

Get complaint. Get complaint

Request parameters

NameRequiredInTypeDescription
id*pathstringID of the complaint
Loading...
getAccountBounceBlockStatus
get/bounce/account-block

Can account send email. Check if account block status prevents sending

Loading...

BulkActionsController

Other endpoints including advanced receive options

bulkSendEmails
post/bulk/send

Bulk Send Emails.

Loading...
bulkCreateInboxes
post/bulk/inboxes

Bulk create Inboxes (email addresses).

Request parameters

NameRequiredInTypeDescription
count*queryintegerNumber of inboxes to be created in bulk
bulkDeleteInboxes
delete/bulk/inboxes

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.

sendEmailSimple
post/sendEmail

Send an email. If no senderId or inboxId provided a random email address will be used to send from.

Loading...
sendEmailQuery
post/sendEmailQuery

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

NameRequiredInTypeDescription
senderIdquerystringID of inbox to send from. If null an inbox will be created for sending
to*querystringEmail address to send to
bodyquerystringBody of the email message. Supports HTML
subjectquerystringSubject line of the email
createNewEmailAddress
post/newEmailAddress

Create new random inbox. Returns an Inbox with an `id` and an `emailAddress`

Request parameters

NameRequiredInTypeDescription
allowTeamAccessqueryboolean
useDomainPoolqueryboolean
expiresAtquerystring
expiresInqueryinteger
emailAddressquerystring
inboxTypequerystring
descriptionquerystring
namequerystring
tagsqueryarray
favouritequeryboolean
virtualInboxqueryboolean
useShortAddressqueryboolean
domainNamequerystring
domainIdquerystring
prefixquerystring
Loading...
createRandomInbox
post/createInbox

Create new random inbox. Returns an Inbox with an `id` and an `emailAddress`

Request parameters

NameRequiredInTypeDescription
allowTeamAccessqueryboolean
useDomainPoolqueryboolean
expiresAtquerystring
expiresInqueryinteger
emailAddressquerystring
inboxTypequerystring
descriptionquerystring
namequerystring
tagsqueryarray
favouritequeryboolean
virtualInboxqueryboolean
useShortAddressqueryboolean
domainNamequerystring
domainIdquerystring
prefixquerystring
Loading...
emptyInbox
delete/emptyInbox

Delete all emails in an inbox. Deletes all emails

Request parameters

NameRequiredInTypeDescription
inboxId*querystring
deleteEmailAddress
delete/deleteEmailAddress

Delete inbox email address by inbox id. Deletes inbox email address

Request parameters

NameRequiredInTypeDescription
inboxId*querystring

ConnectorController

Endpoints for managing inbox connectors that can sync external emails in MailSlurp inboxes

getConnector
get/connectors/{id}

Get an inbox connector.

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...
updateConnector
put/connectors/{id}

Update an inbox connector.

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...Loading...
deleteConnector
delete/connectors/{id}

Delete an inbox connector.

Request parameters

NameRequiredInTypeDescription
id*pathstring
getConnectors
get/connectors

Get inbox connectors. List inbox connectors that sync external emails to MailSlurp inboxes

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in connector list pagination
sizequeryintegerOptional page size in connector list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
createConnector
post/connectors

Create an inbox connector. Sync emails between external mailboxes and MailSlurp inboxes

Loading...Loading...
deleteAllConnector
delete/connectors

Delete all inbox connectors.

syncConnector
post/connectors/{id}/sync

Sync an inbox connector.

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...
getConnectorSyncEvents
get/connectors/{id}/events

Get an inbox connector sync events.

Request parameters

NameRequiredInTypeDescription
id*pathstring
pagequeryintegerOptional page index in connector list pagination
sizequeryintegerOptional page size in connector list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getAllConnectorSyncEvents
get/connectors/events

Get all inbox connector sync events.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in connector list pagination
sizequeryintegerOptional page size in connector list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getConnectorSyncEvent
get/connectors/events/{id}

Get an inbox connector sync event.

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...

ContactController

Endpoints for managing contacts. Contacts can be used for sending emails to individuals and groups.

getContacts
get/contacts

Get all contacts.

createContact
post/contacts

Create a contact.

Loading...Loading...
getContact
get/contacts/{contactId}

Get contact.

Request parameters

NameRequiredInTypeDescription
contactId*pathstring
Loading...
deleteContact
delete/contacts/{contactId}

Delete contact.

Request parameters

NameRequiredInTypeDescription
contactId*pathstring
getContactVCard
get/contacts/{contactId}/download

Get contact vCard vcf file.

Request parameters

NameRequiredInTypeDescription
contactId*pathstring
getAllContacts
get/contacts/paginated

Get all contacts.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
searchquerystringSearch terms
Loading...

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.

getDomain
get/domains/{id}

Get a domain. Returns domain verification status and tokens for a given domain

Request parameters

NameRequiredInTypeDescription
id*pathstring
checkForErrorsqueryboolean
Loading...
updateDomain
put/domains/{id}

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

NameRequiredInTypeDescription
id*pathstring
Loading...Loading...
deleteDomain
delete/domains/{id}

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

Request parameters

NameRequiredInTypeDescription
id*pathstring
getDomains
get/domains

Get domains. List all custom domains you have created

createDomain
post/domains

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.

Loading...Loading...
getDomainWildcardCatchAllInbox
get/domains/{id}/wildcard

Get catch all wild card inbox for domain. Get the catch all inbox for a domain for missed emails

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...
addDomainWildcardCatchAll
post/domains/{id}/wildcard

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

NameRequiredInTypeDescription
id*pathstring
Loading...
getDomainIssues
get/domains/issues

Get domain issues. List domain issues for domains you have created

Loading...

EmailVerificationController

validateEmailAddressList
post/email-verification/email-address-list

Validate a list of email addresses. Per unit billing. See your plan for pricing..

Loading...Loading...
getValidationRequests
get/email-verification/validation-requests

Validate a list of email addresses. Per unit billing. See your plan for pricing..

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size for paginated result list.
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
isValidquerybooleanFilter where email is valid is true or false
Loading...
deleteAllValidationRequests
delete/email-verification

Delete all validation requests.

deleteValidationRequest
delete/email-verification/{id}

Delete a validation record.

Request parameters

NameRequiredInTypeDescription
id*pathstring

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.

getExpiredInboxes
get/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

NameRequiredInTypeDescription
pagequeryintegerOptional page index in inbox sent email list pagination
sizequeryintegerOptional page size in inbox sent email list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getExpiredInboxRecord
get/expired/{expiredId}

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

NameRequiredInTypeDescription
expiredId*pathstringID 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
Loading...
getExpiredInboxByInboxId
get/expired/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

NameRequiredInTypeDescription
inboxId*pathstringID of inbox you want to retrieve (not the inbox ID)
Loading...
getExpirationDefaults
get/expired/defaults

Get default expiration settings. Return default times used for inbox expiration

Loading...

ExportController

Endpoints for exporting user data to CSV, XML and other formats.

exportEntities
get/export

Export inboxes link callable via browser.

Request parameters

NameRequiredInTypeDescription
exportType*querystring
apiKey*querystring
outputFormat*querystring
filterquerystring
listSeparatorTokenquerystring
excludePreviouslyExportedqueryboolean
createdEarliestTimequerystring
createdOldestTimequerystring
post/export

Get export link.

Request parameters

NameRequiredInTypeDescription
exportType*querystring
apiKeyquerystring
Loading...Loading...

FormController

Form controller for submitting email-able forms

submitForm
post/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

NameRequiredInTypeDescription
_toquerystringThe email address that submitted form should be sent to.
_subjectquerystringOptional subject of the email that will be sent.
_redirectToquerystringOptional URL to redirect form submitter to after submission. If not present user will see a success message.
_emailAddressquerystringEmail address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
_successMessagequerystringOptional success message to display if no _redirectTo present.
_spamCheckquerystringOptional 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.
otherParametersquerystringAll 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.

getGroupWithContacts
get/groups/{groupId}/contacts

Get group and contacts belonging to it.

Request parameters

NameRequiredInTypeDescription
groupId*pathstring
Loading...
addContactsToGroup
put/groups/{groupId}/contacts

Add contacts to a group.

Request parameters

NameRequiredInTypeDescription
groupId*pathstring
Loading...Loading...
removeContactsFromGroup
delete/groups/{groupId}/contacts

Remove contacts from a group.

Request parameters

NameRequiredInTypeDescription
groupId*pathstring
Loading...Loading...
getGroups
get/groups

Get all groups.

createGroup
post/groups

Create a group.

Loading...Loading...
getGroup
get/groups/{groupId}

Get group.

Request parameters

NameRequiredInTypeDescription
groupId*pathstring
Loading...
deleteGroup
delete/groups/{groupId}

Delete group.

Request parameters

NameRequiredInTypeDescription
groupId*pathstring
getGroupWithContactsPaginated
get/groups/{groupId}/contacts-paginated

. Get group and paginated contacts belonging to it

Request parameters

NameRequiredInTypeDescription
groupId*pathstring
pagequeryintegerOptional page index in group contact pagination
sizequeryintegerOptional page size in group contact pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getAllGroups
get/groups/paginated

Get all Contact Groups in paginated format.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...

InboxForwarderController

Endpoints for creating and managing inbox forwarders. Automatically forward emails received by inboxes using rules.

getInboxForwarders
get/forwarders

List inbox forwarders. List all forwarders attached to an inbox

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox id to get forwarders from
pagequeryintegerOptional page index in inbox forwarder list pagination
sizequeryintegerOptional page size in inbox forwarder list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
testInboxForwardersForInbox
put/forwarders

Test inbox forwarders for inbox. Test inbox forwarders for inbox

Request parameters

NameRequiredInTypeDescription
inboxId*querystringID of inbox
Loading...Loading...
createNewInboxForwarder
post/forwarders

Create an inbox forwarder. Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Request parameters

NameRequiredInTypeDescription
inboxId*querystringInbox id to attach forwarder to
Loading...Loading...
deleteInboxForwarders
delete/forwarders

Delete inbox forwarders. Delete inbox forwarders. Accepts optional inboxId filter.

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox id to attach forwarder to
testNewInboxForwarder
patch/forwarders

Test new inbox forwarder. Test new inbox forwarder

Loading...Loading...
getInboxForwarder
get/forwarders/{id}

Get an inbox forwarder. Get inbox forwarder

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox forwarder
Loading...
updateInboxForwarder
put/forwarders/{id}

Update an inbox forwarder. Update inbox forwarder

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox forwarder
Loading...Loading...
deleteInboxForwarder
delete/forwarders/{id}

Delete an inbox forwarder. Delete inbox forwarder

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox forwarder
testInboxForwarder
post/forwarders/{id}/test

Test an inbox forwarder. Test an inbox forwarder

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox forwarder
Loading...Loading...
getInboxForwarderEvents
get/forwarders/{id}/events

Get an inbox forwarder event list. Get inbox forwarder events

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox forwarder
pagequeryintegerOptional page index in inbox forwarder event list pagination
sizequeryintegerOptional page size in inbox forwarder event list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
Loading...
getInboxForwarderEvent
get/forwarders/{id}/events/{eventId}

Get an inbox forwarder event. Get inbox forwarder event

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox forwarder
eventId*pathstringID of inbox forwarder event
Loading...
getAllInboxForwarderEvents
get/forwarders/events

Get all inbox forwarder events. Get all inbox forwarder events

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in inbox forwarder event list pagination
sizequeryintegerOptional page size in inbox forwarder event list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
Loading...
getForwarderEvent
get/forwarders/events/{eventId}

Get a forwarder event. Get forwarder event

Request parameters

NameRequiredInTypeDescription
eventId*pathstringID of inbox forwarder event
Loading...

InboxReplierController

Endpoints for creating and managing inbox repliers. Repliers can automatically reply to emails received by inboxes using rules.

getInboxReplier
get/repliers/{id}

Get an inbox replier. Get inbox ruleset

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox replier
Loading...
updateInboxReplier
put/repliers/{id}

Update an inbox replier. Update inbox ruleset

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox replier
Loading...Loading...
deleteInboxReplier
delete/repliers/{id}

Delete an inbox replier. Delete inbox replier

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox replier
getInboxRepliers
get/repliers

List inbox repliers. List all repliers attached to an inbox

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox id to get repliers from
pagequeryintegerOptional page index in inbox replier list pagination
sizequeryintegerOptional page size in inbox replier list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
createNewInboxReplier
post/repliers

Create an inbox replier. Create a new inbox rule for reply toing, blocking, and allowing emails when sending and receiving

Loading...Loading...
deleteInboxRepliers
delete/repliers

Delete inbox repliers. Delete inbox repliers. Accepts optional inboxId filter.

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox id to attach replier to
getInboxReplierEvents
get/repliers/{id}/events

Get an inbox replier event list. Get inbox ruleset events

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox replier
pagequeryintegerOptional page index in inbox replier event list pagination
sizequeryintegerOptional page size in inbox replier event list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
Loading...

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.

getInboxRulesets
get/rulesets

List inbox rulesets. List all rulesets attached to an inbox

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox id to get rulesets from
pagequeryintegerOptional page index in inbox ruleset list pagination
sizequeryintegerOptional page size in inbox ruleset list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
testInboxRulesetsForInbox
put/rulesets

Test inbox rulesets for inbox. Test inbox rulesets for inbox

Request parameters

NameRequiredInTypeDescription
inboxId*querystringID of inbox
Loading...Loading...
createNewInboxRuleset
post/rulesets

Create an inbox ruleset. Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringInbox id to attach ruleset to
Loading...Loading...
deleteInboxRulesets
delete/rulesets

Delete inbox rulesets. Delete inbox rulesets. Accepts optional inboxId filter.

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox id to attach ruleset to
testNewInboxRuleset
patch/rulesets

Test new inbox ruleset. Test new inbox ruleset

Loading...Loading...
testInboxRuleset
post/rulesets/{id}/test

Test an inbox ruleset. Test an inbox ruleset

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox ruleset
Loading...Loading...
testInboxRulesetSending
post/rulesets/test-sending

Test sending with inbox rulesets. Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets

Loading...Loading...
testInboxRulesetReceiving
post/rulesets/test-receiving

Test receiving with inbox rulesets. Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets

Loading...Loading...
getInboxRuleset
get/rulesets/{id}

Get an inbox ruleset. Get inbox ruleset

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox ruleset
Loading...
deleteInboxRuleset
delete/rulesets/{id}

Delete an inbox ruleset. Delete inbox ruleset

Request parameters

NameRequiredInTypeDescription
id*pathstringID of inbox ruleset

MailServerController

verifyEmailAddress
post/mail-server/verify/email-address

Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server..

Loading...Loading...
getIpAddress
post/mail-server/describe/ip-address

Get IP address for a domain.

Request parameters

NameRequiredInTypeDescription
name*querystring
Loading...
describeMailServerDomain
post/mail-server/describe/domain

Get DNS Mail Server records for a domain.

Loading...Loading...
getDnsLookup
post/mail-server/describe/dns-lookup

Lookup DNS records for a domain.

Loading...Loading...

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.

restoreMissedEmails
post/missed-emails/restore

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.

getAllMissedEmails
get/missed-emails

Get all MissedEmails in paginated format.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
inboxIdquerystringOptional inbox ID filter
Loading...
getMissedEmail
get/missed-emails/{missedEmailId}

Get MissedEmail. List emails that were missed due to plan limits.

Request parameters

NameRequiredInTypeDescription
missedEmailId*pathstring
Loading...
waitForNthMissedEmail
get/missed-emails/waitForNthMissedEmail

Wait for Nth missed email. Wait for 0 based index missed email

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inbox ID filter
timeoutqueryintegerOptional timeout milliseconds
index*queryintegerZero 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
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getAllUnknownMissedEmails
get/missed-emails/unknown

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

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
inboxIdquerystringOptional inbox ID filter
Loading...

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.

getSentEmails
get/sent

Get all sent emails in paginated form.

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inboxId to filter sender of sent emails by
pagequeryintegerOptional page index in inbox sent email list pagination
sizequeryintegerOptional page size in inbox sent email list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
deleteAllSentEmails
delete/sent

Delete all sent email receipts.

getSentDeliveryStatusesBySentId
get/sent/{sentId}/delivery-status

. Get all sent email delivery statuses

Request parameters

NameRequiredInTypeDescription
sentId*pathstringID of the sent email that you want to get the delivery status of. Sent email object is returned when sending an email
pagequeryintegerOptional page index in delivery status list pagination
sizequeryintegerOptional page size in delivery status list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getSentEmail
get/sent/{id}

Get sent email receipt.

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...
deleteSentEmail
delete/sent/{id}

Delete sent email receipt.

Request parameters

NameRequiredInTypeDescription
id*pathstring
getSentEmailPreviewURLs
get/sent/{id}/urls

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

NameRequiredInTypeDescription
id*pathstring
Loading...
getSentEmailTrackingPixels
get/sent/{id}/tracking-pixels

. Get all tracking pixels for a sent email in paginated form

Request parameters

NameRequiredInTypeDescription
id*pathstring
pagequeryintegerOptional page index in sent email tracking pixel list pagination
sizequeryintegerOptional page size in sent email tracking pixel list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getSentEmailHTMLContent
get/sent/{id}/html

Get sent email HTML content.

Request parameters

NameRequiredInTypeDescription
id*pathstring
getRawSentEmailContents
get/sent/{emailId}/raw

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

NameRequiredInTypeDescription
emailId*pathstringID of email
getRawSentEmailJson
get/sent/{emailId}/raw/json

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

NameRequiredInTypeDescription
emailId*pathstringID of email
Loading...
getAllSentTrackingPixels
get/sent/tracking-pixels

. Get all sent email tracking pixels in paginated form

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in sent email tracking pixel list pagination
sizequeryintegerOptional page size in sent email tracking pixel list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getSentEmailsWithQueueResults
get/sent/queue-results

Get results of email sent with queues in paginated form.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in inbox sent email list pagination
sizequeryintegerOptional page size in inbox sent email list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getSentOrganizationEmails
get/sent/organization

. Get all sent organization emails in paginated form

Request parameters

NameRequiredInTypeDescription
inboxIdquerystringOptional inboxId to filter sender of sent emails by
pagequeryintegerOptional page index in sent email list pagination
sizequeryintegerOptional page size in sent email list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getSentDeliveryStatuses
get/sent/delivery-status

. Get all sent email delivery statuses

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in delivery status list pagination
sizequeryintegerOptional page size in delivery status list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getSentDeliveryStatus
get/sent/delivery-status/{deliveryId}

. Get a sent email delivery status

Request parameters

NameRequiredInTypeDescription
deliveryId*pathstring
Loading...
waitForDeliveryStatuses
get/sent/delivery-status/wait-for

. Wait for delivery statuses

Request parameters

NameRequiredInTypeDescription
sentIdquerystringOptional sent email ID filter
inboxIdquerystringOptional inbox ID filter
timeoutqueryintegerOptional timeout milliseconds
indexqueryintegerZero 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
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...

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.

getTemplate
get/templates/{templateId}

Get template. Get email template

Request parameters

NameRequiredInTypeDescription
templateId*pathstringTemplate ID
Loading...
updateTemplate
put/templates/{templateId}

Update template. Update email template

Request parameters

NameRequiredInTypeDescription
templateId*pathstringTemplate ID
Loading...Loading...
deleteTemplate
delete/templates/{templateId}

Delete email template. Delete template

Request parameters

NameRequiredInTypeDescription
templateId*pathstringTemplate ID
getTemplates
get/templates

List templates. Get all templates

createTemplate
post/templates

Create a Template. Create an email template with variables for use with templated transactional emails.

Loading...Loading...
getTemplatePreviewJson
get/templates/{templateId}/preview/json

Get template preview Json. Get email template preview with passed template variables in JSON format. Pass template variables as query params.

Request parameters

NameRequiredInTypeDescription
templateId*pathstringTemplate ID
Loading...
getTemplatePreviewHtml
get/templates/{templateId}/preview/html

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

NameRequiredInTypeDescription
templateId*pathstringTemplate ID
getAllTemplates
get/templates/paginated

List templates. Get all templates in paginated format

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...

ToolsController

lookupTlsReportingDomain
post/tools/lookup-tls-reporting-domain

Lookup a TLS reporting domain policy.

Loading...Loading...
lookupMtaStsDomain
post/tools/lookup-mta-sts-domain

Lookup a MTA-STS domain policy.

Loading...Loading...
lookupDmarcDomain
post/tools/lookup-dmarc-domain

Lookup a DMARC record policy.

Loading...Loading...
lookupBimiDomain
post/tools/lookup-bimi-domain

Lookup a BIMI record policy.

Loading...Loading...
generateTlsReportingRecord
post/tools/generate-tls-reporting-record

Create a TLS reporting record policy.

Loading...Loading...
generateMtaStsRecord
post/tools/generate-mta-sts-record

Create a TLS reporting record policy.

Loading...Loading...
generateDmarcRecord
post/tools/generate-dmarc-record

Create a DMARC record policy.

Loading...Loading...
generateBimiRecord
post/tools/generate-bimi-record

Create a BIMI record policy.

Loading...Loading...
checkEmailFeaturesClientSupport
post/tools/check-email-features-client-support

Check email client support for email HTML and CSS features.

Loading...Loading...

TrackingController

Endpoints for managing tracking entities such as email open and read tracking pixels.

getAllTrackingPixels
get/tracking/pixels

Get tracking pixels. List tracking pixels in paginated form

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
createTrackingPixel
post/tracking/pixels

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.

Loading...Loading...
getTrackingPixel
get/tracking/pixels/{id}

Get pixel.

Request parameters

NameRequiredInTypeDescription
id*pathstring
Loading...

UserController

getJsonPropertyAsString
post/user/json/pluck

. Utility function to extract properties from JSON objects in language where this is cumbersome.

Request parameters

NameRequiredInTypeDescription
property*querystringJSON property name or dot separated path selector such as `a.b.c`
Loading...
getUserInfo
get/user/info

. Get account information for your user

Loading...

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.

waitFor
post/waitFor

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

Loading...
waitForSms
post/waitForSms

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

Loading...
waitForMatchingFirstEmail
post/waitForMatchingFirstEmail

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

NameRequiredInTypeDescription
inboxId*querystringId of the inbox we are matching an email for
timeoutqueryintegerMax milliseconds to wait
unreadOnlyquerybooleanOptional filter for unread only
sincequerystringFilter for emails that were received after the given timestamp
beforequerystringFilter for emails that were received before the given timestamp
sortquerystringSort direction
delayqueryintegerMax milliseconds delay between calls
Loading...Loading...
waitForMatchingEmails
post/waitForMatchingEmails

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

NameRequiredInTypeDescription
inboxId*querystringId of the inbox we are fetching emails from
count*queryintegerNumber of emails to wait for. Must be greater or equal to 1
beforequerystringFilter for emails that were received before the given timestamp
sincequerystringFilter for emails that were received after the given timestamp
sortquerystringSort direction
delayqueryintegerMax milliseconds delay between calls
timeoutqueryintegerMax milliseconds to wait
unreadOnlyquerybooleanOptional filter for unread only
Loading...
waitForLatestSms
post/waitForLatestSms

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

Loading...Loading...
waitForNthEmail
get/waitForNthEmail

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

NameRequiredInTypeDescription
inboxIdquerystringId of the inbox you are fetching emails from
indexqueryintegerZero 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
timeoutqueryintegerMax milliseconds to wait for the nth email if not already present
unreadOnlyquerybooleanOptional filter for unread only
sincequerystringFilter for emails that were received after the given timestamp
beforequerystringFilter for emails that were received before the given timestamp
sortquerystringSort direction
delayqueryintegerMax milliseconds delay between calls
Loading...
waitForLatestEmail
get/waitForLatestEmail

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

NameRequiredInTypeDescription
inboxIdquerystringId of the inbox we are fetching emails from
timeoutqueryintegerMax milliseconds to wait
unreadOnlyquerybooleanOptional filter for unread only.
beforequerystringFilter for emails that were before after the given timestamp
sincequerystringFilter for emails that were received after the given timestamp
sortquerystringSort direction
delayqueryintegerMax milliseconds delay between calls
Loading...
waitForEmailCount
get/waitForEmailCount

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

NameRequiredInTypeDescription
inboxId*querystringId of the inbox we are fetching emails from
count*queryintegerNumber of emails to wait for. Must be greater that 1
timeoutqueryintegerMax milliseconds to wait
unreadOnlyquerybooleanOptional filter for unread only
beforequerystringFilter for emails that were received before the given timestamp
sincequerystringFilter for emails that were received after the given timestamp
sortquerystringSort direction
delayqueryintegerMax 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.

updateWebhookHeaders
put/webhooks/{webhookId}/headers

Update a webhook request headers.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstring
Loading...Loading...
createAccountWebhook
post/webhooks

Attach a WebHook URL to an inbox. Get notified of account level events such as bounce and bounce recipient.

Loading...Loading...
deleteAllWebhooks
delete/webhooks

Delete all webhooks.

Request parameters

NameRequiredInTypeDescription
beforequerystringbefore
sendTestData
post/webhooks/{webhookId}/test

Send webhook test data.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstring
Loading...
getJsonSchemaForWebhookPayload
post/webhooks/{webhookId}/schema

. Get JSON Schema definition for webhook payload

Request parameters

NameRequiredInTypeDescription
webhookId*pathstring
Loading...
getTestWebhookPayloadForWebhook
post/webhooks/{webhookId}/example

. Get example payload for webhook

Request parameters

NameRequiredInTypeDescription
webhookId*pathstring
Loading...
verifyWebhookSignature
post/webhooks/verify

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.

Loading...Loading...
getJsonSchemaForWebhookEvent
post/webhooks/schema

. Get JSON Schema definition for webhook payload by event

Request parameters

NameRequiredInTypeDescription
event*querystring
Loading...
redriveWebhookResult
post/webhooks/results/{webhookResultId}/redrive

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

NameRequiredInTypeDescription
webhookResultId*pathstringWebhook Result ID
Loading...
redriveAllWebhookResults
post/webhooks/results/redrive

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.

Loading...
createWebhookForPhoneNumber
post/phone/numbers/{phoneNumberId}/webhooks

Attach a WebHook URL to a phone number. Get notified whenever a phone number receives an SMS via a WebHook URL.

Request parameters

NameRequiredInTypeDescription
phoneNumberId*pathstring
Loading...Loading...
getWebhooks
get/inboxes/{inboxId}/webhooks

Get all webhooks for an Inbox.

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
createWebhook
post/inboxes/{inboxId}/webhooks

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

NameRequiredInTypeDescription
inboxId*pathstring
Loading...Loading...
getWebhook
get/webhooks/{webhookId}

Get a webhook.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstring
Loading...
deleteWebhookById
delete/webhooks/{webhookId}

Delete a webhook.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstring
waitForWebhookResults
get/webhooks/{webhookId}/wait

Wait for webhook results for a webhook.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstringID of webhook to get results for
expectedCount*queryintegerExpected result count
timeout*queryintegerMax time to wait in milliseconds
getWebhookResults
get/webhooks/{webhookId}/results

Get a webhook results for a webhook.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstringID of webhook to get results for
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
unseenOnlyquerybooleanFilter for unseen exceptions only
resultTypequerystringFilter by result type
eventNamequerystringFilter by event name
minStatusCodequeryintegerMinimum response status
maxStatusCodequeryintegerMaximum response status
inboxIdquerystringInbox ID
smsIdquerystringSms ID
attachmentIdquerystringAttachment ID
emailIdquerystringEmail ID
phoneIdquerystringPhone ID
Loading...
getWebhookResultsCount
get/webhooks/{webhookId}/results/count

Get a webhook results count for a webhook.

Request parameters

NameRequiredInTypeDescription
webhookId*pathstringID of webhook to get results for
Loading...
getTestWebhookPayload
get/webhooks/test

. Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.

Request parameters

NameRequiredInTypeDescription
eventNamequerystring
Loading...
getTestWebhookPayloadNewSms
get/webhooks/test/new-sms-payload

Get webhook test payload for new sms event.

Loading...
getTestWebhookPayloadNewEmail
get/webhooks/test/new-email-payload

Get webhook test payload for new email event.

Loading...
getTestWebhookPayloadNewContact
get/webhooks/test/new-contact-payload

Get webhook test payload for new contact event.

Loading...
getTestWebhookPayloadNewAttachment
get/webhooks/test/new-attachment-payload

Get webhook test payload for new attachment event.

Loading...
getTestWebhookPayloadEmailRead
get/webhooks/test/email-read-payload

. Get webhook test payload for email opened event

Loading...
getTestWebhookPayloadEmailOpened
get/webhooks/test/email-opened-payload

. Get webhook test payload for email opened event

Loading...
getTestWebhookPayloadBounceRecipient
get/webhooks/test/email-bounce-recipient-payload

. Get webhook test payload for bounce recipient

Loading...
getTestWebhookPayloadBounce
get/webhooks/test/email-bounce-payload

. Get webhook test payload for bounce

Loading...
getTestWebhookPayloadDeliveryStatus
get/webhooks/test/delivery-status-payload

Get webhook test payload for delivery status event.

Loading...
getAllWebhookResults
get/webhooks/results

Get results for all webhooks.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
unseenOnlyquerybooleanFilter for unseen exceptions only
resultTypequerystringFilter by result type
eventNamequerystringFilter by event name
minStatusCodequeryintegerMinimum response status
maxStatusCodequeryintegerMaximum response status
inboxIdquerystringInbox ID
smsIdquerystringSms ID
attachmentIdquerystringAttachment ID
emailIdquerystringEmail ID
phoneIdquerystringPhone ID
Loading...
getWebhookResult
get/webhooks/results/{webhookResultId}

Get a webhook result for a webhook.

Request parameters

NameRequiredInTypeDescription
webhookResultId*pathstringWebhook Result ID
Loading...
getWebhookResultsUnseenErrorCount
get/webhooks/results/unseen-count

Get count of unseen webhook results with error status.

Loading...
getAllWebhooks
get/webhooks/paginated

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

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size for paginated result list.
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
sincequerystringFilter by created at after the given timestamp
inboxIdquerystringFilter by inboxId
phoneIdquerystringFilter by phoneId
beforequerystringFilter by created at before the given timestamp
Loading...
getAllAccountWebhooks
get/webhooks/account/paginated

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

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size for paginated result list.
sortquerystringOptional createdAt sort direction ASC or DESC
eventTypequerystringOptional event type
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getPhoneNumberWebhooksPaginated
get/phone/numbers/{phoneId}/webhooks/paginated

Get paginated webhooks for a phone number.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
phoneId*pathstring
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
getInboxWebhooksPaginated
get/inboxes/{inboxId}/webhooks/paginated

Get paginated webhooks for an Inbox.

Request parameters

NameRequiredInTypeDescription
pagequeryintegerOptional page index in list pagination
sizequeryintegerOptional page size in list pagination
sortquerystringOptional createdAt sort direction ASC or DESC
searchFilterquerystringOptional search filter
inboxId*pathstring
sincequerystringFilter by created at after the given timestamp
beforequerystringFilter by created at before the given timestamp
Loading...
deleteWebhook
delete/inboxes/{inboxId}/webhooks/{webhookId}

Delete and disable a Webhook for an Inbox.

Request parameters

NameRequiredInTypeDescription
inboxId*pathstring
webhookId*pathstring

Webhooks

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_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...