MailSlurp

MailSlurp API

MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test…

Communication#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.

Resources

Endpoints 379

AliasController

  • GETGet an email alias/aliases/:aliasIdGet an email alias by ID
  • PUTUpdate an email alias/aliases/:aliasId
  • DELETEDelete an email alias/aliases/:aliasId
  • PUTReply to an email/aliases/:aliasId/emails/:emailIdSend 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…
  • GETGet all email aliases you have created/aliasesGet all email aliases in paginated form
  • POSTCreate 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./aliasesEmail 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…
  • GETGet emails for an alias/aliases/:aliasId/emailsGet paginated emails for an alias by ID
  • POSTSend an email from an alias inbox/aliases/:aliasId/emailsSend an email from an alias. Replies to the email will be forwarded to the alias masked email address
  • GETGet threads created for an alias/aliases/:aliasId/threadsReturns threads created for an email alias in paginated form
  • GETGet all threads/aliases/threadsReturns threads created for all aliases in paginated form
  • GETGet a thread/aliases/threads/:threadIdReturn a thread associated with an alias

EmailController

  • GETGet email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController./emails/:emailIdReturns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
  • PUTReply to an email/emails/:emailIdSend 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…
  • DELETEDelete an email/emails/:emailIdDeletes an email and removes it from the inbox. Deleted emails cannot be recovered.
  • PUTSet email favourited state/emails/:emailId/favourite?favourited=trueSet and return new favorite state for an email
  • GETGet all emails in all inboxes in paginated form. Email API list all./emailsBy 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…
  • POSTSend email/emailsAlias 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…
  • DELETEDelete all emails in all inboxes./emailsDeletes all emails in your account. Be careful as emails cannot be recovered
  • POSTValidate email HTML contents/emails/:emailId/validateValidate the HTML content of email if HTML is found. Considered valid if no HTML is present.
  • POSTTake a screenshot of an email in a browser/emails/:emailId/screenshot/binaryReturns binary octet-stream of screenshot of the given email
  • POSTTake a screenshot of an email in a browser and return base64 encoded string/emails/:emailId/screenshot/base64Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information.
  • POSTSet IMAP flags associated with a message. Only supports '\Seen' flag./emails/:emailId/imap-flag-operationApply RFC3501 section-2.3.2 IMAP flag operations on an email
  • POSTForward email to recipients/emails/:emailId/forwardForward 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…
  • POSTGet email content regex pattern match results. Runs regex against email body and returns match groups./emails/:emailId/contentMatchReturn 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…
  • POSTDetect broken links, spelling, and images in email content/emails/:emailId/check-email-bodyFind dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or…
  • POSTShow which mail clients support the HTML and CSS features used in an email body./emails/:emailId/check-email-body-feature-supportDetect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
  • POSTGet all emails by search criteria. Return in paginated form./emails/searchSearch emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search…
  • POSTShow which email programs and devices support the features used in an email body./emails/check-email-client-supportEvaluate the features used in an email body and return a report of email client support across different platforms and versions.
  • POSTCheck if email can be sent and options are valid./emails/can-send?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Can user send email to given recipient or is the recipient blocked
  • PATCHMark an email as read or unread/emails/:emailId/readMarks 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
  • PATCHMark all emails as read or unread/emails/readMarks all emails as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
  • GETGet email URLs for viewing in browser or downloading/emails/:emailId/urlsGet a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
  • GETParse and return text from an email, stripping HTML and decoding encoded characters/emails/:emailId/textLinesParse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
  • GETGet email data including headers but not body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController./emails/:emailId/summaryReturns a email summary object with headers. To retrieve the body see getEmail and to get raw unparsed email use the getRawEmail endpoints
  • GETGet raw email string. Returns unparsed raw SMTP message with headers and body./emails/:emailId/rawReturns 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…
  • GETGet raw email in JSON. Unparsed SMTP message in JSON wrapper format./emails/:emailId/raw/jsonReturns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
  • GETParse and return list of links found in an email (only works for HTML content)/emails/:emailId/linksHTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
  • GETGet email content as HTML. For displaying emails in browser context./emails/:emailId/htmlRetrieve 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…
  • GETParse and return text from an email, stripping HTML and decoding encoded characters/emails/:emailId/htmlQuery?htmlSelector=stringParse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
  • GETGet email content as HTML in JSON wrapper. For fetching entity decoded HTML content/emails/:emailId/html/jsonRetrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type application/json;charset=utf-8…
  • GETGet email content part by content type/emails/:emailId/contentPart?contentType=stringGet email body content parts from a multipart email message for a given content type
  • GETGet email content part by content type raw response/emails/:emailId/contentPart/raw?contentType=stringGet email body content parts from a multipart email message for a given content type and return as response
  • GETGet email body as string. Returned as `plain/text` with content type header./emails/:emailId/bodyReturns the specified email body for a given email as a string
  • GETGet email body in bytes. Returned as `octet-stream` with content type header./emails/:emailId/body-bytesReturns the specified email body for a given email as a stream / array of bytes.
  • GETGet all email attachment metadata. Metadata includes name and size of attachments./emails/:emailId/attachmentsReturns an array of attachment metadata such as name and content-type for a given email if present.
  • GETGet 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./emails/:emailId/attachments/:attachmentIdReturns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The…
  • GETGet email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods./emails/:emailId/attachments/:attachmentId/metadataReturns the metadata such as name and content-type for a given attachment and email.
  • GETGet 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`./emails/:emailId/attachments/:attachmentId/base64Returns 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…
  • GETGet unread email count/emails/unreadCountGet number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response
  • GETReturn email threads in paginated form/emails/threadsReturn email message chains built from Message-ID, In-Reply-To, and References header.
  • GETReturn email thread information. Use items endpoints to get messages for thread./emails/threads/:threadIdReturn email message thread summary from Message-ID, In-Reply-To, and References header. Get messages using items endpoint
  • GETReturn email thread items./emails/threads/:threadId/itemsReturn email thread messages based on Message-ID, In-Reply-To, and References header
  • GETGet all organization emails. List team or shared test email accounts/emails/organizationBy 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…
  • GETGet all emails in all inboxes in paginated form. Email API list all./emails/offset-paginatedBy 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…
  • GETGet latest email in all inboxes. Most recently received./emails/latestGet the newest email in all inboxes or in a passed set of inbox IDs
  • GETGet latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet./emails/latestIn?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Get the newest email in all inboxes or in a passed set of inbox IDs
  • GETgetGravatarUrlForEmailAddress/emails/gravatarFor?emailAddress=stringGet gravatar url for email address
  • GETGet email count/emails/emails/count

FormController

  • POSTSubmit a form to be parsed and sent as an email to an address determined by the form fields/formsThis 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…

SentEmailsController

  • GETGet all sent emails in paginated form/sent
  • DELETEDelete all sent email receipts/sent
  • GETgetSentDeliveryStatusesBySentId/sent/:sentId/delivery-statusGet all sent email delivery statuses
  • GETGet sent email receipt/sent/:id
  • DELETEDelete sent email receipt/sent/:id
  • GETGet sent email URL for viewing in browser or downloading/sent/:id/urlsGet a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.
  • GETgetSentEmailTrackingPixels/sent/:id/tracking-pixelsGet all tracking pixels for a sent email in paginated form
  • GETGet sent email HTML content/sent/:id/html
  • GETGet raw sent email string. Returns unparsed raw SMTP message with headers and body./sent/:emailId/rawReturns 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…
  • GETGet raw sent email in JSON. Unparsed SMTP message in JSON wrapper format./sent/:emailId/raw/jsonReturns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain…
  • GETgetAllSentTrackingPixels/sent/tracking-pixelsGet all sent email tracking pixels in paginated form
  • GETGet results of email sent with queues in paginated form/sent/queue-results
  • GETgetSentOrganizationEmails/sent/organizationGet all sent organization emails in paginated form
  • GETgetSentDeliveryStatuses/sent/delivery-statusGet all sent email delivery statuses
  • GETgetSentDeliveryStatus/sent/delivery-status/:deliveryIdGet a sent email delivery status
  • GETwaitForDeliveryStatuses/sent/delivery-status/wait-forWait for delivery statuses

GuestPortalController

  • GETGet guest portals/guest-portalGet portals
  • POSTCreate a portal page for your customers or clients to log into email accounts and view emails./guest-portalCreate a guest login page for customers or clients to access assigned email addresses
  • GETGet all guest users for portal/guest-portal/:portalId/userGet customers for a portal
  • POSTCreate a portal guest user/guest-portal/:portalId/userAdd customer to portal
  • GETGet a client email portal/guest-portal/:portalIdFetch a customer guest portal
  • GETGet guest user for portal/guest-portal/:portalId/user/:guestIdGet customer for portal
  • GETGet all guest users for portal/guest-portal/userGet all customers for a portal
  • GETGet guest user/guest-portal/user/:guestIdGet customer by ID

InboxReplierController

  • GETGet an inbox replier/repliers/:idGet inbox ruleset
  • PUTUpdate an inbox replier/repliers/:idUpdate inbox ruleset
  • DELETEDelete an inbox replier/repliers/:idDelete inbox replier
  • GETList inbox repliers/repliersList all repliers attached to an inbox
  • POSTCreate an inbox replier/repliersCreate a new inbox rule for reply toing, blocking, and allowing emails when sending and receiving
  • DELETEDelete inbox repliers/repliersDelete inbox repliers. Accepts optional inboxId filter.
  • GETGet an inbox replier event list/repliers/:id/eventsGet inbox ruleset events
  • GETGet inbox replier event list/repliers/eventsGet all inbox ruleset events

InboxController

  • PUTSet inbox favourited state/inboxes/:inboxId/favouriteSet and return new favorite state for an inbox
  • GETList Inboxes and email addresses/inboxesDeprecated. List the inboxes you have created. Note use of the more advanced getAllInboxes is recommended and allows paginated access using a limit and sort…
  • POSTCreate 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./inboxesCreate 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.…
  • DELETEDelete all inboxes/inboxesPermanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered…
  • GETGet Inbox. Returns properties of an inbox./inboxes/:inboxIdReturns an inbox's properties, including its email address and ID.
  • POSTSend Email/inboxes/:inboxIdSend an email from an inbox's email address. The request body should contain the SendEmailOptions that include recipients, attachments, body etc. See…
  • DELETEDelete inbox/inboxes/:inboxIdPermanently 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…
  • PATCHUpdate Inbox. Change name and description. Email address is not editable./inboxes/:inboxIdUpdate editable fields on an inbox
  • POSTSend email with with delay or schedule/inboxes/:inboxId/with-scheduleSend 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.
  • POSTSend email with queue/inboxes/:inboxId/with-queue?validateBeforeEnqueue=trueSend 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…
  • POSTSend email using an SMTP mail envelope and message body and return sent confirmation/inboxes/:inboxId/smtp-envelopeSend email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
  • POSTSend a test email to inbox/inboxes/:inboxId/send-test-emailSend an inbox a test email to test email receiving is working
  • GETList inbox rulesets/inboxes/:inboxId/rulesetsList all rulesets attached to an inbox
  • POSTCreate an inbox ruleset/inboxes/:inboxId/rulesetsCreate a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
  • POSTSend email and return sent confirmation/inboxes/:inboxId/confirmSister 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…
  • POSTCreate an inbox with options. Extended options for inbox creation./inboxes/withOptionsAdditional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
  • POSTCreate an inbox with default options. Uses MailSlurp domain pool address and is private./inboxes/withDefaults
  • POSTSearch all inboxes and return matching inboxes/inboxes/searchSearch 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…
  • POSTIs email address available/inboxes/available?emailAddress=stringReturns whether an email address is available
  • GETgetSmtpAccess/inboxes/smtp-accessGet SMTP access usernames and passwords
  • PATCHupdateSmtpAccess/inboxes/smtp-accessUpdate SMTP access usernames and passwords
  • GETgetImapAccess/inboxes/imap-accessGet IMAP access usernames and passwords
  • PATCHupdateImapAccess/inboxes/imap-accessUpdate IMAP access usernames and passwords
  • GETList inbox tracking pixels/inboxes/:inboxId/tracking-pixelsList all tracking pixels sent from an inbox
  • GETGet Inbox Sent Emails/inboxes/:inboxId/sentDeprecated. Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent…
  • GETGet sent email count in inbox/inboxes/:inboxId/sent/count
  • GETGet all scheduled email sending jobs for the inbox/inboxes/:inboxId/scheduled-jobsSchedule sending of emails using scheduled jobs.
  • GETGet sub address plus address aliases for an inbox/inboxes/:inboxId/plus-addressesReturns paginated list of all plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.
  • GETGet sub address plus address for an inbox/inboxes/:inboxId/plus-addresses/:plusAddressIdReturns a plus address object based on emails that used the inbox address with a +xyz alias.
  • GETGet emails for a given inbox plus address/inboxes/:inboxId/plus-addresses/:plusAddressId/emailsReturns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.
  • GETGet emails for a given inbox plus address/inboxes/:inboxId/plus-addresses/emails?plusAddress=stringReturns paginated list of all emails for a given plus alias addresses found for an inbox based on received emails that used the inbox address with a +xyz alias.
  • GETGet 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./inboxes/:inboxId/emailsList 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…
  • GETGet inbox emails paginated/inboxes/:inboxId/emails/paginatedGet a paginated list of emails in an inbox. Does not hold connections open.
  • GETGet email count in inbox/inboxes/:inboxId/emails/count
  • GETgetDeliveryStatusesByInboxId/inboxes/:inboxId/delivery-statusDeprecated. Get all email delivery statuses for an inbox
  • GETGet inbox tags/inboxes/tagsGet all inbox tags
  • GETGet inbox tags paginated/inboxes/tags/paginatedGet all inbox tags paginated
  • GETGet inboxes for a tag/inboxes/tags/inboxes?tag=stringGet all inboxes for a given inbox tag
  • GETGet all scheduled email sending jobs for account/inboxes/scheduled-jobsSchedule sending of emails using scheduled jobs. These can be inbox or account level.
  • GETGet a scheduled email job/inboxes/scheduled-jobs/:jobIdGet a scheduled email job details.
  • DELETECancel a scheduled email job/inboxes/scheduled-jobs/:jobIdGet a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.
  • GETGet all sub address plus address aliases for an inbox/inboxes/plus-addressesReturns paginated list of all plus alias addresses found for in account based on received emails that used the inbox address with a +xyz alias.
  • GETGet sub address plus address by ID/inboxes/plus-addresses/:plusAddressIdReturns a plus address object based on emails that used the inbox address with a +xyz alias.
  • GETList All Inboxes Paginated/inboxes/paginatedList 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…
  • GETList all inboxes with sent emails/inboxes/outboxesList inboxes that have sent emails
  • GETList Organization Inboxes Paginated/inboxes/organizationDeprecated. List organization inboxes in paginated form. These are inboxes created with allowTeamAccess flag enabled. Organization inboxes are readOnly for…
  • GETList All Inboxes Offset Paginated/inboxes/offset-paginatedList 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…
  • GETgetImapSmtpAccess/inboxes/imap-smtp-accessGet IMAP and SMTP access usernames and passwords
  • GETgetImapSmtpAccessServers/inboxes/imap-smtp-access/serversGet IMAP and SMTP server hosts
  • GETgetImapSmtpAccessEnv/inboxes/imap-smtp-access/envGet IMAP and SMTP access details in .env format
  • GETGet all inbox IDs/inboxes/idsDeprecated. Get list of inbox IDs
  • GETGet latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet./inboxes/getLatestEmail?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6&timeoutMillis=0Get the newest email in an inbox or wait for one to arrive
  • GETDoes inbox exist/inboxes/exists?emailAddress=stringCheck if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
  • GETGet total inbox count/inboxes/count
  • GETSearch for an inbox with the given name/inboxes/byName?name=stringGet a inbox result by name
  • GETSearch for an inbox with the provided email address/inboxes/byEmailAddress?emailAddress=stringGet a inbox result by email address
  • DELETEDelete all emails in a given inboxes./inboxes/:inboxId/deleteAllInboxEmailsDeletes all emails in an inbox. Be careful as emails cannot be recovered
  • DELETERemove expired inboxes/inboxes/expiredRemove any expired inboxes for your account (instead of waiting for scheduled removal on server)
  • DELETEDelete inboxes by tag/inboxes/by-tag?tag=stringPermanently delete all inboxes by tag
  • DELETEDelete inboxes by name/inboxes/by-name?name=stringPermanently delete all inboxes by name
  • DELETEDelete inboxes by description/inboxes/by-description?description=stringPermanently delete all inboxes by description

ExpiredController

  • GETList records of expired inboxes/expiredInboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address.…
  • GETGet an expired inbox record/expired/:expiredIdInboxes 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…
  • GETGet expired inbox record for a previously existing inbox/expired/inbox/:inboxIdUse 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.…
  • GETGet default expiration settings/expired/defaultsReturn default times used for inbox expiration

BulkActionsController

  • POSTBulk Send Emails/bulk/send
  • POSTBulk create Inboxes (email addresses)/bulk/inboxes?count=0
  • DELETEBulk Delete Inboxes/bulk/inboxes

ConnectorController

  • GETGet an inbox connector/connectors/:id
  • PUTUpdate an inbox connector/connectors/:id
  • DELETEDelete an inbox connector/connectors/:id
  • GETGet inbox connectors/connectorsList inbox connectors that sync external emails to MailSlurp inboxes
  • POSTCreate an inbox connector/connectorsSync emails between external mailboxes and MailSlurp inboxes
  • DELETEDelete all inbox connectors/connectors
  • POSTSync an inbox connector/connectors/:id/sync
  • GETGet an inbox connector sync settings/connectors/:id/sync-settingsGet sync settings for connection with external inbox
  • POSTCreate an inbox connector sync settings/connectors/:id/sync-settingsConfigure automatic pull or emails from external inboxes using an interval or schedule
  • DELETECreate an inbox connector sync settings/connectors/:id/sync-settingsConfigure automatic pull or emails from external inboxes using an interval or schedule
  • GETGet an inbox connector SMTP connection/connectors/:id/smtpGet SMTP connection for external inbox
  • POSTCreate an inbox connector SMTP connection/connectors/:id/smtpAllows sending via connector and email is routed to connected inbox and sent via SMTP
  • DELETEDelete an inbox connector SMTP connection/connectors/:id/smtpDelete SMTP connection for external inbox
  • PATCHUpdate an inbox connector SMTP connection/connectors/:id/smtpUpdate SMTP connection for external inbox
  • POSTTest an inbox connector SMTP connection/connectors/:id/smtp/testTest the SMTP connection for a connector
  • POSTSend from an inbox connector/connectors/:id/send
  • GETGet an inbox connector IMAP connection/connectors/:id/imapGet IMAP connection for external inbox
  • POSTCreate an inbox connector IMAP connection/connectors/:id/imapAllows the reading of emails in an external mailbox and syncing to a MailSlurp inbox
  • DELETEDelete an inbox connector IMAP connection/connectors/:id/imapDelete IMAP connection for external inbox
  • PATCHUpdate an inbox connector IMAP connection/connectors/:id/imapUpdate IMAP connection for external inbox
  • POSTTest an inbox connector IMAP connection/connectors/:id/imap/testTest the IMAP connection for a connector
  • POSTCreate an inbox connector with options/connectors/withOptionsSync emails between external mailboxes and MailSlurp inboxes
  • POSTTest an inbox connector SMTP connection options/connectors/connections/smtp/testTest the SMTP connection options for a connector
  • POSTTest an inbox connector IMAP connection options/connectors/connections/imap/testTest the IMAP connection options for a connector
  • GETGet an inbox connector events/connectors/:id/events
  • GETGet SMTP and IMAP connection settings for common mail providers/connectors/provider-settingsGet common mail provider SMTP and IMAP connection settings
  • GETGet all inbox connector events/connectors/events
  • GETGet an inbox connector event/connectors/events/:id
  • GETGet connector by name/connectors/by-name?name=stringFind an inbox connector by name
  • GETGet connector by inbox ID/connectors/by-inbox-id?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Find an inbox connector by inbox ID
  • GETGet connector by email address/connectors/by-email-address?emailAddress=stringFind an inbox connector by email address

ContactController

  • GETGet all contacts/contacts
  • POSTCreate a contact/contacts
  • GETGet contact/contacts/:contactId
  • DELETEDelete contact/contacts/:contactId
  • GETGet contact vCard vcf file/contacts/:contactId/downloadDeprecated.
  • GETGet all contacts/contacts/paginated

GroupController

  • GETGet group and contacts belonging to it/groups/:groupId/contacts
  • PUTAdd contacts to a group/groups/:groupId/contacts
  • DELETERemove contacts from a group/groups/:groupId/contacts
  • GETGet all groups/groups
  • POSTCreate a group/groups
  • GETGet group/groups/:groupId
  • DELETEDelete group/groups/:groupId
  • GETgetGroupWithContactsPaginated/groups/:groupId/contacts-paginatedGet group and paginated contacts belonging to it
  • GETGet all Contact Groups in paginated format/groups/paginated

InboxRulesetController

  • GETList inbox rulesets/rulesetsList all rulesets attached to an inbox
  • PUTTest inbox rulesets for inbox/rulesets?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Test inbox rulesets for inbox
  • POSTCreate an inbox ruleset/rulesetsCreate a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
  • DELETEDelete inbox rulesets/rulesetsDelete inbox rulesets. Accepts optional inboxId filter.
  • PATCHTest new inbox ruleset/rulesetsTest new inbox ruleset
  • POSTTest an inbox ruleset/rulesets/:id/testTest an inbox ruleset
  • POSTTest sending with inbox rulesets/rulesets/test-sendingTest whether outbound emails to an email address would be blocked or allowed by inbox rulesets
  • POSTTest receiving with inbox rulesets/rulesets/test-receivingTest whether inbound emails from an email address would be blocked or allowed by inbox rulesets
  • GETGet an inbox ruleset/rulesets/:idGet inbox ruleset
  • DELETEDelete an inbox ruleset/rulesets/:idDelete inbox ruleset

DomainController

  • GETGet a domain/domains/:idReturns domain verification status and tokens for a given domain
  • PUTUpdate a domain/domains/:idUpdate values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
  • DELETEDelete a domain/domains/:idDelete a domain. This will disable any existing inboxes that use this domain.
  • GETGet domains/domainsList all custom domains you have created
  • POSTCreate Domain/domainsLink 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…
  • GETGet catch all wild card inbox for domain/domains/:id/wildcardGet the catch all inbox for a domain for missed emails
  • POSTAdd catch all wild card inbox to domain/domains/:id/wildcardAdd 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
  • GETGet MailSlurp domains/domains/mailslurp-domainsList all MailSlurp domains used with non-custom email addresses
  • GETGet domain issues/domains/issuesList domain issues for domains you have created
  • GETGet all usable domains/domains/available-domainsList all domains available for use with email address creation

TrackingController

  • GETGet tracking pixels/tracking/pixelsList tracking pixels in paginated form
  • POSTCreate tracking pixel/tracking/pixelsCreate 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…
  • GETGet pixel/tracking/pixels/:id

WaitForController

  • POSTWait for an email to match the provided filter conditions such as subject contains keyword./waitForGeneric waitFor method that will wait until an inbox meets given conditions or return immediately if already met
  • POSTWait for an SMS message to match the provided filter conditions such as body contains keyword./waitForSmsGeneric waitFor method that will wait until a phone number meets given conditions or return immediately if already met
  • POSTWait for or return the first email that matches provided MatchOptions array/waitForMatchingFirstEmail?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Perform 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…
  • POSTWait or return list of emails that match simple matching patterns/waitForMatchingEmails?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6&count=1Perform 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…
  • POSTWait for the latest SMS message to match the provided filter conditions such as body contains keyword./waitForLatestSmsWait until a phone number meets given conditions or return immediately if already met
  • GETWait 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./waitForNthEmailIf 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.
  • GETFetch inbox's latest email or if empty wait for an email to arrive/waitForLatestEmailWill 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…
  • GETWait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs/waitForEmailCount?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6&count=1If 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…

InboxForwarderController

  • GETList inbox forwarders/forwardersList all forwarders attached to an inbox
  • PUTTest inbox forwarders for inbox/forwarders?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Test inbox forwarders for inbox
  • POSTCreate an inbox forwarder/forwarders?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
  • DELETEDelete inbox forwarders/forwardersDelete inbox forwarders. Accepts optional inboxId filter.
  • PATCHTest new inbox forwarder/forwardersTest new inbox forwarder
  • GETGet an inbox forwarder/forwarders/:idGet inbox forwarder
  • PUTUpdate an inbox forwarder/forwarders/:idUpdate inbox forwarder
  • DELETEDelete an inbox forwarder/forwarders/:idDelete inbox forwarder
  • POSTTest an inbox forwarder/forwarders/:id/testTest an inbox forwarder
  • GETGet an inbox forwarder event list/forwarders/:id/eventsGet inbox forwarder events
  • GETGet an inbox forwarder event/forwarders/:id/events/:eventIdGet inbox forwarder event
  • GETGet all inbox forwarder events/forwarders/eventsGet all inbox forwarder events
  • GETGet a forwarder event/forwarders/events/:eventIdGet forwarder event

MissedEmailController

  • POSTRestore missed emails/missed-emails/restoreIf 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…
  • GETGet all MissedEmails in paginated format/missed-emails
  • GETGet MissedEmail/missed-emails/:missedEmailIdList emails that were missed due to plan limits.
  • GETWait for Nth missed email/missed-emails/waitForNthMissedEmail?index=0Wait for 0 based index missed email
  • GETGet all unknown missed emails in paginated format/missed-emails/unknownUnknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox.

CommonActionsController

  • POSTSend an email/sendEmailIf no senderId or inboxId provided a random email address will be used to send from.
  • POSTSend an email using query parameters/sendEmailQuery?to=stringIf no senderId or inboxId provided a random email address will be used to send from. Ensure your parameters are URL encoded.
  • POSTCreate new random inbox/newEmailAddressReturns an Inbox with an id and an emailAddress
  • POSTCreate new random inbox/createInboxReturns an Inbox with an id and an emailAddress
  • DELETEDelete all emails in an inbox/emptyInbox?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Deletes all emails
  • DELETEDelete inbox email address by inbox id/deleteEmailAddress?inboxId=3fa85f64-5717-4562-b3fc-2c963f66afa6Deletes inbox email address

ImapController

  • POSTimapServerUpdateFlags/imap/server/update-flagsUpdate message flags
  • POSTGet status for mailbox/imap/server/status
  • POSTSearch messages in an inbox/imap/server/search
  • POSTCreate a new mailbox if possible/imap/server/mailbox?name=string
  • POSTList messages in an inbox/imap/server/list
  • POSTGet a message by email ID/imap/server/get?emailId=3fa85f64-5717-4562-b3fc-2c963f66afa6
  • POSTFetch message in an inbox/imap/server/fetch?seqNum=0

PhoneController

  • POSTtestPhoneNumberSendSms/phone/numbers/:phoneNumberId/test
  • GETgetEmergencyAddresses/phone/emergency-addresses
  • POSTcreateEmergencyAddress/phone/emergency-addresses
  • GETgetPhonePlans/phone/plans
  • GETgetPhonePlansAvailability/phone/plans/availability
  • GETgetPhoneNumbers/phone/numbers
  • GETgetPhoneNumber/phone/numbers/:phoneNumberId
  • DELETEdeletePhoneNumber/phone/numbers/:phoneNumberId
  • GETgetEmergencyAddress/phone/emergency-addresses/:addressId
  • DELETEdeleteEmergencyAddress/phone/emergency-addresses/:addressId

ExportController

  • GETExport inboxes link callable via browser/export?exportType=INBOXES&apiKey=string&outputFormat=CSV_DEFAULT
  • POSTGet export link/export?exportType=INBOXES

SmsController

  • GETGet reply for an SMS message/sms/:smsId/replyGet reply for an SMS message.
  • POSTSend a reply to a received SMS message. Replies are sent from the receiving number./sms/:smsId/replyReply to an SMS message.
  • GETGet all SMS messages in all phone numbers in paginated form. ./smsBy 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…
  • DELETEDelete all SMS messages/smsDelete all SMS messages or all messages for a given phone number
  • GETGet SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController./sms/:smsIdReturns a SMS summary object with content.
  • DELETEDelete SMS message./sms/:smsIdDelete an SMS message
  • GETGet unread SMS count/sms/unreadCountGet number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response
  • GETGet SMS count/sms/countGet number of SMS

TemplateController

  • GETGet template/templates/:templateIdGet email template
  • PUTUpdate template/templates/:templateIdUpdate email template
  • DELETEDelete email template/templates/:templateIdDelete template
  • GETList templates/templatesGet all templates
  • POSTCreate a Template/templatesCreate an email template with variables for use with templated transactional emails.
  • GETGet template preview Json/templates/:templateId/preview/jsonGet email template preview with passed template variables in JSON format. Pass template variables as query params.
  • GETGet template preview HTML/templates/:templateId/preview/htmlGet email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.
  • GETList templates/templates/paginatedGet all templates in paginated format

AttachmentController

  • GETGet email attachments/attachmentsGet all attachments in paginated response. Each entity contains meta data for the attachment such as name and content-type. Use the attachmentId and the…
  • POSTUpload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment./attachments
  • DELETEDelete all attachments/attachmentsDelete all attachments
  • POSTUpload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment./attachments/multipart
  • POSTUpload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment./attachments/bytes

Showing 300 of 379 endpoints. Fork the collection to see all of them.

API details

Base URL
https://api.mailslurp.com
Authentication
An API key in the x-api-key header
Operations
379 operations on 300 pathsGET 204POST 107DELETE 44PUT 14PATCH 10
8 marked deprecated
Main resources
InboxController 61EmailController 47WebhookController 38ConnectorController 31SentEmailsController 16ToolsController 15InboxForwarderController 13AliasController 11AttachmentController 10DomainController 10
Response formats
*/* text/html application/octet-stream text/html;charset=utf-8
Description format
OpenAPI 3.0.1, API version 6.5.2

How to test the MailSlurp API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the MailSlurp API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the x-api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get an email alias” (GET /aliases/:aliasId), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the MailSlurp API?

MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test… It is listed under Communication and has 379 endpoints.

Who publishes the MailSlurp API?

It is listed from MailSlurp's public API description (an OpenAPI document), not published by MailSlurp on Swastik Codes. Anyone who controls mailslurp.com can claim the profile by adding a DNS TXT record.

What is the base URL of the MailSlurp API?

Requests go to https://api.mailslurp.com. Endpoint paths are added to this base URL.

How do I authenticate with the MailSlurp API?

With an API key in the x-api-key header.

How many endpoints does the MailSlurp API have?

379 operations on 300 paths (204 GET, 107 POST, 44 DELETE, 14 PUT, 10 PATCH). The largest groups are InboxController, EmailController, WebhookController, ConnectorController.

Is forking the MailSlurp API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.