Skip to main content

MailSlurp REST API

API documentation.

Swagger UI

Setup‚Äč

Base URL:

https://api.mailslurp.com

Authentication Header:

x-api-key: your-api-key

Endpoints‚Äč

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 an email alias by ID

get/aliases/{aliasId}

updateAlias‚Äč

put/aliases/{aliasId}

deleteAlias‚Äč

delete/aliases/{aliasId}

replyToAliasEmail‚Äč

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.

put/aliases/{aliasId}/emails/{emailId}

getAliases‚Äč

Get all email aliases in paginated form

get/aliases

createAlias‚Äč

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

post/aliases

getAliasEmails‚Äč

Get paginated emails for an alias by ID

get/aliases/{aliasId}/emails

sendAliasEmail‚Äč

Send an email from an alias. Replies to the email will be forwarded to the alias masked email address

post/aliases/{aliasId}/emails

getAliasThreads‚Äč

Returns threads created for an email alias in paginated form

get/aliases/{aliasId}/threads

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

get/attachments

uploadAttachment‚Äč

post/attachments

deleteAllAttachments‚Äč

delete/attachments

uploadMultipartForm‚Äč

post/attachments/multipart

uploadAttachmentBytes‚Äč

post/attachments/bytes

getAttachment‚Äč

get/attachments/{attachmentId}

deleteAttachment‚Äč

delete/attachments/{attachmentId}

getAttachmentInfo‚Äč

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.

get/attachments/{attachmentId}/metadata

downloadAttachmentAsBytes‚Äč

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.

get/attachments/{attachmentId}/bytes

downloadAttachmentAsBase64Encoded‚Äč

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.

get/attachments/{attachmentId}/base64

BounceController‚Äč

Endpoints for access bounced emails and bounced recipients

filterBouncedRecipient‚Äč

Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints

post/bounce/filter-recipients

getBouncedRecipients‚Äč

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.

get/bounce/recipients

getBouncedRecipient‚Äč

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

get/bounce/recipients/{id}

getListUnsubscribeRecipients‚Äč

Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again.

get/bounce/list-unsubscribe-recipients

getBouncedEmails‚Äč

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

get/bounce/emails

getBouncedEmail‚Äč

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

get/bounce/emails/{id}

getComplaints‚Äč

SMTP complaints made against your account

get/bounce/complaints

BulkActionsController‚Äč

Other endpoints including advanced receive options

bulkSendEmails‚Äč

post/bulk/send

bulkCreateInboxes‚Äč

post/bulk/inboxes

bulkDeleteInboxes‚Äč

delete/bulk/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‚Äč

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

post/sendEmail

createNewEmailAddress‚Äč

Returns an Inbox with an id and an emailAddress

post/newEmailAddress

createRandomInbox‚Äč

Returns an Inbox with an id and an emailAddress

post/createInbox

emptyInbox‚Äč

Deletes all emails

delete/emptyInbox

deleteEmailAddress‚Äč

Deletes inbox email address

delete/deleteEmailAddress

ContactController‚Äč

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

getContacts‚Äč

get/contacts

createContact‚Äč

post/contacts

getContact‚Äč

get/contacts/{contactId}

deleteContact‚Äč

delete/contacts/{contactId}

getContactVCard‚Äč

get/contacts/{contactId}/download

getAllContacts‚Äč

get/contacts/paginated

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‚Äč

Returns domain verification status and tokens for a given domain

get/domains/{id}

updateDomain‚Äč

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.

put/domains/{id}

deleteDomain‚Äč

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

delete/domains/{id}

getDomains‚Äč

List all custom domains you have created

get/domains

createDomain‚Äč

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.

post/domains

getDomainWildcardCatchAllInbox‚Äč

Get the catch all inbox for a domain for missed emails

get/domains/{id}/wildcard

addDomainWildcardCatchAll‚Äč

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

post/domains/{id}/wildcard

getDomainIssues‚Äč

List domain issues for domains you have created

get/domains/issues

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‚Äč

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

get/emails/{emailId}

replyToEmail‚Äč

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.

put/emails/{emailId}

deleteEmail‚Äč

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

delete/emails/{emailId}

getEmailsPaginated‚Äč

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

get/emails

sendEmailSourceOptional‚Äč

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.

post/emails

deleteAllEmails‚Äč

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

delete/emails

validateEmail‚Äč

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

post/emails/{emailId}/validate

