Swiftpack.co -  mailslurp/mailslurp-client-swift as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Official MailSlurp Email API Client for Swift
.package(url: "https://github.com/mailslurp/mailslurp-client-swift.git", from: "12.2.0")

Swift5 API client for mailslurp

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.



This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 6.5.2
  • Package version:
  • Build package: org.openapitools.codegen.languages.Swift5ClientCodegen



Run carthage update


Run pod install

Documentation for API Endpoints

All URIs are relative to https://api.mailslurp.com

Class Method HTTP request Description
AliasControllerAPI 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.
AliasControllerAPI deleteAlias DELETE /aliases/{aliasId} Delete an email alias
AliasControllerAPI getAlias GET /aliases/{aliasId} Get an email alias
AliasControllerAPI getAliasEmails GET /aliases/{aliasId}/emails Get emails for an alias
AliasControllerAPI getAliasThreads GET /aliases/{aliasId}/threads Get threads created for an alias
AliasControllerAPI getAliases GET /aliases Get all email aliases you have created
AliasControllerAPI replyToAliasEmail PUT /aliases/{aliasId}/emails/{emailId} Reply to an email
AliasControllerAPI sendAliasEmail POST /aliases/{aliasId}/emails Send an email from an alias inbox
AliasControllerAPI updateAlias PUT /aliases/{aliasId} Update an email alias
AttachmentControllerAPI deleteAttachment DELETE /attachments/{attachmentId} Delete an attachment
AttachmentControllerAPI 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.
AttachmentControllerAPI downloadAttachmentAsBytes GET /attachments/{attachmentId}/bytes Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
AttachmentControllerAPI getAttachmentInfo GET /attachments/{attachmentId}/metadata Get email attachment metadata information
AttachmentControllerAPI getAttachments GET /attachments Get email attachments
AttachmentControllerAPI 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.
AttachmentControllerAPI 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.
AttachmentControllerAPI 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.
BulkActionsControllerAPI bulkCreateInboxes POST /bulk/inboxes Bulk create Inboxes (email addresses)
BulkActionsControllerAPI bulkDeleteInboxes DELETE /bulk/inboxes Bulk Delete Inboxes
BulkActionsControllerAPI bulkSendEmails POST /bulk/send Bulk Send Emails
CommonActionsControllerAPI createNewEmailAddress POST /createInbox Create new random inbox
CommonActionsControllerAPI createNewEmailAddress1 POST /newEmailAddress Create new random inbox
CommonActionsControllerAPI emptyInbox DELETE /emptyInbox Delete all emails in an inbox
CommonActionsControllerAPI sendEmailSimple POST /sendEmail Send an email
ContactControllerAPI createContact POST /contacts Create a contact
ContactControllerAPI deleteContact DELETE /contacts/{contactId} Delete contact
ContactControllerAPI getAllContacts GET /contacts/paginated Get all contacts
ContactControllerAPI getContact GET /contacts/{contactId} Get contact
ContactControllerAPI getContactVCard GET /contacts/{contactId}/download Get contact vCard vcf file
ContactControllerAPI getContacts GET /contacts Get all contacts
DomainControllerAPI addDomainWildcardCatchAll POST /domains/{id}/wildcard Add catch all wild card inbox to domain
DomainControllerAPI createDomain POST /domains Create Domain
DomainControllerAPI deleteDomain DELETE /domains/{id} Delete a domain
DomainControllerAPI getDomain GET /domains/{id} Get a domain
DomainControllerAPI getDomains GET /domains Get domains
DomainControllerAPI updateDomain PUT /domains/{id} Update a domain
EmailControllerAPI deleteAllEmails DELETE /emails Delete all emails in all inboxes.
EmailControllerAPI deleteEmail DELETE /emails/{emailId} Delete an email
EmailControllerAPI 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.
EmailControllerAPI 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`.
EmailControllerAPI downloadBody GET /emails/{emailId}/body Get email body as string. Returned as `plain/text` with content type header.
EmailControllerAPI downloadBodyBytes GET /emails/{emailId}/body-bytes Get email body in bytes. Returned as `octet-stream` with content type header.
EmailControllerAPI forwardEmail POST /emails/{emailId}/forward Forward email to recipients
EmailControllerAPI 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.
EmailControllerAPI getAttachments1 GET /emails/{emailId}/attachments Get all email attachment metadata. Metadata includes name and size of attachments.
EmailControllerAPI 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.
EmailControllerAPI getEmailContentMatch POST /emails/{emailId}/contentMatch Get email content regex pattern match results. Runs regex against email body and returns match groups.
EmailControllerAPI getEmailHTML GET /emails/{emailId}/html Get email content as HTML. For displaying emails in browser context.
EmailControllerAPI getEmailHTMLQuery GET /emails/{emailId}/htmlQuery Parse and return text from an email, stripping HTML and decoding encoded characters
EmailControllerAPI getEmailTextLines GET /emails/{emailId}/textLines Parse and return text from an email, stripping HTML and decoding encoded characters
EmailControllerAPI getEmailsPaginated GET /emails Get all emails in all inboxes in paginated form. Email API list all.
EmailControllerAPI getLatestEmail GET /emails/latest Get latest email in all inboxes. Most recently received.
EmailControllerAPI getLatestEmailInInbox GET /emails/latestIn Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
EmailControllerAPI getOrganizationEmailsPaginated GET /emails/organization Get all organization emails. List team or shared test email accounts
EmailControllerAPI getRawEmailContents GET /emails/{emailId}/raw Get raw email string. Returns unparsed raw SMTP message with headers and body.
EmailControllerAPI getRawEmailJson GET /emails/{emailId}/raw/json Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.
EmailControllerAPI getUnreadEmailCount GET /emails/unreadCount Get unread email count
EmailControllerAPI replyToEmail PUT /emails/{emailId} Reply to an email
EmailControllerAPI validateEmail POST /emails/{emailId}/validate Validate email HTML contents
ExpiredControllerAPI getExpirationDefaults GET /expired/defaults Get default expiration settings
ExpiredControllerAPI getExpiredInboxByInboxId GET /expired/inbox/{inboxId} Get expired inbox record for a previously existing inbox
ExpiredControllerAPI getExpiredInboxRecord GET /expired/{expiredId} Get an expired inbox record
ExpiredControllerAPI getExpiredInboxes GET /expired List records of expired inboxes
ExportControllerAPI exportEntities GET /export Export inboxes link callable via browser
ExportControllerAPI getExportLink POST /export Get export link
FormControllerAPI submitForm POST /forms Submit a form to be parsed and sent as an email to an address determined by the form fields
GroupControllerAPI addContactsToGroup PUT /groups/{groupId}/contacts Add contacts to a group
GroupControllerAPI createGroup POST /groups Create a group
GroupControllerAPI deleteGroup DELETE /groups/{groupId} Delete group
GroupControllerAPI getAllGroups GET /groups/paginated Get all Contact Groups in paginated format
GroupControllerAPI getGroup GET /groups/{groupId} Get group
GroupControllerAPI getGroupWithContacts GET /groups/{groupId}/contacts Get group and contacts belonging to it
GroupControllerAPI getGroupWithContactsPaginated GET /groups/{groupId}/contacts-paginated Get group and paginated contacts belonging to it
GroupControllerAPI getGroups GET /groups Get all groups
GroupControllerAPI removeContactsFromGroup DELETE /groups/{groupId}/contacts Remove contacts from a group
InboxControllerAPI 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.
InboxControllerAPI createInboxWithDefaults POST /inboxes/withDefaults Create an inbox with default options. Uses MailSlurp domain pool address and is private.
InboxControllerAPI createInboxWithOptions POST /inboxes/withOptions Create an inbox with options. Extended options for inbox creation.
InboxControllerAPI deleteAllInboxes DELETE /inboxes Delete all inboxes
InboxControllerAPI deleteInbox DELETE /inboxes/{inboxId} Delete inbox
InboxControllerAPI getAllInboxes GET /inboxes/paginated List All Inboxes Paginated
InboxControllerAPI 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.
InboxControllerAPI getInbox GET /inboxes/{inboxId} Get Inbox. Returns properties of an inbox.
InboxControllerAPI getInboxEmailsPaginated GET /inboxes/{inboxId}/emails/paginated Get inbox emails paginated
InboxControllerAPI getInboxSentEmails GET /inboxes/{inboxId}/sent Get Inbox Sent Emails
InboxControllerAPI getInboxTags GET /inboxes/tags Get inbox tags
InboxControllerAPI getInboxes GET /inboxes List Inboxes and email eddresses
InboxControllerAPI getOrganizationInboxes GET /inboxes/organization List Organization Inboxes Paginated
InboxControllerAPI sendEmail POST /inboxes/{inboxId} Send Email
InboxControllerAPI sendEmailAndConfirm POST /inboxes/{inboxId}/confirm Send email and return sent confirmation
InboxControllerAPI sendTestEmail POST /inboxes/{inboxId}/send-test-email Send a test email to inbox
InboxControllerAPI setInboxFavourited PUT /inboxes/{inboxId}/favourite Set inbox favourited state
InboxControllerAPI updateInbox PATCH /inboxes/{inboxId} Update Inbox. Change name and description. Email address is not editable.
MailServerControllerAPI describeMailServerDomain POST /mail-server/describe/domain Get DNS Mail Server records for a domain
MailServerControllerAPI getDnsLookup POST /mail-server/describe/dns-lookup Lookup DNS records for a domain
MailServerControllerAPI getIpAddress POST /mail-server/describe/ip-address Get IP address for a domain
MailServerControllerAPI verifyEmailAddress POST /mail-server/verify/email-address Verify the existence of an email address at a given mail server.
MissedEmailControllerAPI getAllMissedEmails GET /missed-emails Get all MissedEmails in paginated format
MissedEmailControllerAPI getMissedEmail GET /missed-emails/{MissedEmailId} Get MissedEmail
SentEmailsControllerAPI getSentEmail GET /sent/{id} Get sent email receipt
SentEmailsControllerAPI getSentEmails GET /sent Get all sent emails in paginated form
SentEmailsControllerAPI getSentOrganizationEmails GET /sent/organization Get all sent organization emails in paginated form
TemplateControllerAPI createTemplate POST /templates Create a Template
TemplateControllerAPI deleteTemplate DELETE /templates/{TemplateId} Delete Template
TemplateControllerAPI getAllTemplates GET /templates/paginated Get all Templates in paginated format
TemplateControllerAPI getTemplate GET /templates/{TemplateId} Get Template
TemplateControllerAPI getTemplates GET /templates Get all Templates
WaitForControllerAPI waitFor POST /waitFor Wait for an email to match the provided filter conditions such as subject contains keyword.
WaitForControllerAPI waitForEmailCount GET /waitForEmailCount Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
WaitForControllerAPI waitForLatestEmail GET /waitForLatestEmail Fetch inbox's latest email or if empty wait for an email to arrive
WaitForControllerAPI waitForMatchingEmail POST /waitForMatchingEmails Wait or return list of emails that match simple matching patterns
WaitForControllerAPI waitForMatchingFirstEmail POST /waitForMatchingFirstEmail Wait for or return the first email that matches provided MatchOptions array
WaitForControllerAPI waitForNthEmail GET /waitForNthEmail Wait for or fetch the email with a given index in the inbox specified. IF indx doesn't exist waits for it to exist or timeout to occur.
WebhookControllerAPI createWebhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
WebhookControllerAPI deleteWebhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a Webhook for an Inbox
WebhookControllerAPI getAllWebhookResults GET /webhooks/results Get results for all webhooks
WebhookControllerAPI getAllWebhooks GET /webhooks/paginated List Webhooks Paginated
WebhookControllerAPI getTestWebhookPayload GET /webhooks/test Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
WebhookControllerAPI getTestWebhookPayloadNewAttachment GET /webhooks/test/new-attachment-payload Get webhook test payload for new attachment event
WebhookControllerAPI getTestWebhookPayloadNewContact GET /webhooks/test/new-contact-payload Get webhook test payload for new contact event
WebhookControllerAPI getTestWebhookPayloadNewEmail GET /webhooks/test/new-email-payload Get webhook test payload for new email event
WebhookControllerAPI getWebhook GET /webhooks/{webhookId} Get a webhook for an Inbox
WebhookControllerAPI getWebhookResult GET /webhooks/results/{webhookResultId} Get a webhook result for a webhook
WebhookControllerAPI getWebhookResults GET /webhooks/{webhookId}/results Get a webhook results for a webhook
WebhookControllerAPI getWebhooks GET /inboxes/{inboxId}/webhooks Get all webhooks for an Inbox
WebhookControllerAPI sendTestData POST /webhooks/{webhookId}/test Send webhook test data

Documentation For Models

Documentation For Authorization


  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header



Stars: 0
Last commit: Yesterday

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API