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

# Resources

# Overview

This API client was generated by the OpenAPI Generator (opens new window) project. By using the openapi-spec (opens new window) 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

# Installation

# Carthage

Run carthage update

# CocoaPods

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
AliasControllerAPI createAnonymousAlias POST /aliases/anonymous Create an anonymous email alias
AliasControllerAPI deleteAlias DELETE /aliases/{aliasId} Delete an owned alias
AliasControllerAPI getAlias GET /aliases/{aliasId} Get an email alias
AliasControllerAPI getAliases GET /aliases Get all email aliases
AliasControllerAPI updateAlias PUT /aliases/{aliasId} Update an owned alias
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 getContacts GET /contacts Get all contacts
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
EmailControllerAPI deleteAllEmails DELETE /emails Delete all emails
EmailControllerAPI deleteEmail DELETE /emails/{emailId} Delete an email
EmailControllerAPI downloadAttachment GET /emails/{emailId}/attachments/{attachmentId} Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
EmailControllerAPI downloadAttachmentBase64 GET /emails/{emailId}/attachments/{attachmentId}/base64 Get email attachment as base64 encoded string (alternative to binary responses)
EmailControllerAPI forwardEmail POST /emails/{emailId}/forward Forward email
EmailControllerAPI getAttachmentMetaData GET /emails/{emailId}/attachments/{attachmentId}/metadata Get email attachment metadata
EmailControllerAPI getAttachments GET /emails/{emailId}/attachments Get all email attachment metadata
EmailControllerAPI getEmail GET /emails/{emailId} Get email content
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
EmailControllerAPI getEmailsPaginated GET /emails Get all emails
EmailControllerAPI getRawEmailContents GET /emails/{emailId}/raw Get raw email string
EmailControllerAPI getRawEmailJson GET /emails/{emailId}/raw/json Get raw email in JSON
EmailControllerAPI getUnreadEmailCount GET /emails/unreadCount Get unread email count
EmailControllerAPI validateEmail POST /emails/{emailId}/validate Validate email
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)
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
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 / Email Addresses
InboxControllerAPI sendEmail POST /inboxes/{inboxId} Send Email
InboxControllerAPI sendEmailAndConfirm POST /inboxes/{inboxId}/confirm Send email and return sent confirmation
InboxControllerAPI setInboxFavourited PUT /inboxes/{inboxId}/favourite Set inbox favourited state
InboxControllerAPI updateInbox PATCH /inboxes/{inboxId} Update Inbox
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.
SentEmailsControllerAPI getSentEmail GET /sent/{id} Get sent email receipt
SentEmailsControllerAPI getSentEmails GET /sent Get all sent 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 conditions to be met
WaitForControllerAPI waitForEmailCount GET /waitForEmailCount Wait for and return count number of emails
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 waitForNthEmail GET /waitForNthEmail Wait for or fetch the email with a given index in the inbox specified
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 getAllWebhooks GET /webhooks/paginated List Webhooks Paginated
WebhookControllerAPI getWebhook GET /webhooks/{webhookId} Get a webhook for an Inbox
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

# API_KEY

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

# Author