applyImapFlagOperation‚Äč

Apply RFC3501 section-2.3.2 IMAP flag operations on an email

post/emails/{emailId}/imap-flag-operation

forwardEmail‚Äč

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.

post/emails/{emailId}/forward

getEmailContentMatch‚Äč

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.

post/emails/{emailId}/contentMatch

markAsRead‚Äč

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

patch/emails/{emailId}/read

getEmailPreviewURLs‚Äč

Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.

get/emails/{emailId}/urls

getEmailTextLines‚Äč

Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.

get/emails/{emailId}/textLines

getRawEmailContents‚Äč

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

get/emails/{emailId}/raw

getRawEmailJson‚Äč

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

get/emails/{emailId}/raw/json

HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes

get/emails/{emailId}/links

getEmailHTML‚Äč

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.

get/emails/{emailId}/html

getEmailHTMLQuery‚Äč

Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors

get/emails/{emailId}/htmlQuery

getEmailHTMLJson‚Äč

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.

get/emails/{emailId}/html/json

downloadBody‚Äč

Returns the specified email body for a given email as a string

get/emails/{emailId}/body

downloadBodyBytes‚Äč

Returns the specified email body for a given email as a stream / array of bytes.

get/emails/{emailId}/body-bytes

getEmailAttachments‚Äč

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

get/emails/{emailId}/attachments

downloadAttachment‚Äč

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.

get/emails/{emailId}/attachments/{attachmentId}

getAttachmentMetaData‚Äč

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

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

downloadAttachmentBase64‚Äč

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.

get/emails/{emailId}/attachments/{attachmentId}/base64

getUnreadEmailCount‚Äč

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

get/emails/unreadCount

getOrganizationEmailsPaginated‚Äč

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

get/emails/organization

getLatestEmail‚Äč

Get the newest email in all inboxes or in a passed set of inbox IDs

get/emails/latest

getLatestEmailInInbox_1‚Äč

Get the newest email in all inboxes or in a passed set of inbox IDs

get/emails/latestIn

getGravatarUrlForEmailAddress‚Äč

Get gravatar url for email address

get/emails/gravatarFor

getEmailCount‚Äč

get/emails/emails/count

EmailVerificationController‚Äč

validateEmailAddressList‚Äč

post/email-verification/email-address-list

getValidationRequests‚Äč

get/email-verification/validation-requests

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‚Äč

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

get/expired

getExpiredInboxRecord‚Äč

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

get/expired/{expiredId}

getExpiredInboxByInboxId‚Äč

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

get/expired/inbox/{inboxId}

getExpirationDefaults‚Äč

Return default times used for inbox expiration

get/expired/defaults

ExportController‚Äč

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

exportEntities‚Äč

get/export
post/export

FormController‚Äč

Form controller for submitting email-able forms

submitForm‚Äč

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‚Äč

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

URL Example‚Äč

<form 
action="https://api.mailslurp.com/forms?_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">.

post/forms

GroupController‚Äč

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

getGroupWithContacts‚Äč

get/groups/{groupId}/contacts

addContactsToGroup‚Äč

put/groups/{groupId}/contacts

removeContactsFromGroup‚Äč

delete/groups/{groupId}/contacts

getGroups‚Äč

get/groups

createGroup‚Äč

post/groups

getGroup‚Äč

get/groups/{groupId}

deleteGroup‚Äč

delete/groups/{groupId}

getGroupWithContactsPaginated‚Äč

Get group and paginated contacts belonging to it

get/groups/{groupId}/contacts-paginated

getAllGroups‚Äč

get/groups/paginated

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‚Äč

Set and return new favourite state for an inbox

put/inboxes/{inboxId}/favourite

getInboxes‚Äč

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.

get/inboxes

createInbox‚Äč

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.

post/inboxes

deleteAllInboxes‚Äč

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.

delete/inboxes

getInbox‚Äč

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

get/inboxes/{inboxId}

sendEmail‚Äč

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.

post/inboxes/{inboxId}

deleteInbox‚Äč

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.

delete/inboxes/{inboxId}

updateInbox‚Äč

Update editable fields on an inbox

patch/inboxes/{inboxId}

sendWithSchedule‚Äč

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.

post/inboxes/{inboxId}/with-schedule

sendEmailWithQueue‚Äč

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.

post/inboxes/{inboxId}/with-queue

sendSmtpEnvelope‚Äč

Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.

post/inboxes/{inboxId}/smtp-envelope

sendTestEmail‚Äč

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

post/inboxes/{inboxId}/send-test-email

listInboxRulesets‚Äč

List all rulesets attached to an inbox

get/inboxes/{inboxId}/rulesets

createInboxRuleset‚Äč

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

post/inboxes/{inboxId}/rulesets

sendEmailAndConfirm‚Äč

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.

post/inboxes/{inboxId}/confirm

createInboxWithOptions‚Äč

Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.

post/inboxes/withOptions

createInboxWithDefaults‚Äč

post/inboxes/withDefaults

listInboxTrackingPixels‚Äč

List all tracking pixels sent from an inbox

get/inboxes/{inboxId}/tracking-pixels

getInboxSentEmails‚Äč

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.

get/inboxes/{inboxId}/sent

getScheduledJobsByInboxId‚Äč

Schedule sending of emails using scheduled jobs.

get/inboxes/{inboxId}/scheduled-jobs

getEmails‚Äč

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

get/inboxes/{inboxId}/emails

getInboxEmailsPaginated‚Äč

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

get/inboxes/{inboxId}/emails/paginated

getInboxEmailCount‚Äč

get/inboxes/{inboxId}/emails/count

getDeliveryStatusesByInboxId‚Äč

Get all email delivery statuses for an inbox

get/inboxes/{inboxId}/delivery-status

getInboxTags‚Äč

Get all inbox tags

get/inboxes/tags

getAllScheduledJobs‚Äč

Schedule sending of emails using scheduled jobs. These can be inbox or account level.

get/inboxes/scheduled-jobs

getScheduledJob‚Äč

Get a scheduled email job details.

get/inboxes/scheduled-jobs/{jobId}

cancelScheduledJob‚Äč

Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.

delete/inboxes/scheduled-jobs/{jobId}

getAllInboxes‚Äč

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.

get/inboxes/paginated

getOrganizationInboxes‚Äč

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

get/inboxes/organization

getImapSmtpAccess‚Äč

Get IMAP and SMTP access usernames and passwords

get/inboxes/imap-smtp-access

getInboxIds‚Äč

Get list of inbox IDs

get/inboxes/ids

getLatestEmailInInbox‚Äč

Get the newest email in an inbox or wait for one to arrive

get/inboxes/getLatestEmail

doesInboxExist‚Äč

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

get/inboxes/exists

getInboxCount‚Äč

get/inboxes/count

getInboxByName‚Äč

Get a inbox result by name

get/inboxes/byName

getInboxByEmailAddress‚Äč

Get a inbox result by email address

get/inboxes/byEmailAddress

deleteAllInboxEmails‚Äč

Deletes all emails in an inbox. Be careful as emails cannot be recovered

delete/inboxes/{inboxId}/deleteAllInboxEmails

flushExpired‚Äč

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

delete/inboxes/expired

InboxForwarderController‚Äč

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

getInboxForwarders‚Äč

List all forwarders attached to an inbox

get/forwarders

testInboxForwardersForInbox‚Äč

Test inbox forwarders for inbox

put/forwarders

createNewInboxForwarder‚Äč

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

post/forwarders

deleteInboxForwarders‚Äč

Delete inbox forwarders. Accepts optional inboxId filter.

delete/forwarders

testNewInboxForwarder‚Äč

Test new inbox forwarder

patch/forwarders

getInboxForwarder‚Äč

Get inbox ruleset

get/forwarders/{id}

updateInboxForwarder‚Äč

Update inbox ruleset

put/forwarders/{id}

deleteInboxForwarder‚Äč

Delete inbox forwarder

delete/forwarders/{id}

testInboxForwarder‚Äč

Test an inbox forwarder

post/forwarders/{id}/test

getInboxForwarderEvents‚Äč

Get inbox ruleset events

get/forwarders/{id}/events

InboxReplierController‚Äč

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

getInboxReplier‚Äč

Get inbox ruleset

get/repliers/{id}

updateInboxReplier‚Äč

Update inbox ruleset

put/repliers/{id}

deleteInboxReplier‚Äč

Delete inbox replier

delete/repliers/{id}

getInboxRepliers‚Äč

List all repliers attached to an inbox

get/repliers

createNewInboxReplier‚Äč

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

post/repliers

deleteInboxRepliers‚Äč

Delete inbox repliers. Accepts optional inboxId filter.

delete/repliers

getInboxReplierEvents‚Äč

Get inbox ruleset events

get/repliers/{id}/events

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‚Äč

List all rulesets attached to an inbox

get/rulesets

testInboxRulesetsForInbox‚Äč

Test inbox rulesets for inbox

put/rulesets

createNewInboxRuleset‚Äč

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

post/rulesets

deleteInboxRulesets‚Äč

Delete inbox rulesets. Accepts optional inboxId filter.

delete/rulesets

testNewInboxRuleset‚Äč

Test new inbox ruleset

patch/rulesets

testInboxRuleset‚Äč

Test an inbox ruleset

post/rulesets/{id}/test

getInboxRuleset‚Äč

Get inbox ruleset

get/rulesets/{id}

deleteInboxRuleset‚Äč

Delete inbox ruleset

delete/rulesets/{id}

MailServerController‚Äč

verifyEmailAddress‚Äč

post/mail-server/verify/email-address

getIpAddress‚Äč

post/mail-server/describe/ip-address

describeMailServerDomain‚Äč

post/mail-server/describe/domain

getDnsLookup‚Äč

post/mail-server/describe/dns-lookup

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‚Äč

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.

post/missed-emails/restore

getAllMissedEmails‚Äč

get/missed-emails

getMissedEmail‚Äč

List emails that were missed due to plan limits.

get/missed-emails/{missedEmailId}

waitForNthMissedEmail‚Äč

Wait for 0 based index missed email

get/missed-emails/waitForNthMissedEmail

getAllUnknownMissedEmails‚Äč

Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox.

get/missed-emails/unknown

PhoneController‚Äč

Endpoints for managing phone numbers and addresses

testPhoneNumberSendSms‚Äč

post/phone/numbers/{phoneNumberId}/test

getEmergencyAddresses‚Äč

get/phone/emergency-addresses

createEmergencyAddress‚Äč

post/phone/emergency-addresses

getPhonePlans‚Äč

get/phone/plans

getPhoneNumbers‚Äč

get/phone/numbers

getPhoneNumber‚Äč

get/phone/numbers/{phoneNumberId}

deletePhoneNumber‚Äč

delete/phone/numbers/{phoneNumberId}

getEmergencyAddress‚Äč

get/phone/emergency-addresses/{addressId}

deleteEmergencyAddress‚Äč

delete/phone/emergency-addresses/{addressId}

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

deleteAllSentEmails‚Äč

delete/sent

getSentDeliveryStatusesBySentId‚Äč

Get all sent email delivery statuses

get/sent/{sentId}/delivery-status

getSentEmail‚Äč

get/sent/{id}

deleteSentEmail‚Äč

delete/sent/{id}

getSentEmailPreviewURLs‚Äč

Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.

get/sent/{id}/urls

getSentEmailTrackingPixels‚Äč

Get all tracking pixels for a sent email in paginated form

get/sent/{id}/tracking-pixels

getSentEmailHTMLContent‚Äč

get/sent/{id}/html

getRawSentEmailContents‚Äč

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

get/sent/{emailId}/raw

getRawSentEmailJson‚Äč

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

get/sent/{emailId}/raw/json

getAllSentTrackingPixels‚Äč

Get all sent email tracking pixels in paginated form

get/sent/tracking-pixels

getSentEmailsWithQueueResults‚Äč

get/sent/queue-results

getSentOrganizationEmails‚Äč

Get all sent organization emails in paginated form

get/sent/organization

getSentDeliveryStatuses‚Äč

Get all sent email delivery statuses

get/sent/delivery-status

getSentDeliveryStatus‚Äč

Get a sent email delivery status

get/sent/delivery-status/{deliveryId}

waitForDeliveryStatuses‚Äč

Wait for delivery statuses

get/sent/delivery-status/wait-for

SmsController‚Äč

Endpoints for managing SMS

getSmsMessagesPaginated‚Äč

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

get/sms

deleteSmsMessages‚Äč

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

delete/sms

getSmsMessage‚Äč

Returns a SMS summary object with content.

get/sms/{smsId}

deleteSmsMessage‚Äč

Delete an SMS message

delete/sms/{smsId}

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 email template

get/templates/{templateId}

updateTemplate‚Äč

Update email template

put/templates/{templateId}

deleteTemplate‚Äč

Delete template

delete/templates/{templateId}

getTemplates‚Äč

Get all templates

get/templates

createTemplate‚Äč

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

post/templates

getTemplatePreviewJson‚Äč

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

get/templates/{templateId}/preview/json

getTemplatePreviewHtml‚Äč

Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.

get/templates/{templateId}/preview/html

getAllTemplates‚Äč

Get all templates in paginated format

get/templates/paginated

TrackingController‚Äč

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

getAllTrackingPixels‚Äč

List tracking pixels in paginated form

get/tracking/pixels

createTrackingPixel‚Äč

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.

post/tracking/pixels

getTrackingPixel‚Äč

get/tracking/pixels/{id}

UserController‚Äč

getJsonPropertyAsString‚Äč

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

post/user/json/pluck

getUserInfo‚Äč

Get account information for your user

get/user/info

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‚Äč

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

post/waitFor

waitForSms‚Äč

Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

post/waitForSms

waitForMatchingFirstEmail‚Äč

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.

post/waitForMatchingFirstEmail

waitForMatchingEmails‚Äč

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.

post/waitForMatchingEmails

waitForLatestSms‚Äč

Wait until a phone number meets given conditions or return immediately if already met

post/waitForLatestSms

waitForNthEmail‚Äč

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.

get/waitForNthEmail

waitForLatestEmail‚Äč

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.

get/waitForLatestEmail

waitForEmailCount‚Äč

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.

get/waitForEmailCount

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

createAccountWebhook‚Äč

Get notified of account level events such as bounce and bounce recipient.

post/webhooks

deleteAllWebhooks‚Äč

delete/webhooks

sendTestData‚Äč

post/webhooks/{webhookId}/test

getJsonSchemaForWebhookPayload‚Äč

Get JSON Schema definition for webhook payload

post/webhooks/{webhookId}/schema

getTestWebhookPayloadForWebhook‚Äč

Get example payload for webhook

post/webhooks/{webhookId}/example

verifyWebhookSignature‚Äč

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

post/webhooks/verify

getJsonSchemaForWebhookEvent‚Äč

Get JSON Schema definition for webhook payload by event

post/webhooks/schema

redriveWebhookResult‚Äč

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.

post/webhooks/results/{webhookResultId}/redrive

createWebhookForPhoneNumber‚Äč

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

post/phone/numbers/{phoneNumberId}/webhooks

getWebhooks‚Äč

get/inboxes/{inboxId}/webhooks

createWebhook‚Äč

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.

post/inboxes/{inboxId}/webhooks

getWebhook‚Äč

get/webhooks/{webhookId}

deleteWebhookById‚Äč

delete/webhooks/{webhookId}

getWebhookResults‚Äč

get/webhooks/{webhookId}/results

getTestWebhookPayload‚Äč

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

get/webhooks/test

getTestWebhookPayloadNewSms‚Äč

get/webhooks/test/new-sms-payload

getTestWebhookPayloadNewEmail‚Äč

get/webhooks/test/new-email-payload

getTestWebhookPayloadNewContact‚Äč

get/webhooks/test/new-contact-payload

getTestWebhookPayloadNewAttachment‚Äč

get/webhooks/test/new-attachment-payload

getTestWebhookPayloadEmailRead‚Äč

Get webhook test payload for email opened event

get/webhooks/test/email-read-payload

getTestWebhookPayloadEmailOpened‚Äč

Get webhook test payload for email opened event

get/webhooks/test/email-opened-payload

getTestWebhookPayloadBounceRecipient‚Äč

Get webhook test payload for bounce recipient

get/webhooks/test/email-bounce-recipient-payload

getTestWebhookPayloadBounce‚Äč

Get webhook test payload for bounce

get/webhooks/test/email-bounce-payload

getTestWebhookPayloadDeliveryStatus‚Äč

get/webhooks/test/delivery-status-payload

getAllWebhookResults‚Äč

get/webhooks/results

getWebhookResult‚Äč

get/webhooks/results/{webhookResultId}

getWebhookResultsUnseenErrorCount‚Äč

get/webhooks/results/unseen-count

getAllWebhooks‚Äč

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

get/webhooks/paginated

getAllAccountWebhooks‚Äč

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

get/webhooks/account/paginated

getPhoneNumberWebhooksPaginated‚Äč

get/phone/numbers/{phoneId}/webhooks/paginated

getInboxWebhooksPaginated‚Äč

get/inboxes/{inboxId}/webhooks/paginated

deleteWebhook‚Äč

delete/inboxes/{inboxId}/webhooks/{webhookId